New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mds: miscellaneous fixes #12974

Merged
merged 14 commits into from Feb 1, 2017

Conversation

Projects
None yet
3 participants
@ukernel
Member

ukernel commented Jan 18, 2017

No description provided.

ukernel added some commits Jan 13, 2017

mds: fix clientreplay hang
request whose retry_attempt > 0 can also be in the clientreply queue.

Signed-off-by: Yan, Zheng <zyan@redhat.com>
mds: fix MDSMap::is_resolving()
the function checks if all recovering mds reach resolve state.
it needs to consider damaged mds set.

Signed-off-by: Yan, Zheng <zyan@redhat.com>
mds: fix MDSMap::get_recovery_mds_set()
The function get set of mds rank that exist. it needs to consider
the damaged mds set.

Signed-off-by: Yan, Zheng <zyan@redhat.com>
mds: cleanup MDCache::handle_mds_failure
mds failure does not affect content of recovery_set. So there is
no need to re-calculate recovery_set in MDCache::handle_mds_failure.

Signed-off-by: Yan, Zheng <zyan@redhat.com>

@liewegas liewegas changed the title from miscellaneous mds fixes to mds: miscellaneous fixes Jan 18, 2017

ukernel added some commits Jan 16, 2017

mds: handle subtree export abort notification race.
If subtree exporter fails, the importer may send abort notification
to bystanders in import_state_t::bystanders. If both the exporter and
bystander fail in the same mdsmap epoch. The migrator first send abort
notification to the failed bystander, then remove the bystander from
import_state_t::bystanders. This cause mds to assert on unexpected
MExportDirNotifyAck message.

Signed-off-by: Yan, Zheng <zyan@redhat.com>
Revert "mds: only send slave rmdir prepare to auth mds of subtree"
This reverts commit 99c9147.

Sending slave requests to all replica mds simplify the subtree reolve
process of mds recovery. It guarantee all mds have a consistent
subtree map. Otherwise replica mds can failed to receive the
MDentryUnlink message if the master mds fails. When the master mds
recovers, its subtree map is different from the replica mds.

Signed-off-by: Yan, Zheng <zyan@redhat.com>
mds: add -ESTALE recovery code for slave rmdir
Signed-off-by: Yan, Zheng <zyan@redhat.com>
mds: cleanup Migrator::decode_import_inode()
EMetaBlob::add_primary_dentry() updates inode's last_journaled.
No need to do the same job in Migrator::decode_import_inode()

Signed-off-by: Yan, Zheng <zyan@redhat.com>
mds: fix race between submitting EImportFinish and SubtreeMap
MDCache::create_subtree_map() use MDCache::my_ambiguous_imports
and Migrator::is_ambiguous_import() to decide if a subtree is
ambiguous import.  Submitting log event can start new segment
and submit an extra SubtreeMap. So before submitting EImportFinish
event, we need to cleanup MDCache::my_ambiguous_imports and
Migrator::import_state.

Signed-off-by: Yan, Zheng <zyan@redhat.com>
mds: fix use-after-free in MDCache::disambiguate_imports
MDCache::try_trim_non_auth_subtree() frees the CDir

Signed-off-by: Yan, Zheng <zyan@redhat.com>
mds: ignore useless slave request replies during recovery
During mds recovers, most slave request replies are useless. If
corresponding master was not committed, slave requests will be
rollback. If corresponding master was committed, it's only
possible to receive slave request reply of type OP_COMMITTED.
The OP_COMMITTED replay is useful only if it's was triggered
by the recovering mds's resolve ack message.

Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
mds: avoid journal unnessary dirfrags in ESubtreeMap
EMetaBlob::add_dir_contex() skips adding inodes that has already
been journaled in the last ESubtreeMap. The log replay code only
replays the first ESubtreeMap. For the rest ESubtreeMap, it just
verifies subtree map in the cache matches the ESubtreeMap. If
unnessary inodes were included in non-first ESubtreeMap, these
inodes do not get added to the cache, the log replay code can
find these inodes are missing when replaying the rest events in
the log segment.

Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
@@ -4287,9 +4287,13 @@ void MDCache::handle_cache_rejoin_weak(MMDSCacheRejoin *weak)
dout(10) << " claiming cap import " << p->first << " client." << q->first << " on " << *in << dendl;
Capability *cap = rejoin_import_cap(in, q->first, q->second, from);

This comment has been minimized.

@batrick

batrick Jan 25, 2017

Member

I think rejoin_import_cap can fail here if there is no session with the client?

This comment has been minimized.

@ukernel

ukernel Jan 26, 2017

Member

rejoin_import_cap return NULL if it fails

This comment has been minimized.

@batrick

batrick Jan 31, 2017

Member

Hrm, I think I was looking at master instead of this commit. Disregard!

ukernel added some commits Jan 25, 2017

mds: pin base object of discover
make sure the base object is in the cache when handing MDiscoverReply

Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
@jcsp

jcsp approved these changes Feb 1, 2017

@jcsp jcsp merged commit 13a52e9 into ceph:master Feb 1, 2017

3 checks passed

Signed-off-by all commits in this PR are signed
Details
Unmodifed Submodules submodules for project are unmodified
Details
default Build finished.
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment