]> 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>
Mon, 2 Nov 2026 02:16:32 +0000 (21:16 -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 3fbe632d14a2dc3966225e5c1231dfd56f4d53ac..edb2202d17c4b8491fa2347af7f759e0530992ed 100644 (file)
@@ -882,15 +882,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 8f6e55452bbfb9356a0fc2015f10eabbe5ad85a7..a15b8d79e6b8085fd79c64fe30a6b95abe849408 100644 (file)
@@ -1212,10 +1212,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"
@@ -1242,10 +1252,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),