]> 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>
Sun, 8 Nov 2026 23:38:15 +0000 (18:38 -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 153f10631fa3ae43682e066ab6cd830450579158..9629a237ddffda7093862d16c24c68ab7520b63e 100644 (file)
@@ -1387,7 +1387,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),
@@ -1405,7 +1409,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);