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: misc multimds fixes #12274

Merged
merged 8 commits into from Jan 9, 2017
Merged

mds: misc multimds fixes #12274

merged 8 commits into from Jan 9, 2017

Conversation

ukernel
Copy link
Contributor

@ukernel ukernel commented Dec 2, 2016

No description provided.

@ukernel ukernel added bug-fix cephfs Ceph File System labels Dec 2, 2016
Copy link
Member

@gregsfortytwo gregsfortytwo left a comment

Choose a reason for hiding this comment

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

Some quick questions.

for (auto p : dfls) {
if (mds->get_nodeid() != p->get_dir_auth().first)
witnesses.insert(p->get_dir_auth().first);
}
Copy link
Member

Choose a reason for hiding this comment

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

If we don't make other replicas a witness here, at which point do they find out the inode has been unlinked?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Server::_unlink_local_finish send dentry unlink message to the rest replicas

@@ -2049,6 +2055,10 @@ void Locker::resume_stale_caps(Session *session)
if (cap->is_stale()) {
dout(10) << " clearing stale flag on " << *in << dendl;
cap->clear_stale();

if (in->state_test(CInode::STATE_EXPORTINGCAPS))
continue;
Copy link
Member

Choose a reason for hiding this comment

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

This is subtle; can you explain in the commit message? I think this is assuming we're the recipient and can just toss out the stale caps now, right?

@ghost
Copy link

ghost commented Dec 6, 2016

jenkins test this please (asok http://tracker.ceph.com/issues/15249)

Its caller StrayManager::eval_remote_stray uses projected linkage.

Signed-off-by: Yan, Zheng <zyan@redhat.com>
Signed-off-by: Yan, Zheng <zyan@redhat.com>
This avoid trigger the assertion of path traverse return value
in Server::handle_slave_rmdir_prep.  (Other witness mds may release
the inode before receiving the slave rmdir prepare)

Signed-off-by: Yan, Zheng <zyan@redhat.com>
The revoke/resume cycle increases capability's sequence, which
confuses clients. The caps get removed if exporting succeeds.
We only need to revoke/resume stale caps after exporting fails.

Signed-off-by: Yan, Zheng <zyan@redhat.com>
Rollback slave operations is tricky. Make MDcache::request_kill
ignores request that has started slave operations.

Signed-off-by: Yan, Zheng <zyan@redhat.com>
@gregsfortytwo
Copy link
Member

@ukernel, you appear to have pushed a bunch of new and unrelated bug fix commits on top of an already-reviewed PR? It'll help if you don't apply new ones once a PR has been looked at so it's clear what has and hasn't been reviewed.

Copy link
Member

@gregsfortytwo gregsfortytwo left a comment

Choose a reason for hiding this comment

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

There are several things I don't understand here.

srcdnl->get_inode()->filelock.remove_dirty();
srcdnl->get_inode()->nestlock.remove_dirty();
*/
Copy link
Member

Choose a reason for hiding this comment

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

Why do you want to leave this in comments instead of removing the code?

cache->adjust_subtree_auth(dir, mds->get_nodeid());
cache->try_subtree_merge(dir); // NOTE: this may journal subtree_map as side effect
dir->unfreeze_tree();
Copy link
Member

Choose a reason for hiding this comment

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

What's up with these ordering changes? If they're necessary for correctness we need to at least document that, if not enforce it with code state.
(Seriously, this change implies an ordering that allows unfreeze before or after adjusting auth and merging, but doesn't work in both orders.)

@@ -89,7 +89,6 @@ class Migrator {
set<mds_rank_t> warning_ack_waiting;
set<mds_rank_t> notify_ack_waiting;
map<inodeno_t,map<client_t,Capability::Import> > peer_imported;
list<MDSInternalContextBase*> waiting_for_finish;
Copy link
Member

Choose a reason for hiding this comment

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

"mds: remove useless code in Migrator"
With commits like that it's best to say exactly why it's useless. In this case, I gather nobody ever put anything on waiting_for_finish or called add_export_finish_waiter(), but the commit should say so.

bufferlist::iterator blp = client_map.begin();
::decode(cm, blp);
mds->server->prepare_force_open_sessions(cm, seqm);
mds->server->finish_force_open_sessions(cm, seqm);
mds->sessionmap.open_sessions(cm);
Copy link
Member

Choose a reason for hiding this comment

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

I don't understand why this change is being made at all. I think maybe the commit means you want to switch to doing this, but I'm not sure why. It looks like you're just tossing out a bunch of asserts and other safety/metadata code.

Copy link
Member

Choose a reason for hiding this comment

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

Okay, makes sense that trying to use the same code on both import and replay wouldn't work.

LogSegment::try_to_expire() calls Locker::scatter_nudge() for dirty
scatter locks. If lock's parent is non-auth, Locker::scatter_nudge()
waits on the stable bit of corresponding lock. There are some cases
that scatter locks get marked clean without involving lock state
transition. We need to wake up scatter_nudge waiters in these cases.

Also remove the code that clear dirty scatter locks after inode gets
imported. I can't see why we should do that.

Signed-off-by: Yan, Zheng <zyan@redhat.com>
SessionMap::open_sessions() is used by ESessions::replay() to open
sessions that were opened by Server::prepare_force_open_sessions().

Server::prepare_force_open_sessions() increases session map's version
for each opened sessions. But SessionMap::open_sessions() only increases
session map's version by one.

Signed-off-by: Yan, Zheng <zyan@redhat.com>
Server::finish_force_open_sessions() send session open message to
clients. It's wrong to use it during log replay.

Signed-off-by: Yan, Zheng <zyan@redhat.com>
@ukernel
Copy link
Contributor Author

ukernel commented Dec 9, 2016

updated

@gregsfortytwo
Copy link
Member

Reviewed-by: Greg Farnum gfarnum@redhat.com

@gregsfortytwo gregsfortytwo removed their assignment Dec 12, 2016
@liewegas liewegas changed the title Wip multimds misc mds: misc multimds fixes Dec 29, 2016
@jcsp jcsp merged commit 30cfc81 into ceph:master Jan 9, 2017
@ukernel ukernel deleted the wip-multimds-misc branch January 10, 2017 14:18
@ukernel ukernel restored the wip-multimds-misc branch January 11, 2017 09:18
@ukernel ukernel deleted the wip-multimds-misc branch January 12, 2017 01:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
3 participants