xfs: remove the XFS_IOC_{ALLOC,FREE}SP* definitions
authorDarrick J. Wong <djwong@kernel.org>
Tue, 21 Dec 2021 21:07:38 +0000 (13:07 -0800)
committerDarrick J. Wong <djwong@kernel.org>
Mon, 17 Jan 2022 17:17:11 +0000 (09:17 -0800)
Now that we've made these ioctls defunct, move them from xfs_fs.h to
xfs_ioctl.c, which effectively removes them from the publicly supported
ioctl interfaces for XFS.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
fs/xfs/libxfs/xfs_fs.h
fs/xfs/xfs_ioctl.c
fs/xfs/xfs_ioctl32.h

index 52b48b2..505533c 100644 (file)
@@ -760,13 +760,13 @@ struct xfs_scrub_metadata {
  * For 'documentation' purposed more than anything else,
  * the "cmd #" field reflects the IRIX fcntl number.
  */
-#define XFS_IOC_ALLOCSP                _IOW ('X', 10, struct xfs_flock64)
-#define XFS_IOC_FREESP         _IOW ('X', 11, struct xfs_flock64)
+/*     XFS_IOC_ALLOCSP ------- deprecated 10    */
+/*     XFS_IOC_FREESP -------- deprecated 11    */
 #define XFS_IOC_DIOINFO                _IOR ('X', 30, struct dioattr)
 #define XFS_IOC_FSGETXATTR     FS_IOC_FSGETXATTR
 #define XFS_IOC_FSSETXATTR     FS_IOC_FSSETXATTR
-#define XFS_IOC_ALLOCSP64      _IOW ('X', 36, struct xfs_flock64)
-#define XFS_IOC_FREESP64       _IOW ('X', 37, struct xfs_flock64)
+/*     XFS_IOC_ALLOCSP64 ----- deprecated 36    */
+/*     XFS_IOC_FREESP64 ------ deprecated 37    */
 #define XFS_IOC_GETBMAP                _IOWR('X', 38, struct getbmap)
 /*      XFS_IOC_FSSETDM ------- deprecated 39    */
 #define XFS_IOC_RESVSP         _IOW ('X', 40, struct xfs_flock64)
index 64a7ef4..03a6198 100644 (file)
@@ -1855,6 +1855,15 @@ xfs_fs_eofblocks_from_user(
 }
 
 /*
+ * These long-unused ioctls were removed from the official ioctl API in 5.17,
+ * but retain these definitions so that we can log warnings about them.
+ */
+#define XFS_IOC_ALLOCSP                _IOW ('X', 10, struct xfs_flock64)
+#define XFS_IOC_FREESP         _IOW ('X', 11, struct xfs_flock64)
+#define XFS_IOC_ALLOCSP64      _IOW ('X', 36, struct xfs_flock64)
+#define XFS_IOC_FREESP64       _IOW ('X', 37, struct xfs_flock64)
+
+/*
  * Note: some of the ioctl's return positive numbers as a
  * byte count indicating success, such as readlink_by_handle.
  * So we don't "sign flip" like most other routines.  This means
index 9929482..fc5a91f 100644 (file)
@@ -154,10 +154,6 @@ typedef struct compat_xfs_flock64 {
        __s32           l_pad[4];       /* reserve area */
 } compat_xfs_flock64_t;
 
-#define XFS_IOC_ALLOCSP_32     _IOW('X', 10, struct compat_xfs_flock64)
-#define XFS_IOC_FREESP_32      _IOW('X', 11, struct compat_xfs_flock64)
-#define XFS_IOC_ALLOCSP64_32   _IOW('X', 36, struct compat_xfs_flock64)
-#define XFS_IOC_FREESP64_32    _IOW('X', 37, struct compat_xfs_flock64)
 #define XFS_IOC_RESVSP_32      _IOW('X', 40, struct compat_xfs_flock64)
 #define XFS_IOC_UNRESVSP_32    _IOW('X', 41, struct compat_xfs_flock64)
 #define XFS_IOC_RESVSP64_32    _IOW('X', 42, struct compat_xfs_flock64)