public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Niklas Cassel <cassel@kernel.org>
To: Christoph Hellwig <hch@lst.de>
Cc: Carlos Maiolino <cem@kernel.org>,
	Damien Le Moal <dlemoal@kernel.org>,
	Hans Holmberg <hans.holmberg@wdc.com>,
	Johannes Thumshirn <johannes.thumshirn@wdc.com>,
	linux-xfs@vger.kernel.org
Subject: Re: [PATCH 2/2] xfs: expose the current zonegc required status in sysfs
Date: Wed, 22 Apr 2026 12:31:52 +0200	[thread overview]
Message-ID: <aeijmOd6zHDQeA7x@ryzen> (raw)
In-Reply-To: <20260422060417.GD5391@lst.de>

On Wed, Apr 22, 2026 at 08:04:17AM +0200, Christoph Hellwig wrote:
> On Mon, Apr 20, 2026 at 03:50:14PM +0200, Niklas Cassel wrote:
> > The current zonegc required status is currently available in
> > /proc/<pid>/mountstats (which contains stats for all mounted zoned XFS
> > filesystems), under "RT GC required:".
> > 
> > Add a sysfs attribute /sys/fs/xfs/<dev>/zoned/zonegc_required for the same.
> > This makes it trivial for monitoring software to read the value, for a
> > specific filesystem, without any complex parsing.
> 
> GC needed is a very complex internal condition, and I don't think
> exposing the current value as a stable ABI is a good idea.

So we have the following options:
1) /sys/fs/xfs/<dev>/zoned/
2) /sys/fs/xfs/<dev>/stats/stats
3) /sys/kernel/debug/xfs/<dev>/


In my mind, debugfs is usually used for sensitive stuff, however, considering
that the information exposed in this patch is exactly the same information as
"GC required:" in /proc/<pid>/mountstats, I assume that the sensitive
argument is not really applicable here.


Like you say, debugfs can also be used in order to avoid exposing the current
value as a stable ABI. However, since the information exposed in this patch
is accessed using the exact same function call: xfs_zoned_need_gc() as
"GC required:" in /proc/<pid>/mountstats, isn't the current value already
exposed as a stable ABI?


Or perhaps I am missing something here, and for some reason, unlike a sysfs
attribute, the information exposed in /proc/<pid>/mountstats is not considered
a stable ABI ?


That said, if you prefer 2) or 3) over 1) for exposing zonegc_required,
please tell me which you prefer, and I can send a V2 with that.


Kind regards,
Niklas

  reply	other threads:[~2026-04-22 10:31 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-20 13:50 [PATCH 0/2] xfs: add additional zoned sysfs attributes Niklas Cassel
2026-04-20 13:50 ` [PATCH 1/2] xfs: expose the number of free zones in sysfs Niklas Cassel
2026-04-20 15:39   ` Damien Le Moal
2026-04-22  6:03   ` Christoph Hellwig
2026-04-22 10:29     ` Niklas Cassel
2026-04-20 13:50 ` [PATCH 2/2] xfs: expose the current zonegc required status " Niklas Cassel
2026-04-20 15:47   ` Damien Le Moal
2026-04-20 16:09     ` Niklas Cassel
2026-04-22  6:04   ` Christoph Hellwig
2026-04-22 10:31     ` Niklas Cassel [this message]
2026-04-22  6:02 ` [PATCH 0/2] xfs: add additional zoned sysfs attributes Christoph Hellwig
2026-04-22  7:17   ` Carlos Maiolino
2026-04-22  9:53   ` Niklas Cassel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aeijmOd6zHDQeA7x@ryzen \
    --to=cassel@kernel.org \
    --cc=cem@kernel.org \
    --cc=dlemoal@kernel.org \
    --cc=hans.holmberg@wdc.com \
    --cc=hch@lst.de \
    --cc=johannes.thumshirn@wdc.com \
    --cc=linux-xfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox