Commit Graph

56 Commits

Author SHA1 Message Date
Sebastian Messmer
68a4c5646a Fix clang-tidy warnings 2021-04-21 17:37:40 -07:00
Sebastian Messmer
efac089c76 - Add Clang 8 and GCC 9 to CI
- Switch clang-tidy to Clang 9
- Fix compiler and clang-tidy warnings produced by the previous points
2019-06-08 13:06:17 -07:00
Sebastian Messmer
8a5091b8a2 Add Blob::numNodes() 2019-01-26 11:19:25 -08:00
Sebastian Messmer
1da3e6cbae - Fix for reading empty files out of bounds
- Fixed race condition (https://github.com/cryfs/cryfs/issues/224 and https://github.com/cryfs/cryfs/issues/243)
2019-01-12 23:21:12 -08:00
Sebastian Messmer
6c006721a7 Make traversal exception safe 2019-01-06 10:25:50 -08:00
Sebastian Messmer
f439bf9d0f Remove c style casts and unaligned memory accesses 2017-12-03 19:01:41 +00:00
Sebastian Messmer
e38af1001d Remove unused using statements 2017-10-29 15:47:46 +00:00
Sebastian Messmer
76e7f7da72 Introduce clang-tidy and fix corresponding warnings 2017-10-27 04:02:51 +01:00
Sebastian Messmer
5458af7c52 Rename blockstore::Key -> blockstore::BlockId 2017-09-17 02:07:27 +01:00
Sebastian Messmer
b027f8c007 Merge from develop 2016-09-24 20:43:54 +02:00
Sebastian Messmer
46183976ee Fix missing virtual destructor and potential integer overflow 2016-09-21 20:07:20 +02:00
Sebastian Messmer
32f06f288a Fix tree traversal and add test case for it 2016-09-07 22:25:18 +02:00
Sebastian Messmer
904e3dd7a1 Merge 2016-09-07 22:07:56 +02:00
Sebastian Messmer
ea349cf79b Fix traversal bug and add test case for it 2016-09-07 19:02:41 +02:00
Sebastian Messmer
a4ce49aef4 Fix unique_ref test cases 2016-07-22 14:07:06 +02:00
Sebastian Messmer
64d26c2f6e Fix compiler error on older gcc 2016-07-22 12:58:59 +02:00
Sebastian Messmer
e38c0f1e8b Fix isRightBorderNode when growing trees 2016-07-17 10:32:59 +02:00
Sebastian Messmer
bbdd8a548b Special case treatment for traversals until exactly the last leaf has to load the last leaf to grow it. Before this commit, we just always loaded the last traversed leaf and checked its size. Now we only do so if it's the right border leaf. This saves us loading some leaves. 2016-07-17 10:16:09 +02:00
Sebastian Messmer
eab7cb1df4 Implement BlockStore::overwrite(). This is the last step in ensuring that the write() call doen't have to load leaves if they're only overwritten anyhow. 2016-07-16 11:42:06 +02:00
Sebastian Messmer
eb792daefc More preparations for not loading blocks in write() calls 2016-07-15 21:06:41 +02:00
Sebastian Messmer
d80b95514e Traversal doesn't load leaves, but returns the key. This way, the write() call can (after a future commit) write to full leaves without loading them beforehand. 2016-07-15 20:12:24 +02:00
Sebastian Messmer
582917c1f5 Improve code decreasing tree depth 2016-07-15 16:23:00 +02:00
Sebastian Messmer
b1b90b8c3d Further reduce number of nodes loaded when deleting a tree and write test cases for it 2016-07-15 15:42:34 +02:00
Sebastian Messmer
c428d5642a Minimize number of Block::write() calls when creating new nodes in a traversal. Also add test cases for it. 2016-07-15 12:48:20 +02:00
Sebastian Messmer
f42e08a5f6 Fix DataTree::key() when called while traversing 2016-07-14 17:56:47 +02:00
Sebastian Messmer
3f04a7411c If tree depth increases, and we already traversed the old tree, don't go into it again to grow its last leaf. 2016-07-14 14:23:15 +02:00
Sebastian Messmer
cbe122cb5f Add assertions 2016-07-14 13:23:36 +02:00
Sebastian Messmer
0bb6b320d4 Add asserts 2016-07-14 12:58:42 +02:00
Sebastian Messmer
0dbfdf3e2b When shrinking a tree, LeafTraverser takes care of decreasing tree depth, not DataTree anymore. This way, LeafTraverser is now responsible for increasing and decreasing depth as necessary. 2016-07-14 12:55:54 +02:00
Sebastian Messmer
35a4e42ba5 Small fixes in traversal algorithm 2016-07-14 12:38:25 +02:00
Sebastian Messmer
9e9369b9ed Performance optimization: When removing or shrinking a tree, we don't load/read leaves anymore. Loading inner nodes is enough to get all block IDs and then we can delete the leaves from their IDs without loading them. 2016-07-13 11:27:31 +02:00
Sebastian Messmer
7a68757599 Remove unneeded subtrees when shrinking tree 2016-07-13 07:08:53 +02:00
Sebastian Messmer
cf38eb0eb3 Use tree traversal to remove data tree. 2016-07-13 00:29:36 +02:00
Sebastian Messmer
508766d2f2 Fix traversal and add test cases 2016-07-13 00:22:35 +02:00
Sebastian Messmer
845b0b5239 Use LeafTraversor for resizing blobs 2016-07-12 20:36:12 +02:00
Sebastian Messmer
a19d79361c If a tree is grown by a traversal, the tree is kept in a balanced state as long as possible during the traversal 2016-07-12 09:57:56 +02:00
Sebastian Messmer
1bf20277e4 Removed unnecessary code 2016-07-12 01:10:27 +02:00
Sebastian Messmer
582c9c1a4c Fix traversal 2016-07-12 01:04:33 +02:00
Sebastian Messmer
98b85ea8b6 Started rewriting traversal 2016-07-10 22:57:39 +02:00
Sebastian Messmer
dde89da556 Improve traverseLeaves 2016-07-10 08:38:02 +02:00
Sebastian Messmer
e85019e95b Cache value of DataTree.numLeaves(). This should make read()/write() faster. 2016-07-05 23:56:44 -07:00
Sebastian Messmer
a242076ecc Performance improvement: Allow more parallelity when getting read()/write() syscalls to the same blob 2016-07-05 23:02:59 -07:00
Sebastian Messmer
1c0199e147 When the user specifies a block size for the file system, this is taken as the physical block size, not virtual block size. 2016-03-16 19:30:26 +00:00
Sebastian Messmer
4dbb380263 Decouple DirBlob from CryDevice 2016-03-08 23:47:31 +01:00
Sebastian Messmer
68acc27e88 Report file system statistics (like free space) to operating system 2016-02-15 14:20:21 +01:00
Sebastian Messmer
31672e086c Fix includes after merging repositories 2016-02-11 15:19:58 +01:00
Sebastian Messmer
31d52d3c8d Merged blobstore repository 2016-02-11 14:50:18 +01:00
Sebastian Messmer
3350e9368a Switch to biicode 2015-02-17 00:40:34 +01:00
Sebastian Messmer
f115e10f6d Implemented more tests for DataTreeTest 2015-01-28 01:02:32 +01:00
Sebastian Messmer
77b288a20a Written some first test cases for DataTree 2015-01-27 00:54:25 +01:00