]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
xfsprogs: fix geometry calls on older kernels for 5.2.1
authorEric Sandeen <sandeen@redhat.com>
Wed, 21 Aug 2019 15:41:03 +0000 (11:41 -0400)
committerEric Sandeen <sandeen@redhat.com>
Wed, 21 Aug 2019 15:41:03 +0000 (11:41 -0400)
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@redhat.com>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
libxfs/xfs_fs.h

index f1158a7966108e13e7540006038ef28797f11989..253b706c9586f8ae502f33f694e3fa62bbae4299 100644 (file)
@@ -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 compatibility, 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 */