mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-09 12:33:18 -04:00
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>
This commit is contained in:
@@ -553,6 +553,7 @@ int ceph_add_cap(struct inode *inode,
|
||||
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 @@ int ceph_add_cap(struct inode *inode,
|
||||
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;
|
||||
|
||||
Reference in New Issue
Block a user