]> www.infradead.org Git - users/jedix/linux-maple.git/commit
btrfs: add block reserve for treelog
authorNaohiro Aota <naohiro.aota@wdc.com>
Wed, 23 Apr 2025 02:43:52 +0000 (11:43 +0900)
committerDavid Sterba <dsterba@suse.com>
Thu, 15 May 2025 12:30:53 +0000 (14:30 +0200)
commit635da7ea9a12b1db28ab7db260e3d64108e18f15
treef026ab0e3af9e412959f13eb7de8eb43cee4dadc
parentdf0766407485ccae80a9142f7d1f4f105ff1016d
btrfs: add block reserve for treelog

We need to add a dedicated block_rsv for tree-log, because the block_rsv
serves for a tree node allocation in btrfs_alloc_tree_block(). Currently,
tree-log tree uses fs_info->empty_block_rsv, which is shared across trees
and points to the normal metadata space_info. Instead, we add a dedicated
block_rsv and that block_rsv can use the dedicated sub-space_info.

Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: Naohiro Aota <naohiro.aota@wdc.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/block-rsv.c
fs/btrfs/block-rsv.h
fs/btrfs/delalloc-space.c
fs/btrfs/disk-io.c
fs/btrfs/fs.h