]> git.hungrycats.org Git - linux/commitdiff
btrfs: stripe_alloc: share LOG data runs per log transaction (stripe_meta part)
authorZygo Blaxell <ce3g8jdj@umail.furryterror.org>
Tue, 6 Oct 2026 04:11:38 +0000 (00:11 -0400)
committerZygo Blaxell <ce3g8jdj@umail.furryterror.org>
Sun, 8 Nov 2026 23:38:14 +0000 (18:38 -0500)
The hunks of "btrfs: stripe_alloc: share LOG data runs per log
transaction" (earlier in this series) that need code from "btrfs:
stripe_alloc: give each log commit its own metadata stripe run", which
comes after it in this series: they are applied here, once "btrfs:
stripe_alloc: give each log commit its own metadata stripe run" is in,
instead of with the rest of "btrfs: stripe_alloc: share LOG data runs
per log transaction".

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

index d27dccaf76848a51c53ab79a0f408f79a49061a2..4feb57fb15558216eb516cb69f6bf6082da92a8a 100644 (file)
@@ -2794,8 +2794,9 @@ void btrfs_init_fs_info(struct btrfs_fs_info *fs_info)
        INIT_LIST_HEAD(&fs_info->open_stripe_bgs);
        INIT_WORK(&fs_info->stripe_alloc_enable_work, btrfs_stripe_alloc_enable_work);
        /*
-        * Closing the log-tree fsync write hole is on by default; sysfs can
-        * turn it off so the change can be measured against itself on one boot.
+        * Defaults: each log commit gets its own metadata stripe run, and
+        * LOG-class data runs are shared per log transaction (clearing
+        * stripe_log_data_shared selects private runs with carry-forward).
         */
        fs_info->stripe_log_run = true;
        fs_info->stripe_log_data_shared = true;
index cd254b62d606baa44e1f001b28a94763287b328e..153f10631fa3ae43682e066ab6cd830450579158 100644 (file)
@@ -1381,7 +1381,13 @@ static ssize_t btrfs_stripe_run_stats_show(struct kobject *kobj,
                "compact_fallbacks %lld\n"
                "compact_stripes %lld\n"
                "compact_bytes %lld\n"
-               "log_run_opened %lld\n",
+               "log_run_opened %lld\n"
+               "log_settle_waits %lld\n"
+               "log_settle_wait_ns %lld\n"
+               "log_carry_ranges %lld\n"
+               "log_carry_bytes %lld\n"
+               "log_seals %lld\n"
+               "log_seal_bytes %lld\n",
                atomic64_read(&fs_info->stripe_run_stats.nocow_run_opened),
                atomic64_read(&fs_info->stripe_run_stats.claim_refused_live_run),
                atomic64_read(&fs_info->stripe_run_stats.strand_scan_bytes),
@@ -1393,7 +1399,13 @@ static ssize_t btrfs_stripe_run_stats_show(struct kobject *kobj,
                atomic64_read(&fs_info->stripe_run_stats.compact_fallbacks),
                atomic64_read(&fs_info->stripe_run_stats.compact_stripes),
                atomic64_read(&fs_info->stripe_run_stats.compact_bytes),
-               atomic64_read(&fs_info->stripe_run_stats.log_run_opened));
+               atomic64_read(&fs_info->stripe_run_stats.log_run_opened),
+               atomic64_read(&fs_info->stripe_run_stats.log_settle_waits),
+               atomic64_read(&fs_info->stripe_run_stats.log_settle_wait_ns),
+               atomic64_read(&fs_info->stripe_run_stats.log_carry_ranges),
+               atomic64_read(&fs_info->stripe_run_stats.log_carry_bytes),
+               atomic64_read(&fs_info->stripe_run_stats.log_seals),
+               atomic64_read(&fs_info->stripe_run_stats.log_seal_bytes));
 }
 BTRFS_ATTR(, stripe_run_stats, btrfs_stripe_run_stats_show);