diff options
author | Yan, Zheng <zyan@redhat.com> | 2015-06-16 14:48:56 +0200 |
---|---|---|
committer | Ilya Dryomov <idryomov@gmail.com> | 2015-06-25 10:49:32 +0200 |
commit | fdd4e15838e59c394a1ec4963b57c22c12608685 (patch) | |
tree | b5486f7b0f12abf9ed670d187f4841dfdb2aa13e /fs/ceph/mds_client.h | |
parent | crush: sync up with userspace (diff) | |
download | linux-fdd4e15838e59c394a1ec4963b57c22c12608685.tar.xz linux-fdd4e15838e59c394a1ec4963b57c22c12608685.zip |
ceph: rework dcache readdir
Previously our dcache readdir code relies on that child dentries in
directory dentry's d_subdir list are sorted by dentry's offset in
descending order. When adding dentries to the dcache, if a dentry
already exists, our readdir code moves it to head of directory
dentry's d_subdir list. This design relies on dcache internals.
Al Viro suggests using ncpfs's approach: keeping array of pointers
to dentries in page cache of directory inode. the validity of those
pointers are presented by directory inode's complete and ordered
flags. When a dentry gets pruned, we clear directory inode's complete
flag in the d_prune() callback. Before moving a dentry to other
directory, we clear the ordered flag for both old and new directory.
Signed-off-by: Yan, Zheng <zyan@redhat.com>
Diffstat (limited to 'fs/ceph/mds_client.h')
-rw-r--r-- | fs/ceph/mds_client.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/ceph/mds_client.h b/fs/ceph/mds_client.h index 470be4eb25f3..762757e6cebf 100644 --- a/fs/ceph/mds_client.h +++ b/fs/ceph/mds_client.h @@ -253,6 +253,9 @@ struct ceph_mds_request { bool r_got_unsafe, r_got_safe, r_got_result; bool r_did_prepopulate; + long long r_dir_release_cnt; + long long r_dir_ordered_cnt; + int r_readdir_cache_idx; u32 r_readdir_offset; struct ceph_cap_reservation r_caps_reservation; |