Commit Graph

114 Commits

Author SHA1 Message Date
Sebastian Messmer a2b07cd8e8 Merge branch 'hotfix/gcc11' into feature/gcc11 2021-05-08 14:46:32 -07:00
Sebastian Messmer 27587ea1ac Fixed an issue when compiling with GCC 11, see https://github.com/cryfs/cryfs/issues/389 2021-05-08 14:44:27 -07:00
Sebastian Messmer 68a4c5646a Fix clang-tidy warnings 2021-04-21 17:37:40 -07:00
Sebastian Messmer 42169308b3 Update boost 2021-04-18 00:49:26 -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 9c6713a00e Fix cryfs-stat 2018-11-10 12:38:57 -08:00
Sebastian Messmer 7ba57b4387 Improve blob initialization by using correct size 2018-09-26 20:27:40 -07:00
Sebastian Messmer 8d21e09159 Introduce fspp::num_bytes_t 2018-09-15 14:32:58 -07:00
Sebastian Messmer f439bf9d0f Remove c style casts and unaligned memory accesses 2017-12-03 19:01:41 +00:00
Sebastian Messmer 5fe3cada4c Enable some more clang-tidy checks and fix warnings 2017-10-29 16:35:10 +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 73aab31ade Make LoopThread noncopyable 2017-09-19 20:16:47 +01:00
Sebastian Messmer 5458af7c52 Rename blockstore::Key -> blockstore::BlockId 2017-09-17 02:07:27 +01:00
Sebastian Messmer f7c089ba47 Fix clang 5.0 compiler warnings 2017-09-16 17:45:15 +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 6ff0839e90 Add locking to blob 2016-07-14 16:36:30 +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 fce81f47ff Simplify code a bit and add assertions 2016-07-14 12:03:15 +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 58f2212043 Don't query size on traversal 2016-07-12 01:09:30 +02:00
Sebastian Messmer 582c9c1a4c Fix traversal 2016-07-12 01:04:33 +02:00