summaryrefslogtreecommitdiff
path: root/lib
Commit message (Collapse)AuthorAge
...
* 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.
* Update copyright to 2014.Chris Wilson2014-02-10
|
* Include the filename in NamedLock exception messages.Chris Wilson2014-02-10
|
* 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
|
* Fix wrong output of client store marker in bbstoraccounts info.Chris Wilson2014-02-10
|
* Fix testbackupstore, apart from wrong accounting for old files.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 wrong handling of objects with multiple references in housekeeping.Chris Wilson2014-02-09
| | | | | | We don't have a test for it yet, and won't until snapshots are implemented, but it's a bad idea to merge patches to remove an old version when another directory is still holding a reference to the patch.
* Fix accounting in bbstoreaccounts check.Chris Wilson2014-02-09
| | | | | | Fix accounting for current, old and deleted files and blocks. Previously there was confusion over the meaning of NumFiles, now it's defined to mean the number of current files (neither old nor deleted), similar to BlocksInCurrentFiles.
* The user asked us to fix errors, so it's not a very important notification ↵Chris Wilson2014-02-09
| | | | that we're doing so.
* Allow a logging tagger to temporarily replace the current tag.Chris Wilson2014-02-08
| | | | | | Sometimes useful to replace instead of appending to the current tag. The old tag will be reinstated when the tagger is destroyed.
* Add a logging guard that temporarily enables tagging on the console.Chris Wilson2014-02-08
| | | | | This is useful for disambiguating messages coming from different parts of the application when looking at console output.
* Allow checking whether console logging is currently tagged.Chris Wilson2014-02-08
|
* Add new exception to denote a corrupt refcount db.Chris Wilson2014-02-07
|
* 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.
* Create new refcount database atomically during account check.Chris Wilson2014-02-07
| | | | | | | | | | | Use a temporary refcount db for check instead of an in-memory vector. This avoid the memory usage problems created by using the vector on large accounts, but may require us to improve the efficiency of the refcount database itself to avoid large numbers of small I/O operations. That is very doable now that we're using a class for it. Fix some inconsistencies and mistakes in handling reference counts and info counters during account checks (more to come).
* Fix compile error.Chris Wilson2014-02-07
| | | | | Caused by premature switch from GetNumFiles to GetNumCurrentFiles.
* Don't write #include statements for empty filenames.Chris Wilson2014-02-07
|
* Add an AccountUsage2 command to backup protocol.Chris Wilson2014-02-07
| | | | | Allows us to get information about the account that's not available using the old AccountUsage command. Currently only used in tests.
* Rename $cmd_class to $cmd_classes.Chris Wilson2014-02-07
| | | | Makes code easier to read.
* Move the comment to somewhere more useful.Chris Wilson2014-02-07
|
* Allow InvisibleTempFileStream to take a std::string.Chris Wilson2014-02-07
| | | | For C++ style.
* Don't need to protect InvisibleTempFileStream against exceptions.Chris Wilson2014-02-07
| | | | | | | By definition, it will be cleared up by the OS automatically. Also we don't need to support gcc 2.x any more. It was replaced by gcc3 in 2001, 12 years ago.
* Include filename in FileStream exception messages.Chris Wilson2014-02-07
| | | | Helps with debugging based on exception messages alone.
* Revert "Revert "Fix compile error introduced by bbstoreaccounts refactor.""Chris Wilson2014-02-07
| | | | | | This reverts commit b3bc7ad5be2c5b2588793aaa9fbc05e4a1c0aea5. Should not have been applied in SVN (not just yet, anyway).
* Rename BackupStoreContext.GetStoreRoot() to GetAccountRoot().Chris Wilson2014-02-07
| | | | More accurate name for this variable.
* Revert "Fix compile error introduced by bbstoreaccounts refactor."Chris Wilson2014-02-07
| | | | This reverts commit 9d0580c58025ba94bee02cdc2aae3fe0b6ccf604.
* Fix compile error introduced by bbstoreaccounts refactor.Chris Wilson2014-02-07
|
* Add ReleaseWriteLock to BackupStoreContext.Chris Wilson2014-02-07
| | | | Not really an API, but useful for BackupProtocolLocal2.
* Close syslog before checking for files left open in tests.Chris Wilson2014-02-07
| | | | Otherwise we might detect the opened syslog socket as a leaked file descriptor.
* Add a BackupProtocolLocal2 convenience class.Chris Wilson2014-02-07
| | | | | Adds a nicer constructor and more helpful cleanup on QueryFinished() to the auto-generated BackupProtocolLocal.
* Add ReceiveStream to protocol callable base class.Chris Wilson2014-02-07
| | | | | So we can call it on either a Client or a Local protocol object, without having to know which it is, or cast it.
* Split bbstoreaccounts commands out into a separate class.Chris Wilson2014-02-07
| | | | | Allows us to call them from tests without shelling out, making debugging easier.
* Files are allowed to be both Old and Deleted.Chris Wilson2013-10-02
| | | | Count them as Deleted, not as Old.
* Fix getopt header confusion.Chris Wilson2013-09-30
| | | | | | | | Our copy of getopt.h in lib/win32 was beating the system getopt.h in the search path, and providing different definitions, which clang picked up. Renamed our getopt.h to bsd_getopt.h, and added a box_getopt.h to decide whether to include this one instead of the system getopt.h.
* Clang complains that numDelObj is not initialised.Chris Wilson2013-09-28
| | | | | | | I don't think this has any effect in practice, but this patch ensures that it is initialised anyway.
* mSubType is unsigned, so clang complains that it can't be less than zero.Chris Wilson2013-09-28
|
* Repair damaged Box RAID objects and non-transformed .rfw files.Chris Wilson2013-09-20
|
* Add a comment about removing one RaidFileWrite constructor.Chris Wilson2013-09-20
|
* Ensure that all errors that increment mNumberErrorsFound are reported as ↵Chris Wilson2013-09-19
| | | | | | | BOX_ERROR. Remove debugging code for Sune Molgaard's issue with non-existent files.
* Add calloc() support to memory leak finder.Chris Wilson2013-09-19
|
* Report everything that increases mNumberErrorsFound as a BOX_ERROR.Chris Wilson2013-09-19
|
* Add missing definition of CheckDirectory, fix CheckDirectoryEntry prototype.Chris Wilson2013-09-19
|
* Fix misleading exception thrown.Chris Wilson2013-09-19
|
* Repeatedly "fix" directories until all errors are cleared.Chris Wilson2013-09-19
| | | | | | | Fixes some cases where a directory might refer to an object that doesn't exist, which is removed from the directory, but an object that depends on it (a patch) isn't removed, and requires a subsequent recheck.
* Fix missing include, thanks Arnaud.Chris Wilson2013-09-02
|
* Set process title on Windows.Chris Wilson2013-08-25
| | | | | | Thanks to Arnaud for submitting the patch: "I propose a little patch to enable the SetProcessTitle function on windows system."
* Improve debugging messages after repairing a directory.Chris Wilson2013-08-22
| | | | | | | | | | | Report whether the directory still had errors after the first pass of dir.CheckAndFix(), and also whether a file is marked as both Old and Deleted, which means that its block usage is not accounted for anywhere. There's possibly still a bug here where an invalid directory entry that is itself a directory may not result in the parent directory being marked as isModified and written back out afterwards, which may be what's happening to Markus Grunwald (failure to correct the error with "check fix").
* Fix a bug where bbstoreaccounts check could hang or crash.Chris Wilson2013-08-22
| | | | | | | It's not safe to use an iterator after the underlying collection has been modified. We need to restart iterating over the directory in that case. Otherwise we could loop forever looking for an end() that we've already passed, or start accessing unallocated memory.