Commit 8d45b911 authored by Yan, Zheng's avatar Yan, Zheng Committed by Ilya Dryomov

ceph: don't fill readdir cache for LSSNAP reply

Signed-off-by: default avatar"Yan, Zheng" <zyan@redhat.com>
Signed-off-by: default avatarIlya Dryomov <idryomov@gmail.com>
parent 9a86962b
...@@ -1516,15 +1516,18 @@ int ceph_readdir_prepopulate(struct ceph_mds_request *req, ...@@ -1516,15 +1516,18 @@ int ceph_readdir_prepopulate(struct ceph_mds_request *req,
rinfo->dir_nr, parent); rinfo->dir_nr, parent);
if (rinfo->dir_dir) if (rinfo->dir_dir)
ceph_fill_dirfrag(d_inode(parent), rinfo->dir_dir); ceph_fill_dirfrag(d_inode(parent), rinfo->dir_dir);
}
if (ceph_frag_is_leftmost(frag) && req->r_readdir_offset == 2 && if (ceph_frag_is_leftmost(frag) &&
!(rinfo->hash_order && last_hash)) { req->r_readdir_offset == 2 &&
/* note dir version at start of readdir so we can tell !(rinfo->hash_order && last_hash)) {
* if any dentries get dropped */ /* note dir version at start of readdir so we can
req->r_dir_release_cnt = atomic64_read(&ci->i_release_count); * tell if any dentries get dropped */
req->r_dir_ordered_cnt = atomic64_read(&ci->i_ordered_count); req->r_dir_release_cnt =
req->r_readdir_cache_idx = 0; 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; cache_ctl.index = req->r_readdir_cache_idx;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment