aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ceph/caps.c
diff options
context:
space:
mode:
authorYan, Zheng <zheng.z.yan@intel.com>2013-02-26 20:26:09 -0500
committerSage Weil <sage@inktank.com>2013-05-02 00:14:32 -0400
commit964266cce94cee7e4aca42994fcda206c111e917 (patch)
tree015e18b06e2282a7fee1eb359267f131634357ed /fs/ceph/caps.c
parentd40ee0dcc1b27792b9b2f3905a5eaf4da061dbd5 (diff)
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 <zheng.z.yan@intel.com> Reviewed-by: Greg Farnum <greg@inktank.com>
Diffstat (limited to 'fs/ceph/caps.c')
-rw-r--r--fs/ceph/caps.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/fs/ceph/caps.c b/fs/ceph/caps.c
index 0d54368490db..ea1f177739b2 100644
--- a/fs/ceph/caps.c
+++ b/fs/ceph/caps.c
@@ -553,6 +553,7 @@ retry:
553 cap->implemented = 0; 553 cap->implemented = 0;
554 cap->mds = mds; 554 cap->mds = mds;
555 cap->mds_wanted = 0; 555 cap->mds_wanted = 0;
556 cap->mseq = 0;
556 557
557 cap->ci = ci; 558 cap->ci = ci;
558 __insert_cap_node(ci, cap); 559 __insert_cap_node(ci, cap);
@@ -628,7 +629,10 @@ retry:
628 cap->cap_id = cap_id; 629 cap->cap_id = cap_id;
629 cap->issued = issued; 630 cap->issued = issued;
630 cap->implemented |= issued; 631 cap->implemented |= issued;
631 cap->mds_wanted |= wanted; 632 if (mseq > cap->mseq)
633 cap->mds_wanted = wanted;
634 else
635 cap->mds_wanted |= wanted;
632 cap->seq = seq; 636 cap->seq = seq;
633 cap->issue_seq = seq; 637 cap->issue_seq = seq;
634 cap->mseq = mseq; 638 cap->mseq = mseq;