Message ID | 20221212073724.12637-6-hch@lst.de (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [1/7] btrfs: use file_offset to limit bios size in calc_bio_boundaries | expand |
Looks good,
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
diff --git a/fs/btrfs/zoned.c b/fs/btrfs/zoned.c index 77f453005dc924..af063089ad3465 100644 --- a/fs/btrfs/zoned.c +++ b/fs/btrfs/zoned.c @@ -1636,6 +1636,9 @@ bool btrfs_use_zone_append(struct btrfs_bio *bbio) if (!is_data_inode(&inode->vfs_inode)) return false; + if (btrfs_op(&bbio->bio) != BTRFS_MAP_WRITE) + return false; + /* * Using REQ_OP_ZONE_APPNED for relocation can break assumptions on the * extent layout the relocation code has.
Using Zone Append only makes sense for writes to the device, so check that in btrfs_use_zone_append. This avoids the possibility of artificially limited read size on zoned file systems. Signed-off-by: Christoph Hellwig <hch@lst.de> --- fs/btrfs/zoned.c | 3 +++ 1 file changed, 3 insertions(+)