Re: [PATCH 41/43] xfs: support write life time based data placement

Christoph Hellwig
2024-12-15T06:19:06Z

On Fri, Dec 13, 2024 at 03:00:51PM -0800, Darrick J. Wong wrote:
> > if (!xfs_group_marked(mp, XG_TYPE_RTG, XFS_RTG_FREE))
> > oz = xfs_steal_open_zone_for_gc(zi);
> > else
> > - oz = xfs_open_zone(mp, true);
> > + oz = xfs_open_zone(mp, WRITE_LIFE_NOT_SET, true);
>
> I wonder, is it possible to remember (at least incore) what write hint
> was associated with an open zone all the way to gc time so that zones
> with compatible hints can be gc'd into a new zone with the same hint?
> Or is that overkill?

We've been thinking about that a lot. Right now we don't have an
immediate use case for it, but it sure would be nice to have it without
needing another incompat bit. But then we'd need to find some space
(3 bits to be exact) in the on-disk inode for it that doesn't make
otherwise useful space unavaіlable for more widely useful things.
If you have a good idea I'll look into implementing it.