]> git.hungrycats.org Git - linux/commitdiff
btrfs: stripe_alloc: allow-rmw policy, and write-in-place for isolated nocow extents...
authorZygo Blaxell <ce3g8jdj@umail.furryterror.org>
Sat, 19 Sep 2026 17:17:40 +0000 (13:17 -0400)
committerZygo Blaxell <ce3g8jdj@umail.furryterror.org>
Mon, 2 Nov 2026 02:16:30 +0000 (21:16 -0500)
The hunks of "btrfs: stripe_alloc: allow-rmw policy, and write-in-place
for isolated nocow extents" (earlier in this series) that need code from
"btrfs: stripe_alloc: carry an inode's log tail forward at fsync", which
comes after it in this series: they are applied here, once "btrfs:
stripe_alloc: carry an inode's log tail forward at fsync" is in, instead
of with the rest of "btrfs: stripe_alloc: allow-rmw policy, and
write-in-place for isolated nocow extents".

Assisted-by: Claude:claude-fable-5
Assisted-by: Claude:claude-opus-5-5
fs/btrfs/defrag.c

index 1e3bc1051b9d223b18f95b102c68986a102c9f4a..9fdf94ecb5c9391ff71b0491c20a2088adca7284 100644 (file)
@@ -1406,6 +1406,9 @@ void btrfs_carry_log_tail(struct btrfs_inode *inode)
 
        if (!btrfs_test_opt(inode->root->fs_info, STRIPE_ALLOC))
                return;
+       if (btrfs_stripe_allow_rmw(inode->root->fs_info) &
+           BTRFS_STRIPE_RMW_FSYNC)
+               return;
        if (!READ_ONCE(inode->log_carry))
                return;
        copy = kmalloc(sizeof(*copy), GFP_NOFS);