mds: use "open-by-ino" function to open remote link
PATCH 1/1 mds: use "open-by-ino" function to open remote link
From: "Yan, Zheng" <[email protected]>
Also add a new config option "mds_open_remote_link_mode". The anchor approach is used by default. If mode is non-zero, use the open-by-ino function. In case open-by-ino function fails, if mode is 1, retry using the anchor approach, otherwise trigger assertion.
Signed-off-by Yan, Zheng <[email protected]>
--- src/common/config_opts.h | 1 + src/mds/MDCache.cc | 51 +++++++++++++++++++++++++++++++----------------- src/mds/MDCache.h | 7 +++++-- 3 files changed, 39 insertions(+), 20 deletions(-)
src/common/config_opts.h +1 -0
@@ -338,6 +338,7 @@ OPTION(mds_kill_openc_at, OPT_INT, 0) OPTION(mds_kill_journal_at, OPT_INT, 0) OPTION(mds_kill_journal_expire_at, OPT_INT, 0) OPTION(mds_kill_journal_replay_at, OPT_INT, 0) +OPTION(mds_open_remote_link_mode, OPT_INT, 0)OPTION (mds_inject_traceless_reply_probability,OPT_DOUBLE ,0 )/* percentage of MDS modify replies to skip sending the client a trace on [0-1]*/
src/mds/MDCache.cc +33 -18
77 lines not on this page · raw message
src/mds/MDCache.h +5 -2
@@ -754,14 +754,17 @@ public:void open_remote_ino_2 (inodeno_t ino, vector<Anchor>& anchortrace, bool want_xlocked,inodeno_t hadino,version_t hadv,Context *onfinish); -void open_remote_dentry (CDentry *dn,bool projected,Context *fin); -void _open_remote_dentry_finish (int r,CDentry *dn,bool projected,Context *fin); bool parallel_fetch(map<inodeno_t,filepath>& pathmap, set<inodeno_t>& missing); bool parallel_fetch_traverse_dir(inodeno_t ino, filepath& path, set<CDir*>& fetch_queue, set<inodeno_t>& missing, C_GatherBuilder &gather_bld); +void open_remote_dentry (CDentry *dn,bool projected,Context *fin, + bool want_xlocked=false); +void _open_remote_dentry_finish (CDentry *dn,inodeno_t ino,Context *fin, +bool want_xlocked,int mode,int r); + void make_trace(vector<CDentry*>& trace, CInode *in); protected:
Signature · 1 line
1.8.1.4