/- make sure predirty_nested stops if it can't wrlock versionlock (acquire_locks normally hides that detail for us)
- make sure stray inode is always opened on startup
/- make sure inode cache expire for frozen inode behaves
-- REQSCATTER/REQUNSCATTER ... can we avoid the auth pin requirement?
+/- REQUNSCATTER ... can we avoid the auth pin requirement?
- look at the client_map session opening code.. versus rollback (of import, or slave request)
<< *lock << " on " << *p << dendl;
// request unscatter?
int auth = lock->get_parent()->authority().first;
- if (mds->mdsmap->get_state(auth) >= MDSMap::STATE_ACTIVE) {
- if (lock->get_state() == LOCK_SCATTER)
- mds->send_message_mds(new MLock(lock, LOCK_AC_REQUNSCATTER, mds->get_nodeid()), auth);
- else
- mds->send_message_mds(new MLock(lock, LOCK_AC_REQSCATTER, mds->get_nodeid()), auth);
- }
+ if (mds->mdsmap->get_state(auth) >= MDSMap::STATE_ACTIVE)
+ mds->send_message_mds(new MLock(lock, LOCK_AC_NUDGE, mds->get_nodeid()), auth);
// wait...
if (c)
lock->add_waiter(SimpleLock::WAIT_STABLE, c);
+
+ // also, requeue, in case we had wrong auth or something
+ updated_scatterlocks.push_back(&lock->xlistitem_updated);
}
}
}
break;
+ /*
case LOCK_AC_REQUNSCATTER:
if (!lock->is_stable()) {
dout(7) << "handle_scatter_lock ignoring now-unnecessary unscatter request on " << *lock
} else {
dout(7) << "handle_scatter_lock DROPPING unscatter request on " << *lock
<< " on " << *lock->get_parent() << dendl;
- /* FIXME: if we can't auth_pin here, this request is effectively lost... */
+ // FIXME: if we can't auth_pin here, this request is effectively lost...
}
+ break;
+ */
+
+ case LOCK_AC_NUDGE:
+ if (lock->get_parent()->is_auth()) {
+ dout(7) << "handle_scatter_lock trying nudge on " << *lock
+ << " on " << *lock->get_parent() << dendl;
+ scatter_nudge(lock, 0);
+ } else {
+ dout(7) << "handle_scatter_lock IGNORING nudge on non-auth " << *lock
+ << " on " << *lock->get_parent() << dendl;
+ }
+ break;
+
+ default:
+ assert(0);
}
delete m;
#define LOCK_AC_REQSCATTER 7
#define LOCK_AC_REQUNSCATTER 8
+#define LOCK_AC_NUDGE 9
#define LOCK_AC_FOR_REPLICA(a) ((a) < 0)
#define LOCK_AC_FOR_AUTH(a) ((a) > 0)
case LOCK_AC_LOCKACK: return "lockack";
case LOCK_AC_REQSCATTER: return "reqscatter";
case LOCK_AC_REQUNSCATTER: return "requnscatter";
+ case LOCK_AC_NUDGE: return "nudge";
default: assert(0); return 0;
}
}