summaryrefslogtreecommitdiff
path: root/fs/xfs
diff options
context:
space:
mode:
authorJohannes Thumshirn <johannes.thumshirn@wdc.com>2021-05-18 18:40:28 +0300
committerDavid Sterba <dsterba@suse.com>2021-05-20 16:51:07 +0300
commit764c7c9a464b68f7c6a5a9ec0b923176a05e8e8f (patch)
tree40fb1fea29573fe90c6473331d4285d275f36c14 /fs/xfs
parente380adfc213a13677993c0e35cb48f5a8e61ebb0 (diff)
downloadlinux-764c7c9a464b68f7c6a5a9ec0b923176a05e8e8f.tar.xz
btrfs: zoned: fix parallel compressed writes
When multiple processes write data to the same block group on a compressed zoned filesystem, the underlying device could report I/O errors and data corruption is possible. This happens because on a zoned file system, compressed data writes where sent to the device via a REQ_OP_WRITE instead of a REQ_OP_ZONE_APPEND operation. But with REQ_OP_WRITE and parallel submission it cannot be guaranteed that the data is always submitted aligned to the underlying zone's write pointer. The change to using REQ_OP_ZONE_APPEND instead of REQ_OP_WRITE on a zoned filesystem is non intrusive on a regular file system or when submitting to a conventional zone on a zoned filesystem, as it is guarded by btrfs_use_zone_append. Reported-by: David Sterba <dsterba@suse.com> Fixes: 9d294a685fbc ("btrfs: zoned: enable to mount ZONED incompat flag") CC: stable@vger.kernel.org # 5.12.x: e380adfc213a13: btrfs: zoned: pass start block to btrfs_use_zone_append CC: stable@vger.kernel.org # 5.12.x Signed-off-by: Johannes Thumshirn <johannes.thumshirn@wdc.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/xfs')
0 files changed, 0 insertions, 0 deletions