History log of /haiku/src/add-ons/kernel/file_systems/btrfs/ExtentAllocator.h
Revision Date Author Comments
# 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>


# 4ffbc73f 08-Oct-2019 Adrien Destugues <pulkomandy@pulkomandy.tk>

btrfs: fix some warnings


# f10ebdb1 13-Mar-2019 brjhaiku <brjhaiku@gmail.com>

btrfs

* Fixed coding style for all files under /src/add-ons/kernel/file_systems/btrfs
* rewrote crc_table.cpp to generate CRCTable.cpp that conforms to coding style.

Change-Id: I90fcc143320c7a7e9a6dc174f0ad82f40bb8a9b6
Reviewed-on: https://review.haiku-os.org/c/1194
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>


# 99768086 29-Aug-2017 hyche <cvghy116@gmail.com>

BTRFS: Add author and license.

Signed-off-by: Augustin Cavalier <waddlesplash@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>