Re: [PATCH 2/7] xfs: add a separate tracepoint for stealing an open zone for GC

Carlos Maiolino
2026-03-30T12:19:04Z

On Mon, Mar 30, 2026 at 07:44:12AM +0200, Christoph Hellwig wrote:
> 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: Carlos Maiolino <cmaiolino@redhat.com>

> ---
> fs/xfs/xfs_trace.h | 1 +
> fs/xfs/xfs_zone_gc.c | 2 +-
> 2 files changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/fs/xfs/xfs_trace.h b/fs/xfs/xfs_trace.h
> index 433f84252119..c1aa15973e74 100644
> --- a/fs/xfs/xfs_trace.h
> +++ b/fs/xfs/xfs_trace.h
> @@ -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,
> diff --git a/fs/xfs/xfs_zone_gc.c b/fs/xfs/xfs_zone_gc.c
> index f076f66c5d57..273c496c2f1c 100644
> --- a/fs/xfs/xfs_zone_gc.c
> +++ b/fs/xfs/xfs_zone_gc.c
> @@ -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--;
> --
> 2.47.3
>
>