Sebastian Messmer
|
839a511c4d
|
When an integrity violation is detected, any further access to the file system is blocked. This ensures that the user notices the integrity violation.
|
2016-06-26 22:15:52 -07:00 |
|
Sebastian Messmer
|
c84a230afd
|
VersionCountingBlockStore is initialized with a flag, saying whether missing blocks are integrity errors. This flag is meant to be activated in a single-client scenario to have this additional integrity check.
|
2016-06-26 22:15:52 -07:00 |
|
Sebastian Messmer
|
e02021ecdc
|
Throw an IntegrityViolationError exception instead of just logging integrity violations. This makes sure the user notices.
|
2016-06-26 22:15:52 -07:00 |
|
Sebastian Messmer
|
d306f4872e
|
Fix merge error
|
2016-06-26 22:15:52 -07:00 |
|
Sebastian Messmer
|
fd5dd2c6e1
|
New way of handling block deletions: Set last-update-client-id to zero instead of increasing version number. This has the same effect (i.e. invalidates all known block versions) and it additionally allows for checking in a local list whether a block is deleted or not.
|
2016-06-26 22:15:52 -07:00 |
|
Sebastian Messmer
|
ee1f0f4d3a
|
Warn in migration that it might take a while
|
2016-06-26 22:15:52 -07:00 |
|
Sebastian Messmer
|
86c2144a37
|
Implement migration from file systems without version numbers
|
2016-06-26 22:15:52 -07:00 |
|
Sebastian Messmer
|
f9a10eea4d
|
Fix VersionCountingBlock::resize()
|
2016-06-26 22:15:52 -07:00 |
|
Sebastian Messmer
|
473e9cc8bb
|
Fix compiler errors
|
2016-06-26 22:15:52 -07:00 |
|
Sebastian Messmer
|
1a72d3c226
|
Deleting a block doesn't set the version number to MAX_UINT64, but just increases it by one. This makes sure, that if (in case of a synchronization conflict) the block is reintroduced by another client, this is accepted.
|
2016-06-26 22:15:52 -07:00 |
|
Sebastian Messmer
|
5534b56ce3
|
When increasing the version number, don't only look at the version number in the block, but also at the last version number given to it by the current client. Ensure, the new version number is higher than both.
|
2016-06-26 22:15:52 -07:00 |
|
Sebastian Messmer
|
577c697856
|
When a client deletes a block, it will never again accept it as a valid block.
|
2016-06-26 22:15:52 -07:00 |
|
Sebastian Messmer
|
e7ac9bec57
|
Implement BlockStore::forEachBlock
|
2016-06-26 22:15:52 -07:00 |
|
Sebastian Messmer
|
4d1f7a46b9
|
* Prevent rollback to the "newest" version of a client when this version was superseded by a version from a different client.
* Use mutex/locks to secure access to KnownBlockVersions
|
2016-06-26 22:15:52 -07:00 |
|
Sebastian Messmer
|
263c540cd0
|
Make sure, ClientIdAndBlockKey.h includes all its dependencies
|
2016-06-26 22:15:52 -07:00 |
|
Sebastian Messmer
|
ea3de7360c
|
* Block versions don't have to be globally nondecreasing, but only per client id. This solves potential synchronization conflicts in a multi-client setting.
* Use cpputils::Serializer and cpputils::Deserializer instead of std::ifstream for storing/loading the block version list
|
2016-06-26 22:15:52 -07:00 |
|
Sebastian Messmer
|
de692c1ee4
|
Store number of entries at beginning of integrity file, so loading can be faster using unordered_map::reserve()
|
2016-06-26 22:15:52 -07:00 |
|
Sebastian Messmer
|
adb10343d2
|
Only hash key once if key not found, i.e. use [] instead of find() and then emplace()
|
2016-06-26 22:15:52 -07:00 |
|
Sebastian Messmer
|
9da30e3c17
|
Remove redundant nullbyte
|
2016-06-26 22:15:52 -07:00 |
|
Sebastian Messmer
|
57af168cfd
|
Store own client id into the block next to the version number. This will be used to fix synchronization conflicts where the version number on one clients progresses slower than on another client, but synchronizes later.
|
2016-06-26 22:15:52 -07:00 |
|
Sebastian Messmer
|
13411c4e59
|
Integrity data from KnownBlockVersions is persisted to a file
|
2016-06-26 22:15:52 -07:00 |
|
Sebastian Messmer
|
d7f547dd47
|
Implement a VersionCountingBlockStore that checks that version numbers are nondecreasing. Currently, the block store is not used yet and the state is not stored over different runs of CryFS. This comes with future commits.
|
2016-06-26 22:15:52 -07:00 |
|