diff options
author | Yan, Zheng <zheng.z.yan@intel.com> | 2012-12-20 09:31:10 +0800 |
---|---|---|
committer | Yan, Zheng <zheng.z.yan@intel.com> | 2013-01-02 19:25:39 +0800 |
commit | 61da9b18450fda270cf6075cdcafbade0928da99 (patch) | |
tree | e1d1dcd5b73adf60a4cdb6c6df4e80fd504a2e74 /src/mds/CInode.h | |
parent | 3b13d3dcbc8c4ed010826c8404260a3b45205c18 (diff) | |
download | ceph-61da9b18450fda270cf6075cdcafbade0928da99.tar.gz |
mds: mark rename inode as ambiguous auth on all involved MDS
When handling cross authority rename, the master first sends OP_RENAMEPREP
slave requests to witness MDS, then sends OP_RENAMEPREP slave request to
the rename inode's auth MDS after getting all witness MDS' acknowledgments.
Before receiving the OP_RENAMEPREP slave request, the rename inode's auth
MDS may change lock state of the rename inode and send lock messages to
witness MDS. But the witness MDS may already received the OP_RENAMEPREP
slave request and changed the source inode's authority. So the witness MDS
send lock acknowledgment message to wrong MDS and trigger assertion.
The fix is, firstly the master marks rename inode as ambiguous and send a
message to ask the rename inode's auth MDS to mark the inode as ambiguous,
then send OP_RENAMEPREP slave requests to the witness MDS, finally send
OP_RENAMEPREP slave request to the rename inode's auth MDS after getting
all witness MDS' acknowledgments.
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
Diffstat (limited to 'src/mds/CInode.h')
-rw-r--r-- | src/mds/CInode.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/mds/CInode.h b/src/mds/CInode.h index e43ecf50fa3..a627a4f44c6 100644 --- a/src/mds/CInode.h +++ b/src/mds/CInode.h @@ -525,7 +525,11 @@ private: return state_test(STATE_AMBIGUOUSAUTH) || MDSCacheObject::is_ambiguous_auth(); } - + void set_ambiguous_auth() { + state_set(STATE_AMBIGUOUSAUTH); + } + void clear_ambiguous_auth(list<Context*>& finished); + void clear_ambiguous_auth(); inodeno_t ino() const { return inode.ino; } vinodeno_t vino() const { return vinodeno_t(inode.ino, last); } |