path: root/lib/backupstore
Commit message (Collapse)AuthorAge
* 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.
* 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.
* Add a BackupProtocolLocal2 convenience class.Chris Wilson2014-02-07
| | | | | Adds a nicer constructor and more helpful cleanup on QueryFinished() to the auto-generated BackupProtocolLocal.
* 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.
* 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.
* Repair damaged Box RAID objects and non-transformed .rfw files.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.
* 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
* 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
* 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.
* Improve variable names and comments.Chris Wilson2013-08-22
| | | | Makes the source code more readable.
* Improve error messages from BackupCommands.Chris Wilson2013-08-22
| | | | | | When a command is sent in the wrong phase, or a command that requires write access is sent to a read-only session, log an error message with the command details (and current phase in the former case).
* Pass std::auto_ptr objects to Protocol for upload.Chris Wilson2013-08-22
| | | | | | | | | | | Passing raw pointers is bad C++ style, and dangerous, because Protocol will free the passed-in pointers after uploading them, so we should not keep using them. Reduce code duplication in BackupClientDirectoryRecord patch/normal upload. Return a std::auto_ptr<BackupStoreFileEncodeStream> instead of a std::auto_ptr<IOStream> from BackupStoreFile::EncodeFile* functions.
* Allow getting the name of the current phase of a BackupStoreContext.Chris Wilson2013-08-21
| | | | | Useful for debugging when the phase is not as expected.
* Pass std::strings to functions instead of const char *, for C++ style.Chris Wilson2013-08-21
* Use THROW macro to report error getting file attributes.Chris Wilson2012-11-27
* Cosmetic improvements to bbstored log message tagging.Chris Wilson2012-11-18
* Finish incomplete checkin [3156].Chris Wilson2012-11-18
* Add a helper in BackupStoreAccounts to get a write lock on an account.Chris Wilson2012-11-18
| | | | | | Use it in two places to simplify code (not in BackupStoreContext yet, because that wants to communicate with HK process as well).
* Allow passing a std::string instead of char* to BackupStoreAccountDatabase,Chris Wilson2012-11-18
| | | | | for C++ style.
* Fix duplicate tagging of housekeeping messages.Chris Wilson2012-11-17
* Ensure that newly created accounts are enabled by default.Chris Wilson2012-11-08
* Fix missing #include for MemBlockStream.hChris Wilson2012-11-08
* Make CreateForRegeneration save the AccountEnabled flag and any extra dataChris Wilson2012-11-08
| | | | | copied from the original info file.
* Remove commented-out method copied from BackupStoreInfo and not used.Chris Wilson2012-11-07
* Replace magic number 1000 with MILLI_SEC_IN_SEC when initialising timers.Chris Wilson2012-11-07
| | | | | Add the start of ExperimentalSnapshotMode support.
* Refuse login to disabled accounts.Chris Wilson2012-10-22
* Keep and resave any extra data present at the end of a BackupStoreInfoChris Wilson2012-10-22
| | | | | | | | | version 2 (Archive) file, for forwards compatibility with future extensions to the file format. Add a flag for whether an account in enabled or not in the new v2 file format, and if it's not present, default to true.
* Wrap line for readability.Chris Wilson2012-10-22
* Add housekeep command to bbstoreaccounts to run housekeeping right now.Chris Wilson2012-06-29
* Revert r3106 as it causes compile failures not seen locally.Chris Wilson2012-05-04
* Move private variables out of hidden namespace to help debugging.Chris Wilson2012-04-28
* Cosmetic improvements in comments.Chris Wilson2012-04-28
* Add experimental "TCP Nice" mode, disabled by default.Chris Wilson2012-02-12
* Rename the BackupStoreDirectory::AddEntry's AttributesModTime parameter to ↵Chris Wilson2012-01-22
| | | | AttributesHash to avoid misleading the reader.
* Allow constructing a BackupClientFileAttributes from a struct EMU_STAT.Chris Wilson2012-01-22
* Add remote host and port to post-login login message, requested by Pete Jalajas.Chris Wilson2011-12-13
* Log the account name with connections, disconnections and statistics, ↵Chris Wilson2011-12-12
| | | | requested by Pete Jalajas.
* Use a macro to verify block count adjustments to reduce duplicate code.Chris Wilson2011-11-01
* Fix spelling error in AddUnattachedObject method name.Chris Wilson2011-11-01
* Allow getting the number of errors found by a store checker object.Chris Wilson2011-11-01
* Remove debugging code.Chris Wilson2011-11-01