btrfs: introduce max_zone_append_size
authorNaohiro Aota <naohiro.aota@wdc.com>
Tue, 10 Nov 2020 11:26:09 +0000 (20:26 +0900)
committerDavid Sterba <dsterba@suse.com>
Wed, 9 Dec 2020 18:16:04 +0000 (19:16 +0100)
commit862931c76327e54d49c30d80c333f552dca18489
tree2754b1621ecb194104192d4973340fb7e8321f7f
parentb70f509774ad4b75d4253ad23b65c35d89402026
btrfs: introduce max_zone_append_size

The zone append write command has a maximum IO size restriction it
accepts. This is because a zone append write command cannot be split, as
we ask the device to place the data into a specific target zone and the
device responds with the actual written location of the data.

Introduce max_zone_append_size to zone_info and fs_info to track the
value, so we can limit all I/O to a zoned block device that we want to
write using the zone append command to the device's limits.

Reviewed-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: Naohiro Aota <naohiro.aota@wdc.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/ctree.h
fs/btrfs/zoned.c
fs/btrfs/zoned.h