mirror of
https://github.com/ceph/ceph
synced 2025-02-21 18:17:42 +00:00
Merge branch 'wip-mds'
Reviewed-by: Greg Farnum <greg@inktank.com>
This commit is contained in:
commit
1152656c62
@ -1263,11 +1263,12 @@ void Client::handle_client_session(MClientSession *m)
|
||||
|
||||
switch (m->get_op()) {
|
||||
case CEPH_SESSION_OPEN:
|
||||
if (!mds_session)
|
||||
if (!mds_session) {
|
||||
mds_sessions[from] = mds_session = new MetaSession();
|
||||
mds_session->mds_num = from;
|
||||
mds_session->seq = 0;
|
||||
mds_session->inst = m->get_source_inst();
|
||||
mds_session->mds_num = from;
|
||||
mds_session->seq = 0;
|
||||
mds_session->inst = m->get_source_inst();
|
||||
}
|
||||
renew_caps(from);
|
||||
if (unmounting) {
|
||||
mds_session->closing = true;
|
||||
|
@ -5913,14 +5913,14 @@ void MDCache::handle_cache_expire(MCacheExpire *m)
|
||||
|
||||
if (!parent_dir->is_auth() ||
|
||||
(parent_dir->is_auth() && parent_dir->is_exporting() &&
|
||||
// this person has acked that we're exporting
|
||||
migrator->get_export_state(parent_dir) == Migrator::EXPORT_WARNING &&
|
||||
migrator->export_has_warned(parent_dir,from))) {
|
||||
((migrator->get_export_state(parent_dir) == Migrator::EXPORT_WARNING &&
|
||||
migrator->export_has_warned(parent_dir,from)) ||
|
||||
migrator->get_export_state(parent_dir) == Migrator::EXPORT_EXPORTING))) {
|
||||
// not auth.
|
||||
dout(7) << "delaying nonauth|warned expires for " << *parent_dir << dendl;
|
||||
assert(parent_dir->is_frozen_tree_root());
|
||||
|
||||
// make a message parent_dirtainer
|
||||
// make a message container
|
||||
if (delayed_expire[parent_dir].count(from) == 0)
|
||||
delayed_expire[parent_dir][from] = new MCacheExpire(from);
|
||||
|
||||
|
@ -291,7 +291,6 @@ void Server::_session_logged(Session *session, uint64_t state_seq, bool open, ve
|
||||
// reset session
|
||||
mds->send_message_client(new MClientSession(CEPH_SESSION_CLOSE), session);
|
||||
mds->sessionmap.set_state(session, Session::STATE_CLOSED);
|
||||
mds->messenger->mark_disposable(session->connection);
|
||||
session->clear();
|
||||
} else if (session->is_killing()) {
|
||||
// destroy session, close connection
|
||||
@ -351,7 +350,11 @@ void Server::finish_force_open_sessions(map<client_t,entity_inst_t>& cm,
|
||||
dout(10) << "force_open_sessions opened " << session->inst << dendl;
|
||||
mds->sessionmap.set_state(session, Session::STATE_OPEN);
|
||||
mds->sessionmap.touch_session(session);
|
||||
session->preopen_out_queue.push_back(new MClientSession(CEPH_SESSION_OPEN));
|
||||
Message *m = new MClientSession(CEPH_SESSION_OPEN);
|
||||
if (session->connection)
|
||||
messenger->send_message(m, session->connection);
|
||||
else
|
||||
session->preopen_out_queue.push_back(m);
|
||||
}
|
||||
} else {
|
||||
dout(10) << "force_open_sessions skipping already-open " << session->inst << dendl;
|
||||
|
Loading…
Reference in New Issue
Block a user