summaryrefslogtreecommitdiff
path: root/src/messages/MMDSCacheRejoin.h
diff options
context:
space:
mode:
authorYan, Zheng <zheng.z.yan@intel.com>2013-05-25 21:30:38 +0800
committerYan, Zheng <zheng.z.yan@intel.com>2013-05-28 13:57:22 +0800
commit3120d969fe1bb4cae198894df0cbcef108df14cc (patch)
tree661899a515eb8ac00f8385a69f68f1e043f5a717 /src/messages/MMDSCacheRejoin.h
parentceaf51f78f05f581636c46d5c6ade7a50b2c91f7 (diff)
downloadceph-3120d969fe1bb4cae198894df0cbcef108df14cc.tar.gz
mds: open missing cap inodes
When a recovering MDS enters reconnect stage, client sends reconnect messages to it. The message lists open files, their path, and issued caps. If an inode is not in the cache, the recovering MDS uses the path client provides to determine if it's the inode's authority. If not, the recovering MDS exports the inode's caps to other MDS. The issue here is that the path client provides isn't always accuracy. The fix is use recently added "open inode by ino" function to open any missing cap inodes when the recovering MDS enters rejoin stage. Send cache rejoin messages to other MDS after all caps' authorities are determined. Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
Diffstat (limited to 'src/messages/MMDSCacheRejoin.h')
-rw-r--r--src/messages/MMDSCacheRejoin.h15
1 files changed, 2 insertions, 13 deletions
diff --git a/src/messages/MMDSCacheRejoin.h b/src/messages/MMDSCacheRejoin.h
index dc8a1afe114..3ae83553dad 100644
--- a/src/messages/MMDSCacheRejoin.h
+++ b/src/messages/MMDSCacheRejoin.h
@@ -167,9 +167,7 @@ class MMDSCacheRejoin : public Message {
map<vinodeno_t, inode_strong> strong_inodes;
// open
- bufferlist cap_export_bl;
map<inodeno_t,map<client_t, ceph_mds_cap_reconnect> > cap_exports;
- map<inodeno_t,filepath> cap_export_paths;
// full
bufferlist inode_base;
@@ -258,10 +256,6 @@ public:
in->encode_lock_state(CEPH_LOCK_IDFT, inode_scatterlocks[in->ino()].dft);
}
- void copy_cap_exports(bufferlist &bl) {
- cap_export_bl = bl;
- }
-
// dirfrags
void add_strong_dirfrag(dirfrag_t df, int n, int dr) {
strong_dirfrags[df] = dirfrag_strong(n, dr);
@@ -304,7 +298,7 @@ public:
::encode(frozen_authpin_inodes, payload);
::encode(xlocked_inodes, payload);
::encode(wrlocked_inodes, payload);
- ::encode(cap_export_bl, payload);
+ ::encode(cap_exports, payload);
::encode(strong_dirfrags, payload);
::encode(dirfrag_bases, payload);
::encode(weak, payload);
@@ -325,12 +319,7 @@ public:
::decode(frozen_authpin_inodes, p);
::decode(xlocked_inodes, p);
::decode(wrlocked_inodes, p);
- ::decode(cap_export_bl, p);
- if (cap_export_bl.length()) {
- bufferlist::iterator q = cap_export_bl.begin();
- ::decode(cap_exports, q);
- ::decode(cap_export_paths, q);
- }
+ ::decode(cap_exports, p);
::decode(strong_dirfrags, p);
::decode(dirfrag_bases, p);
::decode(weak, p);