]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-client.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)
committerGreg Farnum <greg@inktank.com>
Wed, 13 Mar 2013 15:57:41 +0000 (08:57 -0700)
commita404c25e7cc86a6a8915d4c7d107080e83e831c5
treeaf7784069c55abb0846cb762eb7b85c8eb587508
parent56950561ecea383af4217f88f9c834aeb1f6bed6
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