OSDN Git Service

btrfs: split zone append bios in btrfs_submit_bio
authorChristoph Hellwig <hch@lst.de>
Sat, 21 Jan 2023 06:50:30 +0000 (07:50 +0100)
committerDavid Sterba <dsterba@suse.com>
Wed, 15 Feb 2023 18:38:53 +0000 (19:38 +0100)
commitd5e4377d505189c30df50d54f9944d7fb8d528bb
tree6eb5e035002e63d9ef931934b30199bca9fc3b75
parent243cf8d1b6737d4b53ac16b211987bbd299478e6
btrfs: split zone append bios in btrfs_submit_bio

The current btrfs zoned device support is a little cumbersome in the data
I/O path as it requires the callers to not issue I/O larger than the
supported ZONE_APPEND size of the underlying device.  This leads to a lot
of extra accounting.  Instead change btrfs_submit_bio so that it can take
write bios of arbitrary size and form from the upper layers, and just
split them internally to the ZONE_APPEND queue limits.  Then remove all
the upper layer warts catering to limited write sized on zoned devices,
including the extra refcount in the compressed_bio.

Reviewed-by: Josef Bacik <josef@toxicpanda.com>
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/bio.c
fs/btrfs/compression.c
fs/btrfs/compression.h
fs/btrfs/extent_io.c
fs/btrfs/inode.c
fs/btrfs/zoned.c
fs/btrfs/zoned.h