Skip to content
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
Merged

mds: miscellaneous fixes #12974

merged 14 commits into from Feb 1, 2017

Conversation

ukernel
Copy link
Contributor

@ukernel ukernel commented Jan 18, 2017

No description provided.

request whose retry_attempt > 0 can also be in the clientreply queue.

Signed-off-by: Yan, Zheng <zyan@redhat.com>
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>
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 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>
@ukernel ukernel added bug-fix cephfs Ceph File System labels Jan 18, 2017
@liewegas liewegas changed the title miscellaneous mds fixes mds: miscellaneous fixes Jan 18, 2017
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>
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>
Signed-off-by: Yan, Zheng <zyan@redhat.com>
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>
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>
MDCache::try_trim_non_auth_subtree() frees the CDir

Signed-off-by: Yan, Zheng <zyan@redhat.com>
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>
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);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rejoin_import_cap return NULL if it fails

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

make sure the base object is in the cache when handing MDiscoverReply

Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
@jcsp jcsp merged commit 13a52e9 into ceph:master Feb 1, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug-fix cephfs Ceph File System
Projects
None yet
3 participants