]> git.hungrycats.org Git - btrfs-progs/commitdiff
btrfs-progs: print-tree: print the stop time of a dev-replace item topics/dump-tree-replace-stop-time
authorZygo Blaxell <ce3g8jdj@umail.furryterror.org>
Fri, 16 Oct 2026 08:03:07 +0000 (04:03 -0400)
committerZygo Blaxell <ce3g8jdj@umail.furryterror.org>
Fri, 16 Oct 2026 08:03:07 +0000 (04:03 -0400)
print_dev_replace_item() passed btrfs_dev_replace_time_started() to both
the "start time" and the "stop time" lines, so dump-tree showed the
start time as the stop time of a finished or canceled replace.

Fixes: 6ad89f67a9ac ("btrfs-progs: print-tree: add support for dev-replace item")
Assisted-by: Claude:claude-opus-5-5
kernel-shared/print-tree.c

index 4b3ad093f278866c059d54c1bd193190008246ff..c821ee274fb3c8545986d38ac1f1708dd514cc30 100644 (file)
@@ -1491,7 +1491,7 @@ static void print_dev_replace_item(struct extent_buffer *eb, struct btrfs_dev_re
                state_str, btrfs_dev_replace_num_write_errors(eb, ptr),
                btrfs_dev_replace_num_uncorrectable_read_errors(eb, ptr));
        print_u64_timespec(btrfs_dev_replace_time_started(eb, ptr), "\t\tstart time ");
-       print_u64_timespec(btrfs_dev_replace_time_started(eb, ptr), "\t\tstop time ");
+       print_u64_timespec(btrfs_dev_replace_time_stopped(eb, ptr), "\t\tstop time ");
 }
 
 void __btrfs_print_leaf(struct extent_buffer *eb, unsigned int mode)