]> Git Repo - linux.git/commitdiff
btrfs: also add stripe entries for NOCOW writes
authorJohannes Thumshirn <[email protected]>
Thu, 19 Sep 2024 10:16:38 +0000 (12:16 +0200)
committerDavid Sterba <[email protected]>
Tue, 1 Oct 2024 17:09:04 +0000 (19:09 +0200)
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]>
fs/btrfs/inode.c

index edac499fd83d29181f8374b4f505cd177ded7018..c6e4b58c334c5e6e9e8965a8f7f247c184fd46d0 100644 (file)
@@ -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;
        }
 
This page took 0.068479 seconds and 4 git commands to generate.