This patch wasn't posted on ceph-devel, posting..

>From 2f0351fb79e046eddcfe5f4ac7c293dfc78545e2 Mon Sep 17 00:00:00 2001
From: "Yan, Zheng" <[email protected]>
Date: Wed, 22 Oct 2014 17:13:26 -0700
Subject: [PATCH] ceph: fix flush tid comparision

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.

Signed-off-by: Yan, Zheng <[email protected]>
---
 fs/ceph/caps.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/ceph/caps.c b/fs/ceph/caps.c
index 659f2ea9e6f7..cefca661464b 100644
--- a/fs/ceph/caps.c
+++ b/fs/ceph/caps.c
@@ -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,"

Reviewed-by: Ilya Dryomov <[email protected]>

Thanks,

                Ilya
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to