mirror of
https://github.com/ceph/ceph
synced 2025-03-21 01:38:15 +00:00
mds: optimize MDCache::rejoin_scour_survivor_replicas()
avoid iterating dentries if dirfrag is non-auth Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
This commit is contained in:
parent
fd447405be
commit
d32a237604
@ -4538,9 +4538,10 @@ void MDCache::rejoin_scour_survivor_replicas(mds_rank_t from, MMDSCacheRejoin *a
|
|||||||
p != dfs.end();
|
p != dfs.end();
|
||||||
++p) {
|
++p) {
|
||||||
CDir *dir = *p;
|
CDir *dir = *p;
|
||||||
|
if (!dir->is_auth())
|
||||||
|
continue;
|
||||||
|
|
||||||
if (dir->is_auth() &&
|
if (dir->is_replica(from) &&
|
||||||
dir->is_replica(from) &&
|
|
||||||
(ack == NULL || ack->strong_dirfrags.count(dir->dirfrag()) == 0)) {
|
(ack == NULL || ack->strong_dirfrags.count(dir->dirfrag()) == 0)) {
|
||||||
dir->remove_replica(from);
|
dir->remove_replica(from);
|
||||||
dout(10) << " rem " << *dir << dendl;
|
dout(10) << " rem " << *dir << dendl;
|
||||||
|
Loading…
Reference in New Issue
Block a user