Skip to content

Commit 11ba6b9

Browse files
ukernelidryomov
authored andcommitted
ceph: update i_requested_max_size only when sending cap msg to auth mds
Non-auth mds can't do anything to 'update max' cap message. Signed-off-by: "Yan, Zheng" <[email protected]> Reviewed-by: Jeff Layton <[email protected]> Signed-off-by: Ilya Dryomov <[email protected]>
1 parent 135e671 commit 11ba6b9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

fs/ceph/caps.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1371,7 +1371,8 @@ static int __send_cap(struct ceph_mds_client *mdsc, struct ceph_cap *cap,
13711371
arg.size = inode->i_size;
13721372
ci->i_reported_size = arg.size;
13731373
arg.max_size = ci->i_wanted_max_size;
1374-
ci->i_requested_max_size = arg.max_size;
1374+
if (cap == ci->i_auth_cap)
1375+
ci->i_requested_max_size = arg.max_size;
13751376

13761377
if (flushing & CEPH_CAP_XATTR_EXCL) {
13771378
old_blob = __ceph_build_xattrs_blob(ci);

0 commit comments

Comments
 (0)