]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
mds: track snap inodes through sorted map 18912/head
authorYan, Zheng <zyan@redhat.com>
Wed, 2 Aug 2017 09:26:56 +0000 (17:26 +0800)
committerShinobu Kinjo <shinobu@redhat.com>
Tue, 14 Nov 2017 04:34:56 +0000 (23:34 -0500)
commit1ec93753a37a24a7e72566848ccc0baab1df84ce
treef935691e7b9f5540260f92127222c4fc0e6feb60
parent85791328fc563932673e2d6ad8701179fee0c3a3
mds: track snap inodes through sorted map

Current mds track both head inodes and snap inodes through unsorted
map. The unsorted map makes finding snap inode that follows a given
snapid difficult. Currnt MDCache::pick_inode_snap() use snap set to
guess snap inode's last. The method isn't reliable because snap set
may change after creating the snap inode. For example:

MDS cows inode[2,head] with snap set[5,6], which results inode[2,6]
and inode[7,head].

Later mds wants to find snap inode that follows snapid 2. But the
snap set become [5], mds can't find snap inode [2,5].

Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
(cherry picked from commit 7b9eae62c8c654ff82684451c222257d2c93be64)

Conflicts:
src/mds/MDCache.cc: when i cherry-picked 3ca602e, there were conflicts in same file. to fix conflicts, i need to introduce snap_inode_map because it's not in luminous. to intoroduce this, i need to cherry-pick 7b9eae62. After cherry-picking 7b9eae62, there were conflicts. i picked code from head because it's introduced by 3ca602e which is required to fix http://tracker.ceph.com/issues/21928.
src/mds/Locker.cc
src/mds/MDCache.cc
src/mds/MDCache.h