public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] xfsprogs: fix geometry calls on older kernels for 5.2.1
@ 2019-08-20 20:47 Eric Sandeen
  2019-08-20 21:18 ` Darrick J. Wong
  0 siblings, 1 reply; 4+ messages in thread
From: Eric Sandeen @ 2019-08-20 20:47 UTC (permalink / raw)
  To: linux-xfs

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>
---

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?

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 */


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-08-21 15:39 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-08-20 20:47 [PATCH] xfsprogs: fix geometry calls on older kernels for 5.2.1 Eric Sandeen
2019-08-20 21:18 ` Darrick J. Wong
2019-08-20 22:46   ` Dave Chinner
2019-08-21 15:39     ` Eric Sandeen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox