Re: [PATCH 04/17] libfrog: wrap handle construction code

Darrick J. Wong
2025-02-07T04:49:22Z

On Thu, Feb 06, 2025 at 08:34:36PM -0800, Christoph Hellwig wrote:
> On Thu, Feb 06, 2025 at 02:31:41PM -0800, Darrick J. Wong wrote:
> > From: Darrick J. Wong <djwong@kernel.org>
> >
> > Clean up all the open-coded logic to construct a file handle from a
> > fshandle and some bulkstat/parent pointer information. The new
> > functions are stashed in a private header file to avoid leaking the
> > details of xfs_handle construction in the public libhandle headers.
>
> So creating a handle from bulkstat is a totally normal thing to do
> for xfs-aware applications. I'd much rathe see this in libhandle
> than hiding it away.

I was going to protest that even xfsdump doesn't construct its own weird
handle, but Debian codesearch says that Ganesha does it, so I'll move it
to actual libhandle.

> > + handle_from_fshandle(&handle, file->fshandle, file->fshandle_len);
>
> Nit: overly long line.

Will fix.

--D