Add more fsck functionality

This commit is contained in:
Francesco Mazzoli
2024-04-09 14:56:50 +00:00
parent 2de5c6b5dc
commit d8267f18c6
2 changed files with 7 additions and 0 deletions

View File

@@ -249,6 +249,10 @@ void ShardDBTools::fsck(const std::string& dbPath) {
creationTime = edgeK().creationTime();
if ((*snapshotEdge)().targetIdWithOwned().extra()) {
ownedTargetId = (*snapshotEdge)().targetIdWithOwned().id();
// we can't have an owned directory snapshot edge
if (ownedTargetId.type() == InodeType::DIRECTORY) {
ERROR("Directory %s has a snapshot, owned edge to directory %s", thisDir, ownedTargetId);
}
}
}
if (ownedTargetId != NULL_INODE_ID) {