Re: [PATCH V3 RFC] xfsprogs: remove stubbed-out kernel functions out from xfs_shared.h
From: Dave Chinner <david@fromorbit.com>
Date: 2021-11-07 22:58:09
On Fri, Nov 05, 2021 at 11:40:57AM -0500, Eric Sandeen wrote:
On 11/4/21 5:38 PM, Dave Chinner wrote:quoted
With those changes, we end up with some new stubs in libxfs_priv.h and two places where we need #ifdef __KERNEL__ in xfs_ag.[ch]. Most of the mess in this patch goes away.... Cheers, Dave.Ok. I will split this up into the right patch granularity, but is this the endpoint you're looking for? One #ifdef in each of xfs_ag.[ch], two total.
Yup.
quoted hunk ↗ jump to hunk
The delayed work init/cancel assymmetry is a little odd, but I'll get over it.diff --git a/libxfs/libxfs_priv.h b/libxfs/libxfs_priv.h index 15bae1ff..2ca3b9b2 100644 --- a/libxfs/libxfs_priv.h +++ b/libxfs/libxfs_priv.h@@ -673,6 +673,9 @@ static inline void xfs_iunlink_destroy(struct xfs_perag *pag) { } xfs_agnumber_t xfs_set_inode_alloc(struct xfs_mount *mp, xfs_agnumber_t agcount); +/* Faked up kernel bits */ +#define cancel_delayed_work_sync(work) do { } while(0)
Comment is completely redundant. libxfs_priv.h is entirely for "faked up kernel bits". I'd also put this up near the top of the file near the definition of struct iomap, not place it randomly in amongst a bunch of XFS definitions. Cheers, Dave. -- Dave Chinner david@fromorbit.com