]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
btrfs: zoned: don't zone append to conventional zone
authorJohannes Thumshirn <johannes.thumshirn@wdc.com>
Thu, 4 Dec 2025 12:42:23 +0000 (13:42 +0100)
committerDavid Sterba <dsterba@suse.com>
Tue, 3 Feb 2026 05:38:31 +0000 (06:38 +0100)
commitb39b26e017c7889181cb84032e22bef72e81cf29
tree012d0904274859daa82c7b4e1906d05c2065b7f1
parentadb0af40fe89fd42f1ef277bf60d9cfa7c2ae472
btrfs: zoned: don't zone append to conventional zone

In case of a zoned RAID, it can happen that a data write is targeting a
sequential write required zone and a conventional zone. In this case the
bio will be marked as REQ_OP_ZONE_APPEND but for the conventional zone,
this needs to be REQ_OP_WRITE.

The setting of REQ_OP_ZONE_APPEND is deferred to the last possible time in
btrfs_submit_dev_bio(), but the decision if we can use zone append is
cached in btrfs_bio.

CC: Naohiro Aota <naohiro.aota@wdc.com>
Fixes: e9b9b911e03c ("btrfs: add raid stripe tree to features enabled with debug config")
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Naohiro Aota <naohiro.aota@wdc.com>
Signed-off-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/bio.c
fs/btrfs/bio.h