]> git.hungrycats.org Git - linux/commitdiff
btrfs: stripe_alloc: attribute each data read-modify-write to why padding declined...
authorZygo Blaxell <ce3g8jdj@umail.furryterror.org>
Wed, 30 Sep 2026 22:07:52 +0000 (18:07 -0400)
committerZygo Blaxell <ce3g8jdj@umail.furryterror.org>
Sun, 8 Nov 2026 23:38:16 +0000 (18:38 -0500)
The hunks of "btrfs: stripe_alloc: attribute each data read-modify-write
to why padding declined" (earlier in this series) that need code from
"btrfs: raid56: say whether a metadata read-modify-write is a write
hole", which comes after it in this series: they are applied here, once
"btrfs: raid56: say whether a metadata read-modify-write is a write
hole" is in, instead of with the rest of "btrfs: stripe_alloc: attribute
each data read-modify-write to why padding declined".

It also drops the pad_decline_live and pad_decline_unallocated counters:
these hunks remove their last readers.

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

index c9d0d64229164b54d971a69b0c09b8cc3fd45019..27b8acf982c508ae5a0ed7a9bf355bcfe0e0b4b2 100644 (file)
@@ -884,15 +884,8 @@ struct btrfs_fs_info {
                 * parked ones.
                 */
                atomic64_t data_rmw;
-               /*
-                * Why padding declined: live (the rest of the stripe is
-                * allocated and not yet written), no_run (no open run covers
-                * the stripe), unallocated (the run's frontier has not reached
-                * the stripe).
-                */
-               atomic64_t pad_decline_live;
+               /* Why padding declined: no open run covers the stripe. */
                atomic64_t pad_decline_no_run;
-               atomic64_t pad_decline_unallocated;
                /*
                 * Oracle allowed padding, but a sector below the frontier is
                 * not covered by this write: another allocation shares the
index c059eea92398bacdae3c09528950e74eb6540ae3..a9dd66ec1eadefd759f4d43dfd18c9d1413b0c5a 100644 (file)
@@ -1325,10 +1325,20 @@ static ssize_t btrfs_stripe_park_stats_show(struct kobject *kobj,
                "padded_unwritten %lld\n"
                "rmw_reads %lld\n"
                "data_rmw %lld\n"
-               "pad_decline_live %lld\n"
                "pad_decline_no_run %lld\n"
-               "pad_decline_unallocated %lld\n"
                "pad_decline_uncovered %lld\n"
+               "data_rmw_pad_ok_nomem %lld\n"
+               "data_rmw_no_run %lld\n"
+               "data_rmw_uncovered %lld\n"
+               "data_rmw_not_tried %lld\n"
+               "data_rmw_norun_no_bgs %lld\n"
+               "data_rmw_norun_no_bg %lld\n"
+               "data_rmw_norun_no_cover %lld\n"
+               "data_rmw_norun_no_live %lld\n"
+               "data_rmw_norun_overhang %lld\n"
+               "data_rmw_norun_past_map %lld\n"
+               "data_rmw_norun_bg_ro %lld\n"
+               "data_rmw_reloc_writer %lld\n"
                "meta_rmw %lld\n"
                "meta_rmw_cur %lld\n"
                "meta_rmw_old %lld\n"
@@ -1355,10 +1365,20 @@ static ssize_t btrfs_stripe_park_stats_show(struct kobject *kobj,
                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.data_rmw),
-               atomic64_read(&fs_info->stripe_park_stats.pad_decline_live),
                atomic64_read(&fs_info->stripe_park_stats.pad_decline_no_run),
-               atomic64_read(&fs_info->stripe_park_stats.pad_decline_unallocated),
                atomic64_read(&fs_info->stripe_park_stats.pad_decline_uncovered),
+               atomic64_read(&fs_info->stripe_park_stats.data_rmw_by[BTRFS_STRIPE_PAD_OK]),
+               atomic64_read(&fs_info->stripe_park_stats.data_rmw_by[BTRFS_STRIPE_PAD_NO_RUN]),
+               atomic64_read(&fs_info->stripe_park_stats.data_rmw_by[BTRFS_STRIPE_PAD_UNCOVERED]),
+               atomic64_read(&fs_info->stripe_park_stats.data_rmw_by[BTRFS_STRIPE_PAD_NR_REASONS]),
+               atomic64_read(&fs_info->stripe_park_stats.data_rmw_norun[0]),
+               atomic64_read(&fs_info->stripe_park_stats.data_rmw_norun[1]),
+               atomic64_read(&fs_info->stripe_park_stats.data_rmw_norun[2]),
+               atomic64_read(&fs_info->stripe_park_stats.data_rmw_norun[3]),
+               atomic64_read(&fs_info->stripe_park_stats.data_rmw_norun[4]),
+               atomic64_read(&fs_info->stripe_park_stats.data_rmw_norun[5]),
+               atomic64_read(&fs_info->stripe_park_stats.data_rmw_norun_ro),
+               atomic64_read(&fs_info->stripe_park_stats.data_rmw_reloc_writer),
                atomic64_read(&fs_info->stripe_park_stats.meta_rmw),
                atomic64_read(&fs_info->stripe_park_stats.meta_rmw_cur),
                atomic64_read(&fs_info->stripe_park_stats.meta_rmw_old),