summaryrefslogtreecommitdiff
path: root/lib/backupstore/HousekeepStoreAccount.h
diff options
context:
space:
mode:
authorChris Wilson <chris+github@qwirx.com>2014-04-09 22:15:19 +0000
committerChris Wilson <chris+github@qwirx.com>2014-04-09 22:15:19 +0000
commitcd45df502bf91e550692d9930c6aaffc137eaadf (patch)
tree625bf504dfabf522fd13a18a8bd290b8e69b039e /lib/backupstore/HousekeepStoreAccount.h
parentfdfd1a57aea36019c20fac5382fcdc1797474d46 (diff)
Directories' entries in parent directory should track current size.
When entries are added to a directory by a command (BackupStoreContext), and when entries are removed from a directory (by housekeeping), update the parent directory's entry for us if our size has changed. Make BackupStoreCheck check for, report and fix errors when directory entries are directories and the size is wrong (as well as files). Conflicts: test/backupstore/testbackupstore.cpp Fix directories loaded without size being set, leading to warnings later. We can't check that the old size in the parent entry matched the old real size of the directory, unless we set the old real size in the directory. And we don't need to pass the old directory size to HousekeepStoreAccount::DeleteFile, because we can get it from the directory itself.
Diffstat (limited to 'lib/backupstore/HousekeepStoreAccount.h')
-rw-r--r--lib/backupstore/HousekeepStoreAccount.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/backupstore/HousekeepStoreAccount.h b/lib/backupstore/HousekeepStoreAccount.h
index ff57d1a1..ff9e9ffe 100644
--- a/lib/backupstore/HousekeepStoreAccount.h
+++ b/lib/backupstore/HousekeepStoreAccount.h
@@ -56,10 +56,10 @@ private:
int64_t ObjectID,
BackupStoreDirectory &rDirectory,
const std::string &rDirectoryFilename,
- int64_t OriginalDirSizeInBlocks,
BackupStoreInfo& rBackupStoreInfo);
+ void UpdateDirectorySize(BackupStoreDirectory &rDirectory,
+ IOStream::pos_type new_size_in_blocks);
-private:
typedef struct
{
int64_t mObjectID;