mirror of
https://github.com/ceph/ceph
synced 2024-12-27 14:03:25 +00:00
Merge pull request #11137 from jcsp/wip-17173
mds: catch duplicates in DamageTable Reviewed-by: Douglas Fuller <dfuller@redhat.com>
This commit is contained in:
commit
2715885464
@ -46,10 +46,13 @@ bool DamageTable::notify_dentry(
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
DamageEntryRef entry = std::make_shared<DentryDamage>(
|
auto key = DirFragIdent(ino, frag);
|
||||||
ino, frag, dname, snap_id);
|
if (dentries.count(key) == 0) {
|
||||||
dentries[DirFragIdent(ino, frag)][DentryIdent(dname, snap_id)] = entry;
|
DamageEntryRef entry = std::make_shared<DentryDamage>(
|
||||||
by_id[entry->id] = entry;
|
ino, frag, dname, snap_id);
|
||||||
|
dentries[key][DentryIdent(dname, snap_id)] = entry;
|
||||||
|
by_id[entry->id] = entry;
|
||||||
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -72,9 +75,12 @@ bool DamageTable::notify_dirfrag(inodeno_t ino, frag_t frag)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
DamageEntryRef entry = std::make_shared<DirFragDamage>(ino, frag);
|
auto key = DirFragIdent(ino, frag);
|
||||||
dirfrags[DirFragIdent(ino, frag)] = entry;
|
if (dirfrags.count(key) == 0) {
|
||||||
by_id[entry->id] = entry;
|
DamageEntryRef entry = std::make_shared<DirFragDamage>(ino, frag);
|
||||||
|
dirfrags[key] = entry;
|
||||||
|
by_id[entry->id] = entry;
|
||||||
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -85,9 +91,11 @@ bool DamageTable::notify_remote_damaged(inodeno_t ino)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
auto entry = std::make_shared<BacktraceDamage>(ino);
|
if (remotes.count(ino) == 0) {
|
||||||
remotes[ino] = entry;
|
auto entry = std::make_shared<BacktraceDamage>(ino);
|
||||||
by_id[entry->id] = entry;
|
remotes[ino] = entry;
|
||||||
|
by_id[entry->id] = entry;
|
||||||
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user