Skip to content

Commit

Permalink
ceph: fix flush tid comparision
Browse files Browse the repository at this point in the history
TID of cap flush ack is 64 bits, but ceph_inode_info::flushing_cap_tid
is only 16 bits. 16 bits should be plenty to let the cap flush updates
pipeline appropriately, but we need to cast in the proper direction when
comparing these differently-sized versions. So downcast the 64-bits one
to 16 bits.

Reflects ceph.git commit a5184cf46a6e867287e24aeb731634828467cd98.

Signed-off-by: Yan, Zheng <zyan@redhat.com>
Reviewed-by: Ilya Dryomov <idryomov@redhat.com>
  • Loading branch information
Yan, Zheng authored and Ilya Dryomov committed Nov 13, 2014
1 parent 206c5f6 commit 3231300
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/ceph/caps.c
Original file line number Diff line number Diff line change
Expand Up @@ -2638,7 +2638,7 @@ static void handle_cap_flush_ack(struct inode *inode, u64 flush_tid,

for (i = 0; i < CEPH_CAP_BITS; i++)
if ((dirty & (1 << i)) &&
flush_tid == ci->i_cap_flush_tid[i])
(u16)flush_tid == ci->i_cap_flush_tid[i])
cleaned |= 1 << i;

dout("handle_cap_flush_ack inode %p mds%d seq %d on %s cleaned %s,"
Expand Down

0 comments on commit 3231300

Please sign in to comment.