summaryrefslogtreecommitdiff
path: root/lib/backupstore/BackupStoreContext.cpp
Commit message (Collapse)AuthorAge
* Replace sprintf() with snprintf(), fixes compile warnings on OpenBSD.Chris Wilson2014-12-22
| | | | | And compile errors on recent MinGW.
* Add cache invalidation checks to BackupStoreDirectory.Chris Wilson2014-11-16
| | | | | | | | | | Allows us to catch programming errors related to use of a cached reference to a directory after the cache may have been invalidated by requesting another directory from the cache, which could clear it. In DEBUG builds, the cache is no longer cleared, but any entries in it are invalidated, which is effectively a memory leak, but these builds should only be used for running tests, where it doesn't matter.
* Whitespace, comment and readability fixesChris Wilson2014-10-31
|
* Improve directory cache messages in BackupStoreContext.Chris Wilson2014-09-04
| | | | May help to debug issues with directory cache invalidation in future.
* Simplify code with macros, update comments and fix whitespace.Chris Wilson2014-09-04
| | | | | | Hopefully all of these changes are inconsequential. Merged back changes from the test refactor branch to reduce diffs.
* Whitespace fixes.Chris Wilson2014-04-29
|
* Fix error when modifying a directory with missing entry in parent.Chris Wilson2014-04-29
| | | | This is hopefully the cause of the segfaults reported by Brendon Baumgartner.
* Directories' entries in parent directory should track current size.Chris Wilson2014-04-09
| | | | | | | | | | | | | | | | | | | | | | 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.
* Don't require passing the object ID into BackupStoreContext::SaveDirectory.Chris Wilson2014-04-09
| | | | | | | Passing the wrong object ID would just result in an assertion being thrown (in debug builds) or silently doing the wrong thing (in release builds). I can't see any useful use for this extra parameter, since we can get the container ID from the directory anyway.
* Don't pass AttributesModTime as the hash of the new directory's attributes.Chris Wilson2014-04-09
| | | | | An incorrect comment led me to believe that this parameter was the new directory's AttributesModTime, but actually it was its hash.
* Add QueryCreateDirectory2 command.Chris Wilson2014-03-02
| | | | | Allows creating a directory with a specified modtime (in the parent directory entry). Tests to come shortly.
* Fix crash in BackupStoreContext with no HousekeepingInterface pointer.Chris Wilson2014-02-27
| | | | | | Rename mrDaemon to mpHousekeeping and make it a pointer, so that it can officially be NULL, and don't crash if it is, and we fail to get a lock on the account.
* Check that adding a new directory doesn't exceed store limits.Chris Wilson2014-02-13
|
* Fix accounting for old and deleted files and blocks during backup operations.Chris Wilson2014-02-10
| | | | Adding and deleting files was not always accounted properly before.
* Add a ClearDirectoryCache method to BackupStoreContext.Chris Wilson2014-02-10
| | | | It's used in several places, and about to be one more.
* Reformat for readability, add defensive comment.Chris Wilson2014-02-10
|
* Rename BackupStoreInfo variable NumFiles to NumCurrentFiles.Chris Wilson2014-02-09
| | | | | Will hopefully prevent future confusion about the meaning of this info variable.
* Fix compile error.Chris Wilson2014-02-07
| | | | | | | | | | Caused by removal of BackupStoreRefCountDatabase::CreateForRegeneration. It's not safe to do this in housekeeping anyway, because it might not complete the scan, leaving an incomplete database, that might persuade BackupStoreContext that it's OK to delete an object that still really has references to it. If your refcount db disappears or is damaged, you need to run a check fix.
* Rename BackupStoreContext.GetStoreRoot() to GetAccountRoot().Chris Wilson2014-02-07
| | | | More accurate name for this variable.
* Add remote host and port to post-login login message, requested by Pete Jalajas.Chris Wilson2011-12-13
|
* Combine client and server protocols to make way for an offline/local protocol.Chris Wilson2011-08-27
| | | | | Rename ProtocolObject to Message.
* Major refactoring to make lib/backupclient depend on lib/backupstore ratherChris Wilson2011-04-26
than the other way around. This is needed to allow clients to have all the code that they'd need to implement local backups (using the Local protocol) in subsequent commits.