diff options
author | Yan, Zheng | 2017-07-26 12:07:51 +0800 |
---|---|---|
committer | Ilya Dryomov | 2017-09-06 19:56:45 +0200 |
commit | 8d45b911a9f106ec898ec531d5badba5df7c2748 (patch) | |
tree | 17456cbf95c9841d0b37224798d2cdd3296f21d5 /fs/ceph | |
parent | 9a86962b35be06c8908028975e2261e4df0f79fd (diff) |
ceph: don't fill readdir cache for LSSNAP reply
Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Diffstat (limited to 'fs/ceph')
-rw-r--r-- | fs/ceph/inode.c | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/fs/ceph/inode.c b/fs/ceph/inode.c index 2c5db3686173..4c34e08e2d4f 100644 --- a/fs/ceph/inode.c +++ b/fs/ceph/inode.c @@ -1516,15 +1516,18 @@ int ceph_readdir_prepopulate(struct ceph_mds_request *req, rinfo->dir_nr, parent); if (rinfo->dir_dir) ceph_fill_dirfrag(d_inode(parent), rinfo->dir_dir); - } - if (ceph_frag_is_leftmost(frag) && req->r_readdir_offset == 2 && - !(rinfo->hash_order && last_hash)) { - /* note dir version at start of readdir so we can tell - * if any dentries get dropped */ - req->r_dir_release_cnt = atomic64_read(&ci->i_release_count); - req->r_dir_ordered_cnt = atomic64_read(&ci->i_ordered_count); - req->r_readdir_cache_idx = 0; + if (ceph_frag_is_leftmost(frag) && + req->r_readdir_offset == 2 && + !(rinfo->hash_order && last_hash)) { + /* note dir version at start of readdir so we can + * tell if any dentries get dropped */ + req->r_dir_release_cnt = + atomic64_read(&ci->i_release_count); + req->r_dir_ordered_cnt = + atomic64_read(&ci->i_ordered_count); + req->r_readdir_cache_idx = 0; + } } cache_ctl.index = req->r_readdir_cache_idx; |