]> git.hungrycats.org Git - linux/commitdiff
btrfs: stripe_alloc: report read-modify-write of uncovered stripes (debug part)
authorZygo Blaxell <ce3g8jdj@umail.furryterror.org>
Sat, 19 Sep 2026 17:17:48 +0000 (13:17 -0400)
committerZygo Blaxell <ce3g8jdj@umail.furryterror.org>
Mon, 2 Nov 2026 02:16:30 +0000 (21:16 -0500)
The debug half of "btrfs: stripe_alloc: report read-modify-write of
uncovered stripes", earlier in this series: the meta_rmw counter in
stripe_park_stats, which goes with the series' other debug statistics.
The warning itself is in that patch.

Assisted-by: Claude:claude-fable-5
Assisted-by: Claude:claude-opus-5-5
fs/btrfs/fs.h
fs/btrfs/raid56.c
fs/btrfs/sysfs.c

index c09060496cb205486dcff5c723d4747063ab9b9a..10c70314e9126065da9ceeb0d554eb6f488fa162 100644 (file)
@@ -873,6 +873,7 @@ struct btrfs_fs_info {
                 * stripe.
                 */
                atomic64_t pad_decline_uncovered;
+               atomic64_t meta_rmw;
                atomic64_t congestion_short;
                /* Stripes pinned in the rbio cache (rbio_needs_pin()). */
                atomic64_t rbio_pinned;
index e1886e245d2f267ba5d03cb78bc9fc9c09375520..546ae059589b853024cfe8ce54ca5f98f0e392d4 100644 (file)
@@ -3178,6 +3178,7 @@ static void report_uncovered_rmw(struct btrfs_raid_bio *rbio)
            !(rbio->bioc->map_type & BTRFS_BLOCK_GROUP_METADATA))
                return;
 
+       atomic64_inc(&fs_info->stripe_park_stats.meta_rmw);
        btrfs_warn_rl(fs_info,
 "read-modify-write of full stripe %llu: this block group is not covered by stripe_alloc, the raid56 write hole applies to it",
                      rbio->bioc->full_stripe_logical);
index d90574a7f81f3b315baf4645aba017b43fa65f73..d2889c9c89379d72c83813afad133dcf222eca13 100644 (file)
@@ -1139,6 +1139,7 @@ static ssize_t btrfs_stripe_park_stats_show(struct kobject *kobj,
                "padded %lld\n"
                "padded_unwritten %lld\n"
                "rmw_reads %lld\n"
+               "meta_rmw %lld\n"
                "rbio_pin_refused %lld\n"
                "rbio_pinned_now %d\n"
                "rbio_pinned_live %d\n"
@@ -1158,6 +1159,7 @@ static ssize_t btrfs_stripe_park_stats_show(struct kobject *kobj,
                atomic64_read(&fs_info->stripe_park_stats.padded),
                atomic64_read(&fs_info->stripe_park_stats.padded_unwritten),
                atomic64_read(&fs_info->stripe_park_stats.rmw_reads),
+               atomic64_read(&fs_info->stripe_park_stats.meta_rmw),
                atomic64_read(&fs_info->stripe_park_stats.rbio_pin_refused),
                pinned,
                live,