diff options
author | Yan, Zheng <zheng.z.yan@intel.com> | 2014-03-17 22:15:29 -0400 |
---|---|---|
committer | Sage Weil <sage@inktank.com> | 2014-04-05 00:07:12 -0400 |
commit | d9ffc4f77073e7e1ca731f21804769de9c094b87 (patch) | |
tree | fe7cbafb5174061c3e64e0765caa137405a9494b | |
parent | eb13e832f823f6c110ea53e3067bafe22b87de63 (diff) |
ceph: set mds_wanted when MDS reply changes a cap to auth cap
When adjusting caps client wants, MDS does not record caps that are
not allowed. For non-auth MDS, it does not record WR caps. So when
a MDS reply changes a non-auth cap to auth cap, client needs to set
cap's mds_wanted according to the reply.
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
-rw-r--r-- | fs/ceph/caps.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/ceph/caps.c b/fs/ceph/caps.c index d9ef44e5474e..2e5e648eb5c3 100644 --- a/fs/ceph/caps.c +++ b/fs/ceph/caps.c | |||
@@ -622,8 +622,10 @@ retry: | |||
622 | 622 | ||
623 | if (flags & CEPH_CAP_FLAG_AUTH) { | 623 | if (flags & CEPH_CAP_FLAG_AUTH) { |
624 | if (ci->i_auth_cap == NULL || | 624 | if (ci->i_auth_cap == NULL || |
625 | ceph_seq_cmp(ci->i_auth_cap->mseq, mseq) < 0) | 625 | ceph_seq_cmp(ci->i_auth_cap->mseq, mseq) < 0) { |
626 | ci->i_auth_cap = cap; | 626 | ci->i_auth_cap = cap; |
627 | cap->mds_wanted = wanted; | ||
628 | } | ||
627 | ci->i_cap_exporting_issued = 0; | 629 | ci->i_cap_exporting_issued = 0; |
628 | } else { | 630 | } else { |
629 | WARN_ON(ci->i_auth_cap == cap); | 631 | WARN_ON(ci->i_auth_cap == cap); |