linux-stable/fs/btrfs
Naohiro Aota a7e1ac7bdc btrfs: zoned: reserve zones for an active metadata/system block group
Ensure a metadata and system block group can be activated on write time, by
leaving a certain number of active zones when trying to activate a data
block group.

Zones for two metadata block groups (normal and tree-log) and one system
block group are reserved, according to the profile type: two zones per
block group on the DUP profile and one zone per block group otherwise.

The reservation must be freed once a non-data block group is allocated. If
not, we over-reserve the active zones and data block group activation will
suffer. For the dynamic reservation count, we need to manage the
reservation count per device.

The reservation count variable is protected by
fs_info->zone_active_bgs_lock.

Signed-off-by: Naohiro Aota <naohiro.aota@wdc.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2023-08-21 14:52:19 +02:00
..
tests btrfs: tests: add self tests for extent buffer memory operations 2023-08-21 14:52:16 +02:00
accessors.c
accessors.h btrfs: use helper sizeof_field in struct accessors 2023-08-21 14:52:13 +02:00
acl.c
acl.h
async-thread.c btrfs: use alloc_ordered_workqueue() to create ordered workqueues 2023-06-19 13:59:30 +02:00
async-thread.h btrfs: use alloc_ordered_workqueue() to create ordered workqueues 2023-06-19 13:59:30 +02:00
backref.c btrfs: fix backref walking not returning all inode refs 2023-05-09 22:09:11 +02:00
backref.h btrfs: fix backref walking not returning all inode refs 2023-05-09 22:09:11 +02:00
bio.c btrfs: add an ordered_extent pointer to struct btrfs_bio 2023-06-19 13:59:36 +02:00
bio.h btrfs: add an ordered_extent pointer to struct btrfs_bio 2023-06-19 13:59:36 +02:00
block-group.c btrfs: move btrfs_free_excluded_extents() into block-group.c 2023-08-21 14:52:13 +02:00
block-group.h btrfs: rename add_new_free_space() to btrfs_add_new_free_space() 2023-08-21 14:52:12 +02:00
block-rsv.c btrfs: account block group tree when calculating global reserve size 2023-07-20 19:22:54 +02:00
block-rsv.h btrfs: move btrfs_check_trunc_cache_free_space into block-rsv.c 2023-06-19 13:59:24 +02:00
btrfs_inode.h btrfs: reduce the number of arguments to btrfs_run_delalloc_range 2023-08-21 14:52:14 +02:00
check-integrity.c btrfs: rename __btrfs_map_block to btrfs_map_block 2023-06-19 13:59:34 +02:00
check-integrity.h
compression.c btrfs: make btrfs_compressed_bioset static 2023-06-19 17:01:44 +02:00
compression.h btrfs: pass an ordered_extent to btrfs_submit_compressed_write 2023-06-19 13:59:36 +02:00
ctree.c btrfs: replace BUG_ON() at split_item() with proper error handling 2023-06-19 13:59:39 +02:00
ctree.h btrfs: fix infinite directory reads 2023-08-14 16:17:37 +02:00
defrag.c btrfs: drop gfp from parameter extent state helpers 2023-06-19 13:59:30 +02:00
defrag.h
delalloc-space.c btrfs: count extents before taking inode's spinlock when reserving metadata 2023-04-17 18:01:19 +02:00
delalloc-space.h
delayed-inode.c btrfs: fix infinite directory reads 2023-08-14 16:17:37 +02:00
delayed-inode.h btrfs: fix infinite directory reads 2023-08-14 16:17:37 +02:00
delayed-ref.c btrfs: use a single switch statement when initializing delayed ref head 2023-06-19 13:59:32 +02:00
delayed-ref.h btrfs: use bool type for delayed ref head fields that are used as booleans 2023-06-19 13:59:32 +02:00
dev-replace.c btrfs: make find_first_extent_bit() return a boolean 2023-08-21 14:52:12 +02:00
dev-replace.h
dir-item.c
dir-item.h
discard.c btrfs: unexport btrfs_run_discard_work and make it static 2023-06-19 13:59:25 +02:00
discard.h btrfs: unexport btrfs_run_discard_work and make it static 2023-06-19 13:59:25 +02:00
disk-io.c btrfs: zoned: reserve zones for an active metadata/system block group 2023-08-21 14:52:19 +02:00
disk-io.h btrfs: make btrfs_cleanup_fs_roots() static 2023-08-21 14:52:18 +02:00
export.c
export.h
extent-io-tree.c btrfs: make find_first_extent_bit() return a boolean 2023-08-21 14:52:12 +02:00
extent-io-tree.h btrfs: make find_first_extent_bit() return a boolean 2023-08-21 14:52:12 +02:00
extent-tree.c btrfs: move comments to btrfs_loop_type definition 2023-08-21 14:52:16 +02:00
extent-tree.h btrfs: move btrfs_free_excluded_extents() into block-group.c 2023-08-21 14:52:13 +02:00
extent_io.c btrfs: zoned: defer advancing meta write pointer 2023-08-21 14:52:19 +02:00
extent_io.h btrfs: zoned: introduce block group context to btrfs_eb_write_context 2023-08-21 14:52:19 +02:00
extent_map.c btrfs: fix incorrect splitting in btrfs_drop_extent_map_range 2023-08-18 14:38:10 +02:00
extent_map.h btrfs: pass the new logical address to split_extent_map 2023-06-19 13:59:33 +02:00
file-item.c btrfs: use bbio->ordered in btrfs_csum_one_bio 2023-06-19 13:59:37 +02:00
file-item.h btrfs: optimize the logical to physical mapping for zoned writes 2023-06-19 13:59:32 +02:00
file.c - Yosry Ahmed brought back some cgroup v1 stats in OOM logs. 2023-06-28 10:28:11 -07:00
file.h
free-space-cache.c btrfs: print target number of bytes when dumping free space 2023-08-21 14:52:17 +02:00
free-space-cache.h btrfs: move btrfs_check_trunc_cache_free_space into block-rsv.c 2023-06-19 13:59:24 +02:00
free-space-tree.c btrfs: rename add_new_free_space() to btrfs_add_new_free_space() 2023-08-21 14:52:12 +02:00
free-space-tree.h btrfs: make clear_cache mount option to rebuild FST without disabling it 2023-05-10 14:51:27 +02:00
fs.c
fs.h btrfs: store the error that turned the fs into error state 2023-08-21 14:52:18 +02:00
inode-item.c btrfs: remove obsolete delayed ref throttling logic when truncating items 2023-04-17 18:01:19 +02:00
inode-item.h btrfs: move split_flags/combine_flags helpers to inode-item.h 2023-06-19 13:59:25 +02:00
inode.c btrfs: return real error when orphan cleanup fails due to a transaction abort 2023-08-21 14:52:18 +02:00
ioctl.c for-6.5/block-2023-06-23 2023-06-26 12:47:20 -07:00
ioctl.h
Kconfig btrfs: deprecate integrity checker feature 2023-08-21 14:52:13 +02:00
locking.c btrfs: add block-group tree to lockdep classes 2023-06-19 13:59:35 +02:00
locking.h btrfs: locking: use atomic for DREW lock writers 2023-04-17 18:01:17 +02:00
lru_cache.c
lru_cache.h btrfs: remove btrfs_lru_cache_is_full() inline function 2023-04-17 18:01:18 +02:00
lzo.c btrfs: disable allocation warnings for compression workspaces 2023-06-19 13:59:34 +02:00
Makefile
messages.c btrfs: store the error that turned the fs into error state 2023-08-21 14:52:18 +02:00
messages.h btrfs: print assertion failure report and stack trace from the same line 2023-06-19 13:59:31 +02:00
misc.h btrfs: export bitmap_test_range_all_{set,zero} 2023-06-19 13:59:22 +02:00
ordered-data.c btrfs: remove btrfs_writepage_endio_finish_ordered 2023-08-21 14:52:14 +02:00
ordered-data.h btrfs: add a btrfs_finish_ordered_extent helper 2023-06-19 13:59:37 +02:00
orphan.c
orphan.h
print-tree.c btrfs: print-tree: pass const extent buffer pointer 2023-06-19 13:59:22 +02:00
print-tree.h btrfs: print-tree: pass const extent buffer pointer 2023-06-19 13:59:22 +02:00
props.c
props.h
qgroup.c btrfs: avoid start and commit empty transaction when flushing qgroups 2023-08-21 14:52:18 +02:00
qgroup.h
raid56.c btrfs: tracepoints: simplify raid56 events 2023-08-21 14:52:12 +02:00
raid56.h btrfs: raid56: remove unused BTRFS_RBIO_REBUILD_MISSING 2023-08-21 14:52:12 +02:00
rcu-string.h
ref-verify.c
ref-verify.h
reflink.c
reflink.h
relocation.c btrfs: make find_first_extent_bit() return a boolean 2023-08-21 14:52:12 +02:00
relocation.h btrfs: pass an ordered_extent to btrfs_reloc_clone_csums 2023-06-19 13:59:36 +02:00
root-tree.c
root-tree.h
scrub.c btrfs: scrub: remove unused btrfs_path in scrub_simple_mirror() 2023-08-21 14:52:13 +02:00
scrub.h btrfs: scrub: remove scrub_bio structure 2023-04-17 18:01:24 +02:00
send.c btrfs: send: do not BUG_ON() on unexpected symlink data extent 2023-06-19 13:59:39 +02:00
send.h
space-info.c btrfs: avoid starting and committing empty transaction when flushing space 2023-08-21 14:52:18 +02:00
space-info.h btrfs: update documentation for BTRFS_RESERVE_FLUSH_EVICT flush method 2023-04-17 18:01:18 +02:00
subpage.c btrfs: stop setting PageError in the data I/O path 2023-06-19 13:59:35 +02:00
subpage.h btrfs: stop setting PageError in the data I/O path 2023-06-19 13:59:35 +02:00
super.c btrfs: deprecate integrity checker feature 2023-08-21 14:52:13 +02:00
super.h
sysfs.c btrfs: sysfs: show if ACL support has been compiled in 2023-08-21 14:52:12 +02:00
sysfs.h
transaction.c btrfs: update comment for btrfs_join_transaction_nostart() 2023-08-21 14:52:17 +02:00
transaction.h btrfs: don't hold an extra reference for redirtied buffers 2023-06-19 13:59:26 +02:00
tree-checker.c for-6.5-rc5-tag 2023-08-12 13:28:55 -07:00
tree-checker.h btrfs: move btrfs_verify_level_key into tree-checker.c 2023-06-19 13:59:25 +02:00
tree-log.c btrfs: remove redundant initialization of variables in log_new_ancestors 2023-08-21 14:52:12 +02:00
tree-log.h btrfs: change for_rename argument of btrfs_record_unlink_dir() to bool 2023-06-19 13:59:26 +02:00
tree-mod-log.c btrfs: avoid tree mod log ENOMEM failures when we don't need to log 2023-06-19 13:59:38 +02:00
tree-mod-log.h
ulist.c
ulist.h
uuid-tree.c
uuid-tree.h
verity.c
verity.h
volumes.c btrfs: merge find_free_dev_extent() and find_free_dev_extent_start() 2023-08-21 14:52:18 +02:00
volumes.h btrfs: make find_free_dev_extent() static 2023-08-21 14:52:18 +02:00
xattr.c fs: drop unused posix acl handlers 2023-03-06 09:57:12 +01:00
xattr.h
zlib.c btrfs: disable allocation warnings for compression workspaces 2023-06-19 13:59:34 +02:00
zoned.c btrfs: zoned: reserve zones for an active metadata/system block group 2023-08-21 14:52:19 +02:00
zoned.h btrfs: zoned: reserve zones for an active metadata/system block group 2023-08-21 14:52:19 +02:00
zstd.c btrfs: disable allocation warnings for compression workspaces 2023-06-19 13:59:34 +02:00