// ==========================================================================
// simple lock
+void Locker::handle_reqrdlock(SimpleLock *lock)
+{
+ if (lock->get_parent()->is_auth() &&
+ lock->is_stable() &&
+ lock->get_state() != LOCK_SYNC) {
+ dout(7) << "handle_reqrdlock got rdlock request on " << *lock
+ << " on " << *lock->get_parent() << dendl;
+ assert(lock->get_parent()->is_auth()); // replica auth pinned if they're doing this!
+ simple_sync(lock);
+ } else {
+ dout(7) << "handle_reqrdlock ignoring rdlock request on " << *lock
+ << " on " << *lock->get_parent() << dendl;
+ // replica will retry.
+ }
+}
+
void Locker::handle_simple_lock(SimpleLock *lock, MLock *m)
{
int from = m->get_asker();
}
break;
+ case LOCK_AC_REQRDLOCK:
+ handle_reqrdlock(lock);
+ break;
+
}
m->put();
break;
case LOCK_AC_REQRDLOCK:
- if (lock->get_parent()->is_auth() &&
- lock->is_stable() &&
- lock->get_state() != LOCK_SYNC) {
- dout(7) << "handle_file_lock got rdlock request on " << *lock
- << " on " << *lock->get_parent() << dendl;
- assert(in->is_auth()); // replica auth pinned if they're doing this!
- simple_sync(lock);
- } else {
- dout(7) << "handle_file_lock ignoring rdlock request on " << *lock
- << " on " << *lock->get_parent() << dendl;
- // replica will retry.
- }
+ handle_reqrdlock(lock);
break;
case LOCK_AC_NUDGE:
void mark_updated_scatterlock(ScatterLock *lock);
+ void handle_reqrdlock(SimpleLock *lock);
+
+
// caps
void process_cap_update(MDRequest *mdr, client_t client,
inodeno_t ino, uint64_t cap_id, int caps, int wanted,