diff options
author | Chris Wilson <chris+github@qwirx.com> | 2014-10-31 22:09:46 +0000 |
---|---|---|
committer | Chris Wilson <chris+github@qwirx.com> | 2014-10-31 22:09:46 +0000 |
commit | d01f128b4580f312cd7ca7bf2329d80cdaced1b4 (patch) | |
tree | 3b449a8fb5491c8b274872fede6792ae92eafb05 /lib/backupstore/BackupStoreCheck.h | |
parent | e8efeb785c158581be729aa1dee122f50789ac86 (diff) |
Repair the refcount database while checking accounts for errors.
Normally this will be done by housekeeping anyway, so it's not that useful,
but it's good to check for it in tests, especially when testing
BackupStoreCheck's ability to repair bad things that happened to the store
when they involve references.
Diffstat (limited to 'lib/backupstore/BackupStoreCheck.h')
-rw-r--r-- | lib/backupstore/BackupStoreCheck.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/backupstore/BackupStoreCheck.h b/lib/backupstore/BackupStoreCheck.h index 22473169..5353c968 100644 --- a/lib/backupstore/BackupStoreCheck.h +++ b/lib/backupstore/BackupStoreCheck.h @@ -20,6 +20,7 @@ class IOStream; class BackupStoreFilename; +class BackupStoreRefCountDatabase; /* @@ -130,6 +131,7 @@ private: bool CheckDirectory(BackupStoreDirectory& dir); bool CheckDirectoryEntry(BackupStoreDirectory::Entry& rEntry, int64_t DirectoryID, bool& rIsModified); + void CountDirectoryEntries(BackupStoreDirectory& dir); int64_t CheckFile(int64_t ObjectID, IOStream &rStream); int64_t CheckDirInitial(int64_t ObjectID, IOStream &rStream); @@ -195,6 +197,9 @@ private: // Set of extra directories added std::set<BackupStoreCheck_ID_t> mDirsAdded; + + // The refcount database, being reconstructed as the check/fix progresses + std::auto_ptr<BackupStoreRefCountDatabase> mapNewRefs; // Misc stuff int32_t mLostDirNameSerial; |