Skip to content

Commit

Permalink
ceph: update i_requested_max_size only when sending cap msg to auth mds
Browse files Browse the repository at this point in the history
Non-auth mds can't do anything to 'update max' cap message.

Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
  • Loading branch information
ukernel authored and idryomov committed Mar 30, 2020
1 parent 135e671 commit 11ba6b9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion fs/ceph/caps.c
Original file line number Diff line number Diff line change
Expand Up @@ -1371,7 +1371,8 @@ static int __send_cap(struct ceph_mds_client *mdsc, struct ceph_cap *cap,
arg.size = inode->i_size;
ci->i_reported_size = arg.size;
arg.max_size = ci->i_wanted_max_size;
ci->i_requested_max_size = arg.max_size;
if (cap == ci->i_auth_cap)
ci->i_requested_max_size = arg.max_size;

if (flushing & CEPH_CAP_XATTR_EXCL) {
old_blob = __ceph_build_xattrs_blob(ci);
Expand Down

0 comments on commit 11ba6b9

Please sign in to comment.