op = self.fs.rank_tell(["quiesce", "path", self.subvolume, '--wait'], rank=0)['op']
self.assertEqual(op['result'], -1) # EPERM
- @unittest.skip("https://tracker.ceph.com/issues/66152")
def test_quiesce_drops_remote_authpins_on_failure(self):
"""
That remote authpins are dropped when the request fails to acquire the quiesce lock
bool Locker::acquire_locks(const MDRequestRef& mdr,
MutationImpl::LockOpVec& lov,
CInode* auth_pin_freeze,
- std::set<MDSCacheObject*> mustpin,
bool auth_pin_nonblocking,
bool skip_quiesce)
{
client_t client = mdr->get_client();
+ std::set<MDSCacheObject*> mustpin;
if (auth_pin_freeze)
mustpin.insert(auth_pin_freeze);
dout(20) << " must xlock " << *lock << " " << *object << dendl;
- mustpin.insert(object);
+ // only take the authpin for the quiesce lock on the auth
+ if (lock->get_type() != CEPH_LOCK_IQUIESCE || object->is_auth()) {
+ mustpin.insert(object);
+ }
// augment xlock with a versionlock?
if (lock->get_type() == CEPH_LOCK_DN) {
bool acquire_locks(const MDRequestRef& mdr,
MutationImpl::LockOpVec& lov,
CInode *auth_pin_freeze=NULL,
- std::set<MDSCacheObject*> mustpin = {},
bool auth_pin_nonblocking=false,
bool skip_quiesce=false);
// prevent a racing gather on any other scatterlocks too
lov.lock_scatter_gather(&diri->nestlock);
lov.lock_scatter_gather(&diri->filelock);
- if (mds->locker->acquire_locks(mdr, lov, NULL, {}, true)) {
+ if (mds->locker->acquire_locks(mdr, lov, NULL, true)) {
mdr->locking_state |= MutationImpl::ALL_LOCKED;
} else {
if (!mdr->aborted) {
// as a result of the auth taking the above locks.
}
- if (!mds->locker->acquire_locks(mdr, lov, nullptr, {in}, false, true)) {
+ if (!mds->locker->acquire_locks(mdr, lov, nullptr, false, true)) {
return;
}
mdr->locking_state |= MutationImpl::ALL_LOCKED;
}
}
- if (!mds->locker->acquire_locks(mdr, lov, lps.config.ap_freeze ? in : nullptr, {in}, lps.config.ap_dont_block, true)) {
+ if (!mds->locker->acquire_locks(mdr, lov, lps.config.ap_freeze ? in : nullptr, lps.config.ap_dont_block, true)) {
if (lps.config.ap_dont_block && mdr->aborted) {
mds->server->respond_to_request(mdr, -CEPHFS_EWOULDBLOCK);
}
// will want to take other locks is to prevent issuing unwanted client capabilities,
// but since replicas can't issue capabilities, it should be fine allowing remote locks
// without taking the quiesce lock.
- if (!mds->locker->acquire_locks(mdr, lov, nullptr, {}, false, true))
+ if (!mds->locker->acquire_locks(mdr, lov, nullptr, false, true))
return;
// ack