diff options
author | Yan, Zheng <zheng.z.yan@intel.com> | 2013-01-04 02:30:10 -0500 |
---|---|---|
committer | Alex Elder <elder@inktank.com> | 2013-01-17 13:42:38 -0500 |
commit | 390306c38dd43908f7f7730229999790a773d1d5 (patch) | |
tree | 29906b1efa684636dd2dac23bc9954a5290ec868 /fs/ceph | |
parent | 66f58691c5c820283dd7e4d6fe8649033ed43ceb (diff) |
ceph: check mds_wanted for imported cap
The MDS may have incorrect wanted caps after importing caps. So the
client should check the value mds has and send cap update if necessary.
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
Reviewed-by: Sage Weil <sage@inktank.com>
Diffstat (limited to 'fs/ceph')
-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 40b5bbe63a39..1e1e02055a2b 100644 --- a/fs/ceph/caps.c +++ b/fs/ceph/caps.c | |||
@@ -2429,7 +2429,9 @@ static void handle_cap_grant(struct inode *inode, struct ceph_mds_caps *grant, | |||
2429 | dout("mds wanted %s -> %s\n", | 2429 | dout("mds wanted %s -> %s\n", |
2430 | ceph_cap_string(le32_to_cpu(grant->wanted)), | 2430 | ceph_cap_string(le32_to_cpu(grant->wanted)), |
2431 | ceph_cap_string(wanted)); | 2431 | ceph_cap_string(wanted)); |
2432 | grant->wanted = cpu_to_le32(wanted); | 2432 | /* imported cap may not have correct mds_wanted */ |
2433 | if (le32_to_cpu(grant->op) == CEPH_CAP_OP_IMPORT) | ||
2434 | check_caps = 1; | ||
2433 | } | 2435 | } |
2434 | 2436 | ||
2435 | cap->seq = seq; | 2437 | cap->seq = seq; |