Skip to content
/ linux Public
forked from torvalds/linux

Commit

Permalink
btrfs: also add stripe entries for NOCOW writes
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
morbidrsa authored and kdave committed Oct 1, 2024
1 parent 96c6ca7 commit 97f9782
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions fs/btrfs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -3111,6 +3111,11 @@ int btrfs_finish_one_ordered(struct btrfs_ordered_extent *ordered_extent)
ret = btrfs_update_inode_fallback(trans, inode);
if (ret) /* -ENOMEM or corruption */
btrfs_abort_transaction(trans, ret);

ret = btrfs_insert_raid_extent(trans, ordered_extent);
if (ret)
btrfs_abort_transaction(trans, ret);

goto out;
}

Expand Down

0 comments on commit 97f9782

Please sign in to comment.