]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
mds: include nfiles/nsubdirs of directory inode in MClientCaps 22118/head
authorYan, Zheng <zyan@redhat.com>
Thu, 26 Apr 2018 07:12:48 +0000 (15:12 +0800)
committerPrashant D <pdhange@redhat.com>
Mon, 21 May 2018 11:30:34 +0000 (07:30 -0400)
commit8fb91394339be8d09e6c39ef88094c4c89df76ac
tree6589f268186dc938a34eae694c950d30226faa30
parent49a0c3269b1615e486e62a990e18a09685f47e85
mds: include nfiles/nsubdirs of directory inode in MClientCaps

Directory inode's dirstat gets updated by request reply, but not by
cap message. This causes problem for following case.

1. MDS modifies a directory
2. MDS issues CEPH_CAP_ANY_SHARED to client
3. The client satifies stat(2) by its cached metadata.

Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
Fixes: http://tracker.ceph.com/issues/23855
(cherry picked from commit ee2c628f6783954e9b25fab8ac9b572a58666a91)

Conflicts:
src/messages/MClientCaps.h: Resolved in encode_payload
src/client/Client.cc
src/mds/CInode.cc
src/messages/MClientCaps.h