diff options
author | Naohiro Aota <naohiro.aota@wdc.com> | 2022-07-09 08:18:39 +0900 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2022-07-25 17:45:41 +0200 |
commit | c2ae7b772ef4e86c5ddf3fd47bf59045ae96a414 (patch) | |
tree | 03acd4febbf00d7c0d4180f3817ae0253879f68f /fs/btrfs/ctree.h | |
parent | 65ea1b66482f415d51cd46515b02477257330339 (diff) |
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 <johannes.thumshirn@wdc.com>
Signed-off-by: Naohiro Aota <naohiro.aota@wdc.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/ctree.h')
-rw-r--r-- | fs/btrfs/ctree.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h index 64c65d0f7d06..b2a161227ac5 100644 --- a/fs/btrfs/ctree.h +++ b/fs/btrfs/ctree.h @@ -1070,6 +1070,8 @@ struct btrfs_fs_info { */ u64 zone_size; + /* Max size to emit ZONE_APPEND write command */ + u64 max_zone_append_size; struct mutex zoned_meta_io_lock; spinlock_t treelog_bg_lock; u64 treelog_bg; |