Skip to content

Commit b3bb941

Browse files
author
Darrick J. Wong
committed
xfs: remove the XFS_IOC_{ALLOC,FREE}SP* definitions
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 <[email protected]> Reviewed-by: Dave Chinner <[email protected]> Reviewed-by: Eric Sandeen <[email protected]>
1 parent 4d1b97f commit b3bb941

File tree

3 files changed

+13
-8
lines changed

3 files changed

+13
-8
lines changed

fs/xfs/libxfs/xfs_fs.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -760,13 +760,13 @@ struct xfs_scrub_metadata {
760760
* For 'documentation' purposed more than anything else,
761761
* the "cmd #" field reflects the IRIX fcntl number.
762762
*/
763-
#define XFS_IOC_ALLOCSP _IOW ('X', 10, struct xfs_flock64)
764-
#define XFS_IOC_FREESP _IOW ('X', 11, struct xfs_flock64)
763+
/* XFS_IOC_ALLOCSP ------- deprecated 10 */
764+
/* XFS_IOC_FREESP -------- deprecated 11 */
765765
#define XFS_IOC_DIOINFO _IOR ('X', 30, struct dioattr)
766766
#define XFS_IOC_FSGETXATTR FS_IOC_FSGETXATTR
767767
#define XFS_IOC_FSSETXATTR FS_IOC_FSSETXATTR
768-
#define XFS_IOC_ALLOCSP64 _IOW ('X', 36, struct xfs_flock64)
769-
#define XFS_IOC_FREESP64 _IOW ('X', 37, struct xfs_flock64)
768+
/* XFS_IOC_ALLOCSP64 ----- deprecated 36 */
769+
/* XFS_IOC_FREESP64 ------ deprecated 37 */
770770
#define XFS_IOC_GETBMAP _IOWR('X', 38, struct getbmap)
771771
/* XFS_IOC_FSSETDM ------- deprecated 39 */
772772
#define XFS_IOC_RESVSP _IOW ('X', 40, struct xfs_flock64)

fs/xfs/xfs_ioctl.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1854,6 +1854,15 @@ xfs_fs_eofblocks_from_user(
18541854
return 0;
18551855
}
18561856

1857+
/*
1858+
* These long-unused ioctls were removed from the official ioctl API in 5.17,
1859+
* but retain these definitions so that we can log warnings about them.
1860+
*/
1861+
#define XFS_IOC_ALLOCSP _IOW ('X', 10, struct xfs_flock64)
1862+
#define XFS_IOC_FREESP _IOW ('X', 11, struct xfs_flock64)
1863+
#define XFS_IOC_ALLOCSP64 _IOW ('X', 36, struct xfs_flock64)
1864+
#define XFS_IOC_FREESP64 _IOW ('X', 37, struct xfs_flock64)
1865+
18571866
/*
18581867
* Note: some of the ioctl's return positive numbers as a
18591868
* byte count indicating success, such as readlink_by_handle.

fs/xfs/xfs_ioctl32.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -154,10 +154,6 @@ typedef struct compat_xfs_flock64 {
154154
__s32 l_pad[4]; /* reserve area */
155155
} compat_xfs_flock64_t;
156156

157-
#define XFS_IOC_ALLOCSP_32 _IOW('X', 10, struct compat_xfs_flock64)
158-
#define XFS_IOC_FREESP_32 _IOW('X', 11, struct compat_xfs_flock64)
159-
#define XFS_IOC_ALLOCSP64_32 _IOW('X', 36, struct compat_xfs_flock64)
160-
#define XFS_IOC_FREESP64_32 _IOW('X', 37, struct compat_xfs_flock64)
161157
#define XFS_IOC_RESVSP_32 _IOW('X', 40, struct compat_xfs_flock64)
162158
#define XFS_IOC_UNRESVSP_32 _IOW('X', 41, struct compat_xfs_flock64)
163159
#define XFS_IOC_RESVSP64_32 _IOW('X', 42, struct compat_xfs_flock64)

0 commit comments

Comments
 (0)