summaryrefslogtreecommitdiff
path: root/lib/backupstore/BackupStoreRefCountDatabase.cpp
diff options
context:
space:
mode:
authorReinhard Tartler <siretart@tauware.de>2019-05-28 07:20:50 -0400
committerReinhard Tartler <siretart@tauware.de>2019-05-28 07:20:50 -0400
commitb370dc014446dfe1ea9b8926d13dc8ec643f33b9 (patch)
tree95f1c8cb423c894e75ce0b27b50f56ffdd2fc7e4 /lib/backupstore/BackupStoreRefCountDatabase.cpp
parente9db5f7277a85068ef9e5515adf8577f74814d5e (diff)
parent6017757bc079f4446aa77bc5c0855c52741280f4 (diff)
Update upstream source from tag 'upstream/0.13__git20190527.g039c4a1'
Update to upstream version '0.13~~git20190527.g039c4a1' with Debian dir 2f67398c74e85067e31e6bf62658e5870a79e436
Diffstat (limited to 'lib/backupstore/BackupStoreRefCountDatabase.cpp')
-rw-r--r--lib/backupstore/BackupStoreRefCountDatabase.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/lib/backupstore/BackupStoreRefCountDatabase.cpp b/lib/backupstore/BackupStoreRefCountDatabase.cpp
index b2ea1abd..86da0943 100644
--- a/lib/backupstore/BackupStoreRefCountDatabase.cpp
+++ b/lib/backupstore/BackupStoreRefCountDatabase.cpp
@@ -347,17 +347,22 @@ bool BackupStoreRefCountDatabase::RemoveReference(int64_t ObjectID)
return (refcount > 0);
}
-int BackupStoreRefCountDatabase::ReportChangesTo(BackupStoreRefCountDatabase& rOldRefs)
+int BackupStoreRefCountDatabase::ReportChangesTo(BackupStoreRefCountDatabase& rOldRefs,
+ int64_t ignore_object_id)
{
int ErrorCount = 0;
int64_t MaxOldObjectId = rOldRefs.GetLastObjectIDUsed();
int64_t MaxNewObjectId = GetLastObjectIDUsed();
for (int64_t ObjectID = BACKUPSTORE_ROOT_DIRECTORY_ID;
- ObjectID < std::max(MaxOldObjectId, MaxNewObjectId);
+ ObjectID <= std::max(MaxOldObjectId, MaxNewObjectId);
ObjectID++)
{
- typedef BackupStoreRefCountDatabase::refcount_t refcount_t;
+ if(ObjectID == ignore_object_id)
+ {
+ continue;
+ }
+
refcount_t OldRefs = (ObjectID <= MaxOldObjectId) ?
rOldRefs.GetRefCount(ObjectID) : 0;
refcount_t NewRefs = (ObjectID <= MaxNewObjectId) ?