On Tue, Aug 20, 2019 at 03:47:29PM -0500, Eric Sandeen wrote: > I didn't think 5.2.0 through; the udpate of the geometry ioctl means > that the tools won't work on older kernels that don't support the > v5 ioctls, since I failed to merge Darrick's wrappers. > > As a very quick one-off I'd like to merge this to just revert every > geometry call back to the original ioctl, so it keeps working on > older kernels and I'll release 5.2.1. This hack can go away when > Darrick's wrappers get merged. > > Signed-off-by: Eric Sandeen <sandeen@xxxxxxxxxx> For the four line code fix, Reviewed-by: Darrick J. Wong <darrick.wong@xxxxxxxxxx> > --- > > I'm a little concerned that 3rd party existing code which worked fine > before will now get the new XFS_IOC_FSGEOMETRY definition if they get > rebuilt, and suddenly stop working on older kernels. Am I overreacting > or misunderstanding our compatibility goals? As for this question ^^^ ... <URRRK>. I thought the overall strategy was to get everything in xfsprogs using libfrog wrappers that would degrade gracefully on old kernels. For xfsdump/restore, I think we should just merge it into xfsprogs and then it can use our wrappers. For everything else... I thought the story was that you shouldn't really be using xfs ioctls unless you're keeping up with upstream. <shrug> Feel free to differ, that's just a braindump of my shattered mind. :P --D > diff --git a/libxfs/xfs_fs.h b/libxfs/xfs_fs.h > index f1158a79..253b706c 100644 > --- a/libxfs/xfs_fs.h > +++ b/libxfs/xfs_fs.h > @@ -720,7 +720,10 @@ struct xfs_scrub_metadata { > #define XFS_IOC_ATTRMULTI_BY_HANDLE _IOW ('X', 123, struct xfs_fsop_attrmulti_handlereq) > #define XFS_IOC_FSGEOMETRY_V4 _IOR ('X', 124, struct xfs_fsop_geom_v4) > #define XFS_IOC_GOINGDOWN _IOR ('X', 125, uint32_t) > -#define XFS_IOC_FSGEOMETRY _IOR ('X', 126, struct xfs_fsop_geom) > +/* For backwards compatibility in 5.2.1, just for now */ > +/* #define XFS_IOC_FSGEOMETRY _IOR ('X', 126, struct xfs_fsop_geom_v5) */ > +#define XFS_IOC_FSGEOMETRY XFS_IOC_FSGEOMETRY_V4 > + > /* XFS_IOC_GETFSUUID ---------- deprecated 140 */ > > /* reflink ioctls; these MUST match the btrfs ioctl definitions */ >