]> git.baikalelectronics.ru Git - kernel.git/commit
ceph: use i_release_count to indicate dir's completeness
authorYan, Zheng <zheng.z.yan@intel.com>
Wed, 13 Mar 2013 11:44:32 +0000 (19:44 +0800)
committerSage Weil <sage@inktank.com>
Thu, 2 May 2013 04:17:07 +0000 (21:17 -0700)
commit6a0f34898ae40fe47a39f100539fa98c27212903
treef29a8088a6f312ec40f03b96d96b34e69154627a
parentdce3e935ad0eac069b56bd40c32d00a8ad60d297
ceph: use i_release_count to indicate dir's completeness

Current ceph code tracks directory's completeness in two places.
ceph_readdir() checks i_release_count to decide if it can set the
I_COMPLETE flag in i_ceph_flags. All other places check the I_COMPLETE
flag. This indirection introduces locking complexity.

This patch adds a new variable i_complete_count to ceph_inode_info.
Set i_release_count's value to it when marking a directory complete.
By comparing the two variables, we know if a directory is complete

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
fs/ceph/caps.c
fs/ceph/dir.c
fs/ceph/inode.c
fs/ceph/mds_client.c
fs/ceph/super.h