diff options
author | Chris Wilson <chris+github@qwirx.com> | 2014-02-11 18:28:50 +0000 |
---|---|---|
committer | Chris Wilson <chris+github@qwirx.com> | 2014-02-11 18:28:50 +0000 |
commit | 8602278bf879c0a4bab50f302c702aac53509971 (patch) | |
tree | 90cb413ae57dc1fbcf0c7eab6fa0d85fe5ef6d31 /lib/backupstore/HousekeepStoreAccount.h | |
parent | 617e89e9e893f9aac53be7153af24ae8052b1a28 (diff) |
Fix accounting for old and deleted files, and dirs removed by housekeeping.
Also pass the actual reference count of an object to RaidFileWrite instead
of assuming that it's zero, to avoid accidentally deleting a referenced object.
Diffstat (limited to 'lib/backupstore/HousekeepStoreAccount.h')
-rw-r--r-- | lib/backupstore/HousekeepStoreAccount.h | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/lib/backupstore/HousekeepStoreAccount.h b/lib/backupstore/HousekeepStoreAccount.h index a63c5536..ff57d1a1 100644 --- a/lib/backupstore/HousekeepStoreAccount.h +++ b/lib/backupstore/HousekeepStoreAccount.h @@ -14,8 +14,9 @@ #include <set> #include <vector> +#include "BackupStoreRefCountDatabase.h" + class BackupStoreDirectory; -class BackupStoreRefCountDatabase; class HousekeepingCallback { @@ -48,10 +49,11 @@ private: bool ScanDirectory(int64_t ObjectID, BackupStoreInfo& rBackupStoreInfo); bool DeleteFiles(BackupStoreInfo& rBackupStoreInfo); - bool DeleteEmptyDirectories(); - void DeleteEmptyDirectory(int64_t dirId, - std::vector<int64_t>& rToExamine); - void DeleteFile(int64_t InDirectory, int64_t ObjectID, + bool DeleteEmptyDirectories(BackupStoreInfo& rBackupStoreInfo); + void DeleteEmptyDirectory(int64_t dirId, std::vector<int64_t>& rToExamine, + BackupStoreInfo& rBackupStoreInfo); + BackupStoreRefCountDatabase::refcount_t DeleteFile(int64_t InDirectory, + int64_t ObjectID, BackupStoreDirectory &rDirectory, const std::string &rDirectoryFilename, int64_t OriginalDirSizeInBlocks, |