mirror of
https://github.com/ceph/ceph
synced 2025-02-21 18:17:42 +00:00
mds: efficiently issue_caps for scatterlocks unlock during refragment
Signed-off-by: Sage Weil <sage@newdream.net>
This commit is contained in:
parent
f62f8deb21
commit
cc398ccfa7
@ -9683,9 +9683,10 @@ void MDCache::fragment_logged_and_stored(Mutation *mut, list<CDir*>& resultfrags
|
||||
delete mut;
|
||||
|
||||
// drop dft wrlock
|
||||
mds->locker->wrlock_finish(&diri->dirfragtreelock, NULL);
|
||||
mds->locker->wrlock_finish(&diri->nestlock, NULL);
|
||||
mds->locker->wrlock_finish(&diri->filelock, NULL);
|
||||
bool need_issue = false;
|
||||
mds->locker->wrlock_finish(&diri->dirfragtreelock, NULL, &need_issue);
|
||||
mds->locker->wrlock_finish(&diri->nestlock, NULL, &need_issue);
|
||||
mds->locker->wrlock_finish(&diri->filelock, NULL, &need_issue);
|
||||
|
||||
// unfreeze resulting frags
|
||||
for (list<CDir*>::iterator p = resultfrags.begin();
|
||||
@ -9708,6 +9709,9 @@ void MDCache::fragment_logged_and_stored(Mutation *mut, list<CDir*>& resultfrags
|
||||
|
||||
dir->unfreeze_dir();
|
||||
}
|
||||
|
||||
if (need_issue)
|
||||
mds->locker->issue_caps(diri);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user