From: Yan, Zheng Date: Wed, 27 Feb 2013 01:26:09 +0000 (+0800) Subject: ceph: set mds_want according to cap import message X-Git-Tag: v3.12-rc1~575^2~285 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=964266cce94cee7e4aca42994fcda206c111e917;p=kernel%2Fkernel-generic.git ceph: set mds_want according to cap import message MDS ignores cap update message if migrate_seq mismatch, so when receiving a cap import message with higher migrate_seq, set mds_want according to the cap import message. Signed-off-by: Yan, Zheng Reviewed-by: Greg Farnum --- diff --git a/fs/ceph/caps.c b/fs/ceph/caps.c index 0d54368..ea1f177 100644 --- a/fs/ceph/caps.c +++ b/fs/ceph/caps.c @@ -553,6 +553,7 @@ retry: cap->implemented = 0; cap->mds = mds; cap->mds_wanted = 0; + cap->mseq = 0; cap->ci = ci; __insert_cap_node(ci, cap); @@ -628,7 +629,10 @@ retry: cap->cap_id = cap_id; cap->issued = issued; cap->implemented |= issued; - cap->mds_wanted |= wanted; + if (mseq > cap->mseq) + cap->mds_wanted = wanted; + else + cap->mds_wanted |= wanted; cap->seq = seq; cap->issue_seq = seq; cap->mseq = mseq;