Skip to content

Commit 97f9782

Browse files
morbidrsakdave
authored andcommitted
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: Naohiro Aota <[email protected]> Signed-off-by: Johannes Thumshirn <[email protected]> Signed-off-by: David Sterba <[email protected]>
1 parent 96c6ca7 commit 97f9782

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

fs/btrfs/inode.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3111,6 +3111,11 @@ int btrfs_finish_one_ordered(struct btrfs_ordered_extent *ordered_extent)
31113111
ret = btrfs_update_inode_fallback(trans, inode);
31123112
if (ret) /* -ENOMEM or corruption */
31133113
btrfs_abort_transaction(trans, ret);
3114+
3115+
ret = btrfs_insert_raid_extent(trans, ordered_extent);
3116+
if (ret)
3117+
btrfs_abort_transaction(trans, ret);
3118+
31143119
goto out;
31153120
}
31163121

0 commit comments

Comments
 (0)