]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
mds: fix occasional dir rstat inconsistency between multi-MDSes
authorZhi Zhang <willzzhang@tencent.com>
Tue, 17 Apr 2018 03:14:03 +0000 (11:14 +0800)
committerZhi Zhang <willzzhang@tencent.com>
Tue, 17 Apr 2018 03:14:03 +0000 (11:14 +0800)
commit7a2e42852f6711f0c470de07063bac0f47a72a30
treebc1ae20407b90d1c785ef85e93883950bff7447a
parentb7fce64601cc88ff93098582ab44e1ca0699488b
mds: fix occasional dir rstat inconsistency between multi-MDSes

Currently if file inode and its parent are processed on auth MDS,
its parent's rstat will be updated correctly, but won't be passed
to non-auth MDS. So if a newly-mounted ceph-fuse client connects
to non-auth MDS, this parent's rstat might be old.

The fix is to forward getattr request with CEPH_STAT_RSTAT mask
to auth MDS for latest rstat and client will always update its rstat
if reply is from auth MDS.

Signed-off-by: Zhi Zhang <zhangz.david@outlook.com>
src/client/Client.cc
src/client/Client.h
src/include/ceph_fs.h
src/mds/Server.cc