ceph: handle the new nfiles/nsubdirs fields in cap message
authorYan, Zheng <zyan@redhat.com>
Fri, 27 Apr 2018 03:11:31 +0000 (11:11 +0800)
committerIlya Dryomov <idryomov@gmail.com>
Mon, 4 Jun 2018 18:45:56 +0000 (20:45 +0200)
commit4985d6f9e50fa48e35a9dbe1726434f987305cae
tree4b5c7a54f2b9e71564c5b37cf7b23e7fe93c5307
parenta1c6b8358171c16db0f858a7fbb28aa574b07c09
ceph: handle the new nfiles/nsubdirs fields in cap message

Without these new fields, stale st_size is returned in 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. set st_size
   to "i_files + i_subdirs".

Link: http://tracker.ceph.com/issues/23855
Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
fs/ceph/caps.c