]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
xfs: remove various bulk request typedef usage
authorDarrick J. Wong <darrick.wong@oracle.com>
Wed, 28 Aug 2019 16:08:09 +0000 (12:08 -0400)
committerEric Sandeen <sandeen@redhat.com>
Wed, 28 Aug 2019 16:08:09 +0000 (12:08 -0400)
Source kernel commit: 6f71fb683879c78ba356ca78f2972289443f26eb

Remove xfs_bstat_t, xfs_fsop_bulkreq_t, xfs_inogrp_t, and similarly
named compat typedefs.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Allison Collins <allison.henderson@oracle.com>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
fsr/xfs_fsr.c
include/jdm.h
io/imap.c
io/parent.c
libhandle/jdm.c
libxfs/xfs_fs.h
quota/quot.c

index e0e73c5521c50fc85e66f05012ccc587b69e36d0..1963a05eb36ed7fad55d41193b917b7df10e077f 100644 (file)
@@ -64,9 +64,9 @@ static int    pagesize;
 void usage(int ret);
 static int  fsrfile(char *fname, xfs_ino_t ino);
 static int  fsrfile_common( char *fname, char *tname, char *mnt,
-                            int fd, xfs_bstat_t *statp);
+                            int fd, struct xfs_bstat *statp);
 static int  packfile(char *fname, char *tname, int fd,
-                     xfs_bstat_t *statp, struct fsxattr *fsxp);
+                     struct xfs_bstat *statp, struct fsxattr *fsxp);
 static void fsrdir(char *dirname);
 static int  fsrfs(char *mntdir, xfs_ino_t ino, int targetrange);
 static void initallfs(char *mtab);
@@ -78,7 +78,7 @@ int xfs_getrt(int fd, struct statvfs *sfbp);
 char * gettmpname(char *fname);
 char * getparent(char *fname);
 int fsrprintf(const char *fmt, ...);
-int read_fd_bmap(int, xfs_bstat_t *, int *);
+int read_fd_bmap(int, struct xfs_bstat *, int *);
 int cmp(const void *, const void *);
 static void tmp_init(char *mnt);
 static char * tmp_next(char *mnt);
@@ -109,9 +109,9 @@ xfs_fsgeometry(int fd, struct xfs_fsop_geom_v1 *geom)
 }
 
 static int
-xfs_bulkstat_single(int fd, xfs_ino_t *lastip, xfs_bstat_t *ubuffer)
+xfs_bulkstat_single(int fd, xfs_ino_t *lastip, struct xfs_bstat *ubuffer)
 {
-    xfs_fsop_bulkreq_t  bulkreq;
+    struct xfs_fsop_bulkreq  bulkreq;
 
     bulkreq.lastip = (__u64 *)lastip;
     bulkreq.icount = 1;
@@ -122,9 +122,9 @@ xfs_bulkstat_single(int fd, xfs_ino_t *lastip, xfs_bstat_t *ubuffer)
 
 static int
 xfs_bulkstat(int fd, xfs_ino_t *lastip, int icount,
-                    xfs_bstat_t *ubuffer, __s32 *ocount)
+                    struct xfs_bstat *ubuffer, __s32 *ocount)
 {
-    xfs_fsop_bulkreq_t  bulkreq;
+    struct xfs_fsop_bulkreq  bulkreq;
 
     bulkreq.lastip = (__u64 *)lastip;
     bulkreq.icount = icount;
@@ -607,7 +607,7 @@ fsrfs(char *mntdir, xfs_ino_t startino, int targetrange)
        int     count = 0;
        int     ret;
        __s32   buflenout;
-       xfs_bstat_t buf[GRABSZ];
+       struct xfs_bstat buf[GRABSZ];
        char    fname[64];
        char    *tname;
        jdm_fshandle_t  *fshandlep;
@@ -642,8 +642,8 @@ fsrfs(char *mntdir, xfs_ino_t startino, int targetrange)
 
        while ((ret = xfs_bulkstat(fsfd,
                                &lastino, GRABSZ, &buf[0], &buflenout)) == 0) {
-               xfs_bstat_t *p;
-               xfs_bstat_t *endp;
+               struct xfs_bstat *p;
+               struct xfs_bstat *endp;
 
                if (buflenout == 0)
                        goto out0;
@@ -710,8 +710,8 @@ out0:
 int
 cmp(const void *s1, const void *s2)
 {
-       return( ((xfs_bstat_t *)s2)->bs_extents -
-               ((xfs_bstat_t *)s1)->bs_extents);
+       return( ((struct xfs_bstat *)s2)->bs_extents -
+               ((struct xfs_bstat *)s1)->bs_extents);
 
 }
 
@@ -734,7 +734,7 @@ fsrdir(char *dirname)
 static int
 fsrfile(char *fname, xfs_ino_t ino)
 {
-       xfs_bstat_t     statbuf;
+       struct xfs_bstat statbuf;
        jdm_fshandle_t  *fshandlep;
        int     fd = -1, fsfd = -1;
        int     error = -1;
@@ -813,7 +813,7 @@ fsrfile_common(
        char            *tname,
        char            *fsname,
        int             fd,
-       xfs_bstat_t     *statp)
+       struct xfs_bstat *statp)
 {
        int             error;
        struct statvfs  vfss;
@@ -948,7 +948,7 @@ static int
 fsr_setup_attr_fork(
        int             fd,
        int             tfd,
-       xfs_bstat_t     *bstatp)
+       struct xfs_bstat *bstatp)
 {
 #ifdef HAVE_FSETXATTR
        struct stat     tstatbuf;
@@ -986,7 +986,7 @@ fsr_setup_attr_fork(
 
        i = 0;
        do {
-               xfs_bstat_t     tbstat;
+               struct xfs_bstat tbstat;
                xfs_ino_t       ino;
                char            name[64];
 
@@ -1131,7 +1131,7 @@ out:
  */
 static int
 packfile(char *fname, char *tname, int fd,
-        xfs_bstat_t *statp, struct fsxattr *fsxp)
+        struct xfs_bstat *statp, struct fsxattr *fsxp)
 {
        int             tfd = -1;
        int             srval;
@@ -1498,7 +1498,7 @@ getparent(char *fname)
 #define MAPSIZE        128
 #define        OUTMAP_SIZE_INCREMENT   MAPSIZE
 
-int    read_fd_bmap(int fd, xfs_bstat_t *sin, int *cur_nextents)
+int    read_fd_bmap(int fd, struct xfs_bstat *sin, int *cur_nextents)
 {
        int             i, cnt;
        struct getbmap  map[MAPSIZE];
index 2db3704ef8d0f9e72c1ccc62923c1f3f50949517..c57fcae7fcac4004ddaa2537f0ca5c4c553fce63 100644 (file)
@@ -40,24 +40,24 @@ jdm_readlink( jdm_fshandle_t *fshandlep,
 
 extern intgen_t
 jdm_attr_multi(        jdm_fshandle_t *fshp,
-               xfs_bstat_t *statp,
+               struct xfs_bstat *statp,
                char *bufp, int rtrvcnt, int flags);
 
 extern intgen_t
 jdm_attr_list( jdm_fshandle_t *fshp,
-               xfs_bstat_t *statp,
+               struct xfs_bstat *statp,
                char *bufp, size_t bufsz, int flags,
                struct attrlist_cursor *cursor);
 
 extern int
 jdm_parents( jdm_fshandle_t *fshp,
-               xfs_bstat_t *statp,
+               struct xfs_bstat *statp,
                struct parent *bufp, size_t bufsz,
                unsigned int *count);
 
 extern int
 jdm_parentpaths( jdm_fshandle_t *fshp,
-               xfs_bstat_t *statp,
+               struct xfs_bstat *statp,
                struct parent *bufp, size_t bufsz,
                unsigned int *count);
 
index fbc8e9e1b4605b0d588d0188563c3269a0a45638..9667289a6fe1f5bc664842f296788e75844fa817 100644 (file)
--- a/io/imap.c
+++ b/io/imap.c
@@ -18,8 +18,8 @@ imap_f(int argc, char **argv)
        int             nent;
        int             i;
        __u64           last = 0;
-       xfs_inogrp_t    *t;
-       xfs_fsop_bulkreq_t bulkreq;
+       struct xfs_inogrp *t;
+       struct xfs_fsop_bulkreq bulkreq;
 
        if (argc != 2)
                nent = 1;
index ffa55f6d6e0dce6c3ba94a3fe5b64862f6119e14..18bbf9b8c7d38144f04a31e3d2e44992d3241eba 100644 (file)
@@ -26,7 +26,7 @@ static char *mntpt;
  * check out a parent entry to see if the values seem valid
  */
 static void
-check_parent_entry(xfs_bstat_t *bstatp, parent_t *parent)
+check_parent_entry(struct xfs_bstat *bstatp, parent_t *parent)
 {
        int sts;
        char fullpath[PATH_MAX];
@@ -109,7 +109,7 @@ check_parent_entry(xfs_bstat_t *bstatp, parent_t *parent)
 
 static void
 check_parents(parent_t *parentbuf, size_t *parentbuf_size,
-            jdm_fshandle_t *fshandlep, xfs_bstat_t *statp)
+            jdm_fshandle_t *fshandlep, struct xfs_bstat *statp)
 {
        int error, i;
        __u32 count;
@@ -146,14 +146,14 @@ check_parents(parent_t *parentbuf, size_t *parentbuf_size,
 }
 
 static int
-do_bulkstat(parent_t *parentbuf, size_t *parentbuf_size, xfs_bstat_t *bstatbuf,
-           int fsfd, jdm_fshandle_t *fshandlep)
+do_bulkstat(parent_t *parentbuf, size_t *parentbuf_size,
+           struct xfs_bstat *bstatbuf, int fsfd, jdm_fshandle_t *fshandlep)
 {
        __s32 buflenout;
        __u64 lastino = 0;
-       xfs_bstat_t *p;
-       xfs_bstat_t *endp;
-       xfs_fsop_bulkreq_t bulkreq;
+       struct xfs_bstat *p;
+       struct xfs_bstat *endp;
+       struct xfs_fsop_bulkreq bulkreq;
        struct stat mntstat;
 
        if (stat(mntpt, &mntstat)) {
@@ -222,7 +222,7 @@ parent_check(void)
        jdm_fshandle_t *fshandlep;
        parent_t *parentbuf;
        size_t parentbuf_size = PARENTBUF_SZ;
-       xfs_bstat_t *bstatbuf;
+       struct xfs_bstat *bstatbuf;
 
        err_status = 0;
        inodes_checked = 0;
@@ -240,7 +240,7 @@ parent_check(void)
        }
 
        /* allocate buffers */
-        bstatbuf = (xfs_bstat_t *)calloc(BSTATBUF_SZ, sizeof(xfs_bstat_t));
+        bstatbuf = (struct xfs_bstat *)calloc(BSTATBUF_SZ, sizeof(struct xfs_bstat));
        parentbuf = (parent_t *)malloc(parentbuf_size);
        if (!bstatbuf || !parentbuf) {
                fprintf(stderr, _("unable to allocate buffers: %s\n"),
index d2b9781a84236f3dc5c2bb1c70b5be211a9cb27c..07b0c60985ee9a749a019c12e1f8cbb59f43cf69 100644 (file)
@@ -32,7 +32,7 @@ typedef struct filehandle {
 static void
 jdm_fill_filehandle( filehandle_t *handlep,
                     fshandle_t *fshandlep,
-                    xfs_bstat_t *statp )
+                    struct xfs_bstat *statp)
 {
        handlep->fh_fshandle = *fshandlep;
        handlep->fh_sz_following = FILEHANDLE_SZ_FOLLOWING;
@@ -80,7 +80,7 @@ void
 jdm_new_filehandle( jdm_filehandle_t **handlep,
                    size_t *hlen,
                    jdm_fshandle_t *fshandlep,
-                   xfs_bstat_t *statp)
+                   struct xfs_bstat *statp)
 {
        /* allocate and fill filehandle */
        *hlen = sizeof(filehandle_t);
@@ -98,7 +98,7 @@ jdm_delete_filehandle( jdm_filehandle_t *handlep, size_t hlen )
 }
 
 intgen_t
-jdm_open( jdm_fshandle_t *fshp, xfs_bstat_t *statp, intgen_t oflags )
+jdm_open( jdm_fshandle_t *fshp, struct xfs_bstat *statp, intgen_t oflags )
 {
        fshandle_t *fshandlep = ( fshandle_t * )fshp;
        filehandle_t filehandle;
@@ -113,7 +113,7 @@ jdm_open( jdm_fshandle_t *fshp, xfs_bstat_t *statp, intgen_t oflags )
 
 intgen_t
 jdm_readlink( jdm_fshandle_t *fshp,
-             xfs_bstat_t *statp,
+             struct xfs_bstat *statp,
              char *bufp, size_t bufsz )
 {
        fshandle_t *fshandlep = ( fshandle_t * )fshp;
@@ -130,7 +130,7 @@ jdm_readlink( jdm_fshandle_t *fshp,
 
 int
 jdm_attr_multi(        jdm_fshandle_t *fshp,
-               xfs_bstat_t *statp,
+               struct xfs_bstat *statp,
                char *bufp, int rtrvcnt, int flags)
 {
        fshandle_t *fshandlep = ( fshandle_t * )fshp;
@@ -147,7 +147,7 @@ jdm_attr_multi(     jdm_fshandle_t *fshp,
 
 int
 jdm_attr_list( jdm_fshandle_t *fshp,
-               xfs_bstat_t *statp,
+               struct xfs_bstat *statp,
                char *bufp, size_t bufsz, int flags,
                struct attrlist_cursor *cursor)
 {
@@ -168,7 +168,7 @@ jdm_attr_list(      jdm_fshandle_t *fshp,
 
 int
 jdm_parents( jdm_fshandle_t *fshp,
-               xfs_bstat_t *statp,
+               struct xfs_bstat *statp,
                parent_t *bufp, size_t bufsz,
                unsigned int *count)
 {
@@ -178,7 +178,7 @@ jdm_parents( jdm_fshandle_t *fshp,
 
 int
 jdm_parentpaths( jdm_fshandle_t *fshp,
-               xfs_bstat_t *statp,
+               struct xfs_bstat *statp,
                parent_t *bufp, size_t bufsz,
                unsigned int *count)
 {
index 253b706c9586f8ae502f33f694e3fa62bbae4299..f67c3f766ccf3013abbe6a20a88b127dd183e3a8 100644 (file)
@@ -118,7 +118,7 @@ struct getbmapx {
  * 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
- * xfs_bstat_t fields bs_dmevmask and bs_dmstate.)
+ * struct xfs_bstat fields bs_dmevmask and bs_dmstate.)
  */
 #ifndef HAVE_FSDMIDATA
 struct fsdmidata {
@@ -349,7 +349,7 @@ typedef struct xfs_bstime {
        __s32           tv_nsec;        /* and nanoseconds      */
 } xfs_bstime_t;
 
-typedef struct xfs_bstat {
+struct xfs_bstat {
        __u64           bs_ino;         /* inode number                 */
        __u16           bs_mode;        /* type and mode                */
        __u16           bs_nlink;       /* number of links              */
@@ -377,7 +377,7 @@ typedef struct xfs_bstat {
        __u32           bs_dmevmask;    /* DMIG event mask              */
        __u16           bs_dmstate;     /* DMIG state info              */
        __u16           bs_aextents;    /* attribute number of extents  */
-} xfs_bstat_t;
+};
 
 /* bs_sick flags */
 #define XFS_BS_SICK_INODE      (1 << 0)  /* inode core */
@@ -403,22 +403,22 @@ bstat_get_projid(struct xfs_bstat *bs)
 /*
  * The user-level BulkStat Request interface structure.
  */
-typedef struct xfs_fsop_bulkreq {
+struct xfs_fsop_bulkreq {
        __u64           __user *lastip; /* last inode # pointer         */
        __s32           icount;         /* count of entries in buffer   */
        void            __user *ubuffer;/* user buffer for inode desc.  */
        __s32           __user *ocount; /* output count pointer         */
-} xfs_fsop_bulkreq_t;
+};
 
 
 /*
  * Structures returned from xfs_inumbers routine (XFS_IOC_FSINUMBERS).
  */
-typedef struct xfs_inogrp {
+struct xfs_inogrp {
        __u64           xi_startino;    /* starting inode number        */
        __s32           xi_alloccount;  /* # bits set in allocmask      */
        __u64           xi_allocmask;   /* mask of allocated inodes     */
-} xfs_inogrp_t;
+};
 
 
 /*
@@ -550,7 +550,7 @@ typedef struct xfs_swapext
        xfs_off_t       sx_offset;      /* offset into file */
        xfs_off_t       sx_length;      /* leng from offset */
        char            sx_pad[16];     /* pad space, unused */
-       xfs_bstat_t     sx_stat;        /* stat of target b4 copy */
+       struct xfs_bstat sx_stat;       /* stat of target b4 copy */
 } xfs_swapext_t;
 
 /*
index d60cf4a8e9ec0e375471ed18d0c08f4081167a76..6bc911711c382761b3a4a2bbfb549586d0e7e039 100644 (file)
@@ -67,7 +67,7 @@ quot_help(void)
 
 static void
 quot_bulkstat_add(
-       xfs_bstat_t     *p,
+       struct xfs_bstat *p,
        uint            flags)
 {
        du_t            *dp;
@@ -126,8 +126,8 @@ quot_bulkstat_mount(
        char                    *fsdir,
        uint                    flags)
 {
-       xfs_fsop_bulkreq_t      bulkreq;
-       xfs_bstat_t             *buf;
+       struct xfs_fsop_bulkreq bulkreq;
+       struct xfs_bstat        *buf;
        __u64                   last = 0;
        __s32                   count;
        int                     i, sts, fsfd;
@@ -151,7 +151,7 @@ quot_bulkstat_mount(
                return;
        }
 
-       buf = (xfs_bstat_t *)calloc(NBSTAT, sizeof(xfs_bstat_t));
+       buf = (struct xfs_bstat *)calloc(NBSTAT, sizeof(struct xfs_bstat));
        if (!buf) {
                perror("calloc");
                close(fsfd);