]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
mds: initial code for lock cache
authorYan, Zheng <zyan@redhat.com>
Mon, 30 Sep 2019 06:20:17 +0000 (14:20 +0800)
committerYan, Zheng <zyan@redhat.com>
Thu, 12 Dec 2019 18:04:12 +0000 (02:04 +0800)
commit09b3e942cdf09ccd24c60931a3a0533aa5ba4891
treed36899a3b68ef240ced3e208a1afe75b669d2da0
parenteab59a85e121e3e42de8456f36dcec76863b8aba
mds: initial code for lock cache

The lock cache preserves locks and authpins required for directory
operations. MDS can create a lock cache when it has acquired all locks
of a directory operation. The lock cache can be used to for later
operations of the same type on the same directory.

For example, when mds has acquired all locks of a unlink operation,
it creates a lock cache, which holds holds wrlocks on direcotry inode's
filelock and nestlock, rdlocks on ancestor inodes' snaplocks. For later
unlink operations on the same directory, MDS only needs to xlock the
dentry to unlink and xlock linklock of the inode to unlink.

Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
src/mds/CInode.h
src/mds/Capability.cc
src/mds/Capability.h
src/mds/Locker.cc
src/mds/Locker.h
src/mds/MDCache.cc
src/mds/Mutation.cc
src/mds/Mutation.h
src/mds/journal.cc