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>
This commit is contained in:
Yan, Zheng 2017-07-26 12:07:51 +08:00 коммит произвёл Ilya Dryomov
Родитель 9a86962b35
Коммит 8d45b911a9
1 изменённых файлов: 11 добавлений и 8 удалений

Просмотреть файл

@ -1516,16 +1516,19 @@ 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) &&
req->r_readdir_offset == 2 &&
!(rinfo->hash_order && last_hash)) { !(rinfo->hash_order && last_hash)) {
/* note dir version at start of readdir so we can tell /* note dir version at start of readdir so we can
* if any dentries get dropped */ * tell if any dentries get dropped */
req->r_dir_release_cnt = atomic64_read(&ci->i_release_count); req->r_dir_release_cnt =
req->r_dir_ordered_cnt = atomic64_read(&ci->i_ordered_count); atomic64_read(&ci->i_release_count);
req->r_dir_ordered_cnt =
atomic64_read(&ci->i_ordered_count);
req->r_readdir_cache_idx = 0; req->r_readdir_cache_idx = 0;
} }
}
cache_ctl.index = req->r_readdir_cache_idx; cache_ctl.index = req->r_readdir_cache_idx;
fpos_offset = req->r_readdir_offset; fpos_offset = req->r_readdir_offset;