mirror of
https://github.com/ceph/ceph
synced 2025-01-10 05:00:59 +00:00
mds: drop locks if requiring auth pinning new objects.
Locker::acquire_locks() skip auth pinning replica object if we only request a rdlock and the lock is read-lockable. To get all locks, we may call Locker::acquire_locks() several times, locks in replca objects may become not read-lockable between calls. So it is possible we need auth pin new objects after already take some locks. Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
This commit is contained in:
parent
9bfe540c65
commit
4cd8ea927e
@ -286,11 +286,12 @@ bool Locker::acquire_locks(MDRequest *mdr,
|
||||
continue;
|
||||
|
||||
if (!object->is_auth()) {
|
||||
if (!mdr->locks.empty())
|
||||
mds->locker->drop_locks(mdr);
|
||||
if (object->is_ambiguous_auth()) {
|
||||
// wait
|
||||
dout(10) << " ambiguous auth, waiting to authpin " << *object << dendl;
|
||||
object->add_waiter(MDSCacheObject::WAIT_SINGLEAUTH, new C_MDS_RetryRequest(mdcache, mdr));
|
||||
mds->locker->drop_locks(mdr);
|
||||
mdr->drop_local_auth_pins();
|
||||
return false;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user