Skip to content

Commit

Permalink
ceph: Don't update i_max_size when handling non-auth cap
Browse files Browse the repository at this point in the history
The cap from non-auth mds doesn't have a meaningful max_size value.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
Signed-off-by: Sage Weil <sage@inktank.com>
  • Loading branch information
Yan, Zheng authored and Alex Elder committed Dec 13, 2012
1 parent d2cc4dd commit 5e62ad3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/ceph/caps.c
Original file line number Diff line number Diff line change
Expand Up @@ -2390,7 +2390,7 @@ static void handle_cap_grant(struct inode *inode, struct ceph_mds_caps *grant,
&atime);

/* max size increase? */
if (max_size != ci->i_max_size) {
if (ci->i_auth_cap == cap && max_size != ci->i_max_size) {
dout("max_size %lld -> %llu\n", ci->i_max_size, max_size);
ci->i_max_size = max_size;
if (max_size >= ci->i_wanted_max_size) {
Expand Down

0 comments on commit 5e62ad3

Please sign in to comment.