| Commit message (Collapse) | Author | Age |
| |
|
|
|
|
| |
Just like adding a file does.
|
|
|
|
|
| |
Allows creating a directory with a specified modtime (in the parent directory entry).
Tests to come shortly.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We pass a std::auto_ptr<SocketStream> to every Protocol subclass when we
construct it, and it takes control of this object. This reduces the risk of:
* accidentally reusing the same SocketStream for multiple Protocols
(it happened to me in testbackupstore);
* holding onto a reference to the SocketStream;
* allowing a locally-scoped SocketStream to go out of scope and be released
while still being referenced by a live Protocol.
|
|
|
|
|
|
|
| |
Reading extended attributes may fail with an error if the file was removed
(race condition) or in tests when generating random nonexistent directory
entries. Handle this more gracefully by not backing up the extended attributes
instead of dying completely.
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
Was introduced by commit bc8261347880b813af58c4b873e1847cca03778d.
|
| |
|
|
|
|
| |
Fix previous changes by waiting for forked bbstored process during termination.
|
| |
|
| |
|
|
|
|
| |
Useful in tests.
|
|
|
|
| |
Saves ~2 lines each time it's used. And we use it a lot in testbackupstore.
|
|
|
|
|
| |
There could be many reasons for this, including an invalid object being
deleted during the previous check run. And it's definitely not serious.
|
|
|
|
|
| |
Also pass the actual reference count of an object to RaidFileWrite instead
of assuming that it's zero, to avoid accidentally deleting a referenced object.
|
|
|
|
| |
Adding and deleting files was not always accounted properly before.
|
|
|
|
| |
It's used in several places, and about to be one more.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Will hopefully prevent future confusion about the meaning of this info
variable.
|
|
|
|
|
|
| |
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 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.
|
|
|
|
| |
that we're doing so.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
| |
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).
|
|
|
|
|
| |
Caused by premature switch from GetNumFiles to GetNumCurrentFiles.
|
|
|
|
|
| |
Allows us to get information about the account that's not available
using the old AccountUsage command. Currently only used in tests.
|
| |
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
This reverts commit b3bc7ad5be2c5b2588793aaa9fbc05e4a1c0aea5.
Should not have been applied in SVN (not just yet, anyway).
|
|
|
|
| |
More accurate name for this variable.
|
|
|
|
| |
This reverts commit 9d0580c58025ba94bee02cdc2aae3fe0b6ccf604.
|
| |
|
|
|
|
| |
Not really an API, but useful for BackupProtocolLocal2.
|
|
|
|
|
| |
Adds a nicer constructor and more helpful cleanup on QueryFinished()
to the auto-generated BackupProtocolLocal.
|
|
|
|
|
| |
Allows us to call them from tests without shelling out, making debugging
easier.
|
|
|
|
| |
Count them as Deleted, not as Old.
|
|
|
|
|
|
|
| |
I don't think this has any effect in practice, but this patch ensures
that it is initialised anyway.
|
| |
|
|
|
|
|
|
|
| |
BOX_ERROR.
Remove debugging code for Sune Molgaard's issue with non-existent files.
|
| |
|
| |
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
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").
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Makes the source code more readable.
|