]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
mds: cache snaptable in snapclient
authorYan, Zheng <zyan@redhat.com>
Mon, 17 Jul 2017 08:26:14 +0000 (16:26 +0800)
committerYan, Zheng <zyan@redhat.com>
Fri, 9 Feb 2018 09:46:55 +0000 (17:46 +0800)
commitca1126fdb0de88be82b295985d0e61bf9127852e
tree7ea645bde1d13003bb3226333a38ec5bcb433df1
parenteca532278c37d43bc50be564083327289cc8667b
mds: cache snaptable in snapclient

The idea is caching both snap infos and pending updates in snapclient.
The snapclient also tracks updates that are being committed, it applies
these commits to its cached snap infos. Steps to update snaptable are:

 - mds.x acquire locks (xlock on snaplock of affected snaprealm inode)
 - mds.x prepares snaptable update. (send preare to snapserver and waits
   for 'agree' reply)
 - snapserver sends notification about the update to all mds and waits
   for ACKs. (not implemented by this patch)
 - snapserver send 'agree' reply to mds.x
 - mds.x journals corresponding
 - mds.x commits the snaptable update and notifies all mds that it
   commits that update. then mds drops locks.

When receiving committing notification, mds applies the committing
update to its cached snap infos. By this way, cached snap infos get
synchronized before snaplock become readable.

Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
src/mds/CMakeLists.txt
src/mds/MDSRank.cc
src/mds/MDSTable.cc
src/mds/MDSTableClient.cc
src/mds/MDSTableClient.h
src/mds/Server.cc
src/mds/SnapClient.cc [new file with mode: 0644]
src/mds/SnapClient.h
src/mds/SnapServer.cc