]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
xfs: remove the XFS_IOC_FSSETDM definitions libxfs-5.17-sync_2022-01-19
authorDarrick J. Wong <djwong@kernel.org>
Tue, 11 Jan 2022 23:55:24 +0000 (15:55 -0800)
committerDarrick J. Wong <djwong@kernel.org>
Thu, 20 Jan 2022 00:02:53 +0000 (16:02 -0800)
Source kernel commit: eb6504d3746b280c8bb1d763e3135c9d5725c3f7

Remove the definitions for these ioctls, since the functionality (and,
weirdly, the 32-bit compat ioctl definitions) were removed from the
kernel in November 2019.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
libhandle/handle.c
libxfs/xfs_fs.h
man/man3/handle.3
man/man3/xfsctl.3

index 27abc6b2a50c3cf64449e866b42d7d93f6c1504b..4a05e4130d7b2610af5923a377c2f7461485ee86 100644 (file)
@@ -442,24 +442,8 @@ fssetdm_by_handle(
        size_t          hlen,
        struct fsdmidata *fsdmidata)
 {
-       int             fd;
-       char            *path;
-       xfs_fsop_setdm_handlereq_t dmhreq;
-
-       if ((fd = handle_to_fsfd(hanp, &path)) < 0)
-               return -1;
-
-       dmhreq.hreq.fd       = 0;
-       dmhreq.hreq.path     = NULL;
-       dmhreq.hreq.oflags   = O_LARGEFILE;
-       dmhreq.hreq.ihandle  = hanp;
-       dmhreq.hreq.ihandlen = hlen;
-       dmhreq.hreq.ohandle  = NULL;
-       dmhreq.hreq.ohandlen = NULL;
-
-       dmhreq.data = fsdmidata;
-
-       return xfsctl(path, fd, XFS_IOC_FSSETDM_BY_HANDLE, &dmhreq);
+       errno = EOPNOTSUPP;
+       return -1;
 }
 
 /*ARGSUSED1*/
index 49c0e583d6bb777d867d681d3cab95e34d35699f..505533c43a92aa1c7f0b1f522c9bddc04ee6d100 100644 (file)
@@ -92,21 +92,6 @@ struct getbmapx {
 #define XFS_FMR_OWN_COW                FMR_OWNER('X', 7) /* cow staging */
 #define XFS_FMR_OWN_DEFECTIVE  FMR_OWNER('X', 8) /* bad blocks */
 
-/*
- * Structure for XFS_IOC_FSSETDM.
- * For use by backup and restore programs to set the XFS on-disk inode
- * fields di_dmevmask and di_dmstate.  These must be set to exactly and
- * only values previously obtained via xfs_bulkstat!  (Specifically the
- * struct xfs_bstat fields bs_dmevmask and bs_dmstate.)
- */
-#ifndef HAVE_FSDMIDATA
-struct fsdmidata {
-       __u32           fsd_dmevmask;   /* corresponds to di_dmevmask */
-       __u16           fsd_padding;
-       __u16           fsd_dmstate;    /* corresponds to di_dmstate  */
-};
-#endif
-
 /*
  * File segment locking set data type for 64 bit access.
  * Also used for all the RESV/FREE interfaces.
@@ -562,16 +547,10 @@ typedef struct xfs_fsop_handlereq {
 
 /*
  * Compound structures for passing args through Handle Request interfaces
- * xfs_fssetdm_by_handle, xfs_attrlist_by_handle, xfs_attrmulti_by_handle
- * - ioctls: XFS_IOC_FSSETDM_BY_HANDLE, XFS_IOC_ATTRLIST_BY_HANDLE, and
- *          XFS_IOC_ATTRMULTI_BY_HANDLE
+ * xfs_attrlist_by_handle, xfs_attrmulti_by_handle
+ * - ioctls: XFS_IOC_ATTRLIST_BY_HANDLE, and XFS_IOC_ATTRMULTI_BY_HANDLE
  */
 
-typedef struct xfs_fsop_setdm_handlereq {
-       struct xfs_fsop_handlereq       hreq;   /* handle information   */
-       struct fsdmidata                __user *data;   /* DMAPI data   */
-} xfs_fsop_setdm_handlereq_t;
-
 /*
  * Flags passed in xfs_attr_multiop.am_flags for the attr ioctl interface.
  *
@@ -789,7 +768,7 @@ struct xfs_scrub_metadata {
 /*     XFS_IOC_ALLOCSP64 ----- deprecated 36    */
 /*     XFS_IOC_FREESP64 ------ deprecated 37    */
 #define XFS_IOC_GETBMAP                _IOWR('X', 38, struct getbmap)
-#define XFS_IOC_FSSETDM                _IOW ('X', 39, struct fsdmidata)
+/*      XFS_IOC_FSSETDM ------- deprecated 39    */
 #define XFS_IOC_RESVSP         _IOW ('X', 40, struct xfs_flock64)
 #define XFS_IOC_UNRESVSP       _IOW ('X', 41, struct xfs_flock64)
 #define XFS_IOC_RESVSP64       _IOW ('X', 42, struct xfs_flock64)
@@ -831,7 +810,7 @@ struct xfs_scrub_metadata {
 #define XFS_IOC_FREEZE              _IOWR('X', 119, int)       /* aka FIFREEZE */
 #define XFS_IOC_THAW                _IOWR('X', 120, int)       /* aka FITHAW */
 
-#define XFS_IOC_FSSETDM_BY_HANDLE    _IOW ('X', 121, struct xfs_fsop_setdm_handlereq)
+/*      XFS_IOC_FSSETDM_BY_HANDLE -- deprecated 121      */
 #define XFS_IOC_ATTRLIST_BY_HANDLE   _IOW ('X', 122, struct xfs_fsop_attrlist_handlereq)
 #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)
index 154c0f29824343d3a5e9da5ded6bd253f0f7e2d6..2eb2bbcdecab978b1fc5d9b25cef128250d50162 100644 (file)
@@ -124,6 +124,7 @@ and
 fields in an XFS on-disk inode. It is analogous to the
 .BR "XFS_IOC_FSSETDM xfsctl" (3)
 command, except that a handle is specified instead of a file.
+This function is not supported on Linux.
 .PP
 The
 .BR free_handle ()
index a591e61a729e4cec7dab510aa19cdb5b55fe62f0..4a0d4d08d083a3329a2faa90af04666d0617a890 100644 (file)
@@ -104,6 +104,7 @@ This command is restricted to root or to processes with device
 management capabilities.
 Its sole purpose is to allow backup and restore programs to restore the
 aforementioned critical on-disk inode fields.
+This ioctl is not supported as of Linux 5.5.
 
 .TP
 .B XFS_IOC_DIOINFO
@@ -318,6 +319,7 @@ functions (see
 .BR open_by_handle (3)).
 They are all subject to change and should not be called directly
 by applications.
+XFS_IOC_FSSETDM_BY_HANDLE is not supported as of Linux 5.5.
 
 .SS Filesystem Operations
 In order to effect one of the following operations, the pathname