]> git.hungrycats.org Git - linux/commitdiff
btrfs: stripe_alloc: count nocow run lifecycles and stranded stripes in sysfs (allow_...
authorZygo Blaxell <ce3g8jdj@umail.furryterror.org>
Sat, 19 Sep 2026 17:18:20 +0000 (13:18 -0400)
committerZygo Blaxell <ce3g8jdj@umail.furryterror.org>
Sun, 8 Nov 2026 23:37:55 +0000 (18:37 -0500)
The hunks of "btrfs: stripe_alloc: count nocow run lifecycles and
stranded stripes in sysfs" (earlier in this series) that need code from
"btrfs: stripe_alloc: isolate nodatacow and preallocated extents by
stripe", which comes after it in this series: they are applied here,
once "btrfs: stripe_alloc: isolate nodatacow and preallocated extents by
stripe" is in, instead of with the rest of "btrfs: stripe_alloc: count
nocow run lifecycles and stranded stripes in sysfs".

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

index 2266904e2bab32ea2ccfc2eda5f3766243c38cfd..ff05bdf91d8f8b34dd67c8e5b4812f75153f7a60 100644 (file)
@@ -1032,6 +1032,8 @@ int btrfs_alloc_from_inode_stripe_run(struct btrfs_block_group *bg, u64 ino,
        }
        new_run->bg = bg;
        new_run->class = class;
+       if (class == BTRFS_STRIPE_RUN_NOCOW)
+               atomic64_inc(&fs_info->stripe_run_stats.nocow_run_opened);
        new_run->owner = ino;
        new_run->start = start;
        new_run->end = start + len;