Commit 97f97822 authored by Johannes Thumshirn's avatar Johannes Thumshirn Committed by David Sterba

btrfs: also add stripe entries for NOCOW writes

NOCOW writes do not generate stripe_extent entries in the RAID stripe
tree, as the RAID stripe-tree feature initially was designed with a
zoned filesystem in mind and on a zoned filesystem, we do not allow NOCOW
writes. But the RAID stripe-tree feature is independent from the zoned
feature, so we must also do NOCOW writes for RAID stripe-tree filesystems.
Reviewed-by: default avatarNaohiro Aota <naohiro.aota@wdc.com>
Signed-off-by: default avatarJohannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent 96c6ca71
...@@ -3111,6 +3111,11 @@ int btrfs_finish_one_ordered(struct btrfs_ordered_extent *ordered_extent) ...@@ -3111,6 +3111,11 @@ int btrfs_finish_one_ordered(struct btrfs_ordered_extent *ordered_extent)
ret = btrfs_update_inode_fallback(trans, inode); ret = btrfs_update_inode_fallback(trans, inode);
if (ret) /* -ENOMEM or corruption */ if (ret) /* -ENOMEM or corruption */
btrfs_abort_transaction(trans, ret); btrfs_abort_transaction(trans, ret);
ret = btrfs_insert_raid_extent(trans, ordered_extent);
if (ret)
btrfs_abort_transaction(trans, ret);
goto out; goto out;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment