Re: [PATCH 10/36] xfs: export the geometry of realtime groups to userspace

Christoph Hellwig
2024-10-14T08:33:10Z

On Thu, Oct 10, 2024 at 06:04:17PM -0700, Darrick J. Wong wrote:
> From: Darrick J. Wong <djwong@kernel.org>
> + __u32 rg_number; /* i/o: rtgroup number */
> + __u32 rg_length; /* o: length in blocks */
> + __u32 rg_capacity; /* o: usable capacity in blocks */

So the separate length vs capacity reporting was needed for my previous
implementation of zoned devices with LBA gaps. Now that RT groups
always use segmented addressing we shouldn't need it any more.

That being said Hans was looking into using the capacity field to
optimize data placement in power users like RockѕDB, and one thing
that might be useful for that is to exclude known fixed metadata from
the capacity field, which really is just the rtsb on rtgroup 0.

Should we just deduct that from the capacity field? Or have a
user_capacity one?