]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
xfs: add a separate tracepoint for stealing an open zone for GC
authorChristoph Hellwig <hch@lst.de>
Tue, 31 Mar 2026 15:27:24 +0000 (17:27 +0200)
committerCarlos Maiolino <cem@kernel.org>
Tue, 7 Apr 2026 11:28:47 +0000 (13:28 +0200)
The case where we have to reuse an already open zone warrants a different
trace point vs the normal opening of a GC zone.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Hans Holmberg <hans.holmberg@wdc.com>
Reviewed-by: Damien Le Moal <dlemoal@kernel.org>
Reviewed-by: Carlos Maiolino <cmaiolino@redhat.com>
Signed-off-by: Carlos Maiolino <cem@kernel.org>
fs/xfs/xfs_trace.h
fs/xfs/xfs_zone_gc.c

index c5ad26a1d7bb25c73bae8fce7acedc7405dcec39..1c098cfc5c00d3cca2210aa1c7fa94be7e8aa72f 100644 (file)
@@ -394,6 +394,7 @@ DEFINE_ZONE_EVENT(xfs_zone_full);
 DEFINE_ZONE_EVENT(xfs_zone_opened);
 DEFINE_ZONE_EVENT(xfs_zone_reset);
 DEFINE_ZONE_EVENT(xfs_zone_gc_target_opened);
+DEFINE_ZONE_EVENT(xfs_zone_gc_target_stolen);
 
 TRACE_EVENT(xfs_zone_free_blocks,
        TP_PROTO(struct xfs_rtgroup *rtg, xfs_rgblock_t rgbno,
index 00a996c13d8adac1d37ded1b5171815df22e948c..0c1e22409ef1bf904138acc872e5755abdb0a65c 100644 (file)
@@ -543,7 +543,7 @@ xfs_zone_gc_steal_open(
                return -EIO;
        }
 
-       trace_xfs_zone_gc_target_opened(found->oz_rtg);
+       trace_xfs_zone_gc_target_stolen(found->oz_rtg);
        found->oz_is_gc = true;
        list_del_init(&found->oz_entry);
        zi->zi_nr_open_zones--;