btrfs: zoned: cache if block group is on a sequential zone
authorJohannes Thumshirn <johannes.thumshirn@wdc.com>
Thu, 4 Feb 2021 10:22:03 +0000 (19:22 +0900)
committerDavid Sterba <dsterba@suse.com>
Tue, 9 Feb 2021 01:46:05 +0000 (02:46 +0100)
commit08f455593fff701e103876d4db5d3f4f6d0ff871
tree21c7fd1247437897726a182c1b9eb91bdbae267f
parent138082f36610698e3fd00318f275d7f2159b8d26
btrfs: zoned: cache if block group is on a sequential zone

On a zoned filesystem, cache if a block group is on a sequential write
only zone.

On sequential write only zones, we can use REQ_OP_ZONE_APPEND for
writing data, therefore provide btrfs_use_zone_append() to figure out if
IO is targeting a sequential write only zone and we can use
REQ_OP_ZONE_APPEND for data writing.

Reviewed-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/block-group.h
fs/btrfs/zoned.c
fs/btrfs/zoned.h