]> git-server-git.apps.pok.os.sepia.ceph.com Git - xfsprogs-dev.git/commit
libfrog: add a function to grab the path from an open fd and a file handle
authorDarrick J. Wong <djwong@kernel.org>
Sun, 22 Feb 2026 22:41:12 +0000 (14:41 -0800)
committerDarrick J. Wong <djwong@kernel.org>
Thu, 9 Apr 2026 22:30:16 +0000 (15:30 -0700)
commitb2fc3c686b2af26bd983ffc8f9b09df05bd937e9
tree43e3f9440fa95b26155d6d9be2cda06560649868
parent9d0bd1ecce3dc176a974d2021b1a329936294781
libfrog: add a function to grab the path from an open fd and a file handle

handle_walk_paths operates on a file handle, but requires that the fs
has been registered with libhandle via path_to_fshandle.  For a normal
libhandle client this is the desirable behavior because the application
*should* maintain an open fd to the filesystem mount.

However for xfs_healer this isn't going to work well because the healer
mustn't pin the mount while it's running.  It's smart enough to know how
to find and reconnect to the mountpoint, but libhandle doesn't have any
such concept.

Therefore, alter the libfrog getparents code so that xfs_healer can pass
in the mountpoint and reconnected fd without needing libhandle.  All
we're really doing here is trying to obtain a user-visible path for a
file that encountered problems for logging purposes; if it fails, we'll
fall back to logging the inode number.

Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
libfrog/getparents.c
libfrog/getparents.h