#
c5e9dd9b |
|
10-Jan-2020 |
Adrien Destugues <pulkomandy@pulkomandy.tk> |
Fix btrfs_shell build The hacks to still use actual system headers for zlib didn't quite work. - Define Z_SOLO, which makes zlib build without any system include - Remove use of std::max and #include <algorithm> from AVLTree - Do not include DebugSupport.h because it uses system headers - Do not include uuid.h and define just what we need Now it's possible to compile the btrfs_shell on Linux. Change-Id: I74a14b5f6804db45ab5a9f582ab493d696376fd3 Reviewed-on: https://review.haiku-os.org/c/haiku/+/2098 Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
|
#
af419b0e |
|
13-Aug-2017 |
hyche <cvghy116@gmail.com> |
BTRFS: Implement ExtentAllocator There are 4 new classes, structs: * CachedExtent, is a AVLTreeNode, caches the extent locating in extent tree, a extent can be free, allocated, metadata or a data extent. It also hold a references count, that is incremented each time a new extent refer to it (COW) and item data, that is only for allocated extent (NULL for free). * CachedTreeExtent, is a AVLTree, cache the whole extent tree and has CachedExtent as its node. * BlockGroup represents the group of extents that represent the region for each type of allocated extent. For example, region for data extents, metada blocks. It responsible for inserting nodes in CachedTreeExtent. * And the final, ExtentAllocator it knows how to allocate/deallocate extents, but for now only the allocating is implemented, actually allocating and deallocating works are already implemented, they are in functions _AddFreeExtent, _AddAllocatedExtent in CachedTreeExtent. However the deallocating is not needed for now, so it will be finished later then. Signed-off-by: Augustin Cavalier <waddlesplash@gmail.com>
|