From: Yan, Zheng Date: Tue, 15 Apr 2014 08:06:07 +0000 (+0800) Subject: mds: share max size to client who is allowed for WR cap X-Git-Tag: v0.80-rc1~22^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=f6db1bc2b684a7fb1884aa300ba95d3928342391;p=ceph.git mds: share max size to client who is allowed for WR cap WR cap is allowed for the loner client when filelock is in excl->mix state. MDS should share max size with the loner client in this case. Otherwise the client may wait for the max size forever. Fixes: #8092 Signed-off-by: Yan, Zheng --- diff --git a/src/mds/Locker.cc b/src/mds/Locker.cc index b24aec9bcfc6..e5fe00c2a679 100644 --- a/src/mds/Locker.cc +++ b/src/mds/Locker.cc @@ -1674,7 +1674,8 @@ void Locker::file_update_finish(CInode *in, MutationRef& mut, bool share, client issue_caps(in, cap); } - if (share && in->is_auth() && in->filelock.is_stable()) + if (share && in->is_auth() && + (in->filelock.gcaps_allowed(CAP_LONER) & (CEPH_CAP_GWR|CEPH_CAP_GBUFFER))) share_inode_max_size(in); } issue_caps_set(need_issue);