]> git.hungrycats.org Git - linux/commitdiff
btrfs: stripe_alloc: count and log ordered extents that end with sectors unwritten...
authorZygo Blaxell <ce3g8jdj@umail.furryterror.org>
Fri, 9 Oct 2026 23:13:11 +0000 (19:13 -0400)
committerZygo Blaxell <ce3g8jdj@umail.furryterror.org>
Mon, 2 Nov 2026 02:16:31 +0000 (21:16 -0500)
The hunks of "btrfs: stripe_alloc: count and log ordered extents that
end with sectors unwritten" (earlier in this series) that need code from
"btrfs: stripe_alloc: share LOG data runs per log transaction
(stripe_meta part)", which comes after it in this series: they are
applied here, once "btrfs: stripe_alloc: share LOG data runs per log
transaction (stripe_meta part)" is in, instead of with the rest of
"btrfs: stripe_alloc: count and log ordered extents that end with
sectors unwritten".

They append the unwritten_on_end counters to the stripe_run_stats list
after the log seal counters, which that patch adds to it.

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

index 6f629e618a947325802d5dfbaacd7027e9458158..c23a55ca3086662f10d67cf7bc9571b2ac51d19e 100644 (file)
@@ -1274,7 +1274,11 @@ static ssize_t btrfs_stripe_run_stats_show(struct kobject *kobj,
                "log_carry_ranges %lld\n"
                "log_carry_bytes %lld\n"
                "log_seals %lld\n"
-               "log_seal_bytes %lld\n",
+               "log_seal_bytes %lld\n"
+               "unwritten_on_end %lld\n"
+               "unwritten_on_end_bytes %lld\n"
+               "unwritten_on_end_truncated %lld\n"
+               "unwritten_on_end_truncated_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),
@@ -1292,7 +1296,11 @@ static ssize_t btrfs_stripe_run_stats_show(struct kobject *kobj,
                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));
+               atomic64_read(&fs_info->stripe_run_stats.log_seal_bytes),
+               atomic64_read(&fs_info->stripe_run_stats.unwritten_on_end),
+               atomic64_read(&fs_info->stripe_run_stats.unwritten_on_end_bytes),
+               atomic64_read(&fs_info->stripe_run_stats.unwritten_on_end_truncated),
+               atomic64_read(&fs_info->stripe_run_stats.unwritten_on_end_truncated_bytes));
 }
 BTRFS_ATTR(, stripe_run_stats, btrfs_stripe_run_stats_show);