]> Git Repo - linux.git/commit
btrfs: zoned: revive max_zone_append_bytes
authorNaohiro Aota <[email protected]>
Fri, 8 Jul 2022 23:18:39 +0000 (08:18 +0900)
committerDavid Sterba <[email protected]>
Mon, 25 Jul 2022 15:45:41 +0000 (17:45 +0200)
commitc2ae7b772ef4e86c5ddf3fd47bf59045ae96a414
tree03acd4febbf00d7c0d4180f3817ae0253879f68f
parent65ea1b66482f415d51cd46515b02477257330339
btrfs: zoned: revive max_zone_append_bytes

This patch is basically a revert of commit 5a80d1c6a270 ("btrfs: zoned:
remove max_zone_append_size logic"), but without unnecessary ASSERT and
check. The max_zone_append_size will be used as a hint to estimate the
number of extents to cover delalloc/writeback region in the later commits.

The size of a ZONE APPEND bio is also limited by queue_max_segments(), so
this commit considers it to calculate max_zone_append_size. Technically, a
bio can be larger than queue_max_segments() * PAGE_SIZE if the pages are
contiguous. But, it is safe to consider "queue_max_segments() * PAGE_SIZE"
as an upper limit of an extent size to calculate the number of extents
needed to write data.

Reviewed-by: Johannes Thumshirn <[email protected]>
Signed-off-by: Naohiro Aota <[email protected]>
Signed-off-by: David Sterba <[email protected]>
fs/btrfs/ctree.h
fs/btrfs/zoned.c
fs/btrfs/zoned.h
This page took 0.043294 seconds and 4 git commands to generate.