]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
xfs: remove xfs_buf_t typedef libxfs-5.11-sync
authorDave Chinner <dchinner@redhat.com>
Thu, 7 Jan 2021 20:59:18 +0000 (15:59 -0500)
committerEric Sandeen <sandeen@sandeen.net>
Thu, 7 Jan 2021 20:59:18 +0000 (15:59 -0500)
Source kernel commit: e82226138b20d4f638426413e83c6b5db532c6a2

Prepare for kernel xfs_buf  alignment by getting rid of the
xfs_buf_t typedef from userspace.

[darrick: This patch is a port of a userspace patch removing the
xfs_buf_t typedef in preparation to make the userspace xfs_buf code
behave more like its kernel counterpart.]

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
30 files changed:
copy/xfs_copy.c
include/libxfs.h
include/libxlog.h
libxfs/init.c
libxfs/libxfs_io.h
libxfs/libxfs_priv.h
libxfs/logitem.c
libxfs/rdwr.c
libxfs/trans.c
libxfs/util.c
libxfs/xfs_alloc.c
libxfs/xfs_bmap.c
libxfs/xfs_btree.c
libxfs/xfs_ialloc.c
libxfs/xfs_rtbitmap.c
libxlog/xfs_log_recover.c
logprint/log_print_all.c
mkfs/proto.c
mkfs/xfs_mkfs.c
repair/agheader.c
repair/attr_repair.c
repair/da_util.h
repair/dino_chunks.c
repair/incore.h
repair/phase5.c
repair/phase6.c
repair/prefetch.c
repair/rt.c
repair/scan.c
repair/xfs_repair.c

index 38a20d37a015f8bb2f1a4c583027547b688b8090..fc7d225fe6a2792a75e0a10467d7810c34203bc9 100644 (file)
@@ -569,7 +569,7 @@ main(int argc, char **argv)
        xfs_mount_t     *mp;
        xfs_mount_t     mbuf;
        struct xlog     xlog;
-       xfs_buf_t       *sbp;
+       struct xfs_buf  *sbp;
        xfs_sb_t        *sb;
        xfs_agnumber_t  num_ags, agno;
        xfs_agblock_t   bno;
index ad077eaa0f038155dd763299fd39b83decad5359..bc07655e64f1e1767981f5274d46b44f7b503238 100644 (file)
@@ -104,7 +104,7 @@ typedef struct libxfs_xinit {
        int             risfile;        /* realtime "subvolume" is a reg file */
        int             rcreat;         /* try to create realtime subvolume */
        int             setblksize;     /* attempt to set device blksize */
-       int             usebuflock;     /* lock xfs_buf_t's - for MT usage */
+       int             usebuflock;     /* lock xfs_buf's - for MT usage */
                                /* output results */
        dev_t           ddev;           /* device for data subvolume */
        dev_t           logdev;         /* device for log subvolume */
index 89e0ed6690867abb4008ece41b4d626f48c2f281..adaa9963cddcfde57b0e35db15222ddff77bf463 100644 (file)
@@ -76,12 +76,12 @@ extern int xlog_is_dirty(struct xfs_mount *, struct xlog *, libxfs_init_t *,
                         int);
 extern struct xfs_buf *xlog_get_bp(struct xlog *, int);
 extern int     xlog_bread(struct xlog *log, xfs_daddr_t blk_no, int nbblks,
-                               xfs_buf_t *bp, char **offset);
+                               struct xfs_buf *bp, char **offset);
 extern int     xlog_bread_noalign(struct xlog *log, xfs_daddr_t blk_no,
-                               int nbblks, xfs_buf_t *bp);
+                               int nbblks, struct xfs_buf *bp);
 
 extern int     xlog_find_zeroed(struct xlog *log, xfs_daddr_t *blk_no);
-extern int     xlog_find_cycle_start(struct xlog *log, xfs_buf_t *bp,
+extern int     xlog_find_cycle_start(struct xlog *log, struct xfs_buf *bp,
                                xfs_daddr_t first_blk, xfs_daddr_t *last_blk,
                                uint cycle);
 extern int     xlog_find_tail(struct xlog *log, xfs_daddr_t *head_blk,
index bd176b50bf63ce1862391af67d6b863ac0683498..9fe13b8d9d55018c2271889b1ddb5be3e9738801 100644 (file)
@@ -30,7 +30,7 @@ char *progname = "libxfs";    /* default, changed by each tool */
 struct cache *libxfs_bcache;   /* global buffer cache */
 int libxfs_bhash_size;         /* #buckets in bcache */
 
-int    use_xfs_buf_lock;       /* global flag: use xfs_buf_t locks for MT */
+int    use_xfs_buf_lock;       /* global flag: use xfs_buf locks for MT */
 
 /*
  * dev_map - map open devices to fd.
index 1eccedfc5fe197093e613d995cdc8237a699d668..c80e2d59ad2184254f409d0defee3c4e580a7d65 100644 (file)
@@ -57,7 +57,7 @@ struct xfs_buf_ops {
        xfs_failaddr_t (*verify_struct)(struct xfs_buf *);
 };
 
-typedef struct xfs_buf {
+struct xfs_buf {
        struct cache_node       b_node;
        unsigned int            b_flags;
        xfs_daddr_t             b_bn;
@@ -78,7 +78,7 @@ typedef struct xfs_buf {
        struct xfs_buf_map      __b_map;
        int                     b_nmaps;
        struct list_head        b_list;
-} xfs_buf_t;
+};
 
 bool xfs_verify_magic(struct xfs_buf *bp, __be32 dmagic);
 bool xfs_verify_magic16(struct xfs_buf *bp, __be16 dmagic);
@@ -163,7 +163,7 @@ extern int  libxfs_bcache_overflowed(void);
 
 /* Buffer (Raw) Interfaces */
 int            libxfs_bwrite(struct xfs_buf *bp);
-extern int     libxfs_readbufr(struct xfs_buftarg *, xfs_daddr_t, xfs_buf_t *, int, int);
+extern int     libxfs_readbufr(struct xfs_buftarg *, xfs_daddr_t, struct xfs_buf *, int, int);
 extern int     libxfs_readbufr_map(struct xfs_buftarg *, struct xfs_buf *, int);
 
 extern int     libxfs_device_zero(struct xfs_buftarg *, xfs_daddr_t, uint);
index e92269f0bdae1495c4abe00455e34bd62d7202cb..f1b1ca1074e6b08017b55f6d2203857da1c76a1f 100644 (file)
@@ -663,10 +663,10 @@ int xfs_rtmodify_range(struct xfs_mount *mp, struct xfs_trans *tp,
                       xfs_rtblock_t start, xfs_extlen_t len, int val);
 int xfs_rtmodify_summary_int(struct xfs_mount *mp, struct xfs_trans *tp,
                             int log, xfs_rtblock_t bbno, int delta,
-                            xfs_buf_t **rbpp, xfs_fsblock_t *rsb,
+                            struct xfs_buf **rbpp, xfs_fsblock_t *rsb,
                             xfs_suminfo_t *sum);
 int xfs_rtmodify_summary(struct xfs_mount *mp, struct xfs_trans *tp, int log,
-                        xfs_rtblock_t bbno, int delta, xfs_buf_t **rbpp,
+                        xfs_rtblock_t bbno, int delta, struct xfs_buf **rbpp,
                         xfs_fsblock_t *rsb);
 int xfs_rtfree_range(struct xfs_mount *mp, struct xfs_trans *tp,
                     xfs_rtblock_t start, xfs_extlen_t len,
index 43a98f284129ae5772579ac2288f23b427904718..4d4e8080dffc8ce3915ca7d9a2398dc3d0dcdc9b 100644 (file)
@@ -27,7 +27,7 @@ kmem_zone_t   *xfs_ili_zone;          /* inode log item zone */
  * Check to see if a buffer matching the given parameters is already
  * a part of the given transaction.
  */
-xfs_buf_t *
+struct xfs_buf *
 xfs_trans_buf_item_match(
        xfs_trans_t             *tp,
        struct xfs_buftarg      *btp,
@@ -68,7 +68,7 @@ xfs_trans_buf_item_match(
  */
 void
 xfs_buf_item_init(
-       xfs_buf_t               *bp,
+       struct xfs_buf          *bp,
        xfs_mount_t             *mp)
 {
        xfs_log_item_t          *lip;
index 2e0384017fa1c510706758da674fcbc19ca8e2b5..ac783ce3801ec992e5193a74a4f66b701101a8ca 100644 (file)
@@ -223,7 +223,7 @@ libxfs_bcompare(struct cache_node *node, cache_key_t key)
 }
 
 static void
-__initbuf(xfs_buf_t *bp, struct xfs_buftarg *btp, xfs_daddr_t bno,
+__initbuf(struct xfs_buf *bp, struct xfs_buftarg *btp, xfs_daddr_t bno,
                unsigned int bytes)
 {
        bp->b_flags = 0;
@@ -257,14 +257,14 @@ __initbuf(xfs_buf_t *bp, struct xfs_buftarg *btp, xfs_daddr_t bno,
 }
 
 static void
-libxfs_initbuf(xfs_buf_t *bp, struct xfs_buftarg *btp, xfs_daddr_t bno,
+libxfs_initbuf(struct xfs_buf *bp, struct xfs_buftarg *btp, xfs_daddr_t bno,
                unsigned int bytes)
 {
        __initbuf(bp, btp, bno, bytes);
 }
 
 static void
-libxfs_initbuf_map(xfs_buf_t *bp, struct xfs_buftarg *btp,
+libxfs_initbuf_map(struct xfs_buf *bp, struct xfs_buftarg *btp,
                struct xfs_buf_map *map, int nmaps)
 {
        unsigned int bytes = 0;
@@ -292,10 +292,10 @@ libxfs_initbuf_map(xfs_buf_t *bp, struct xfs_buftarg *btp,
        bp->b_flags |= LIBXFS_B_DISCONTIG;
 }
 
-static xfs_buf_t *
+static struct xfs_buf *
 __libxfs_getbufr(int blen)
 {
-       xfs_buf_t       *bp;
+       struct xfs_buf  *bp;
 
        /*
         * first look for a buffer that can be used as-is,
@@ -313,7 +313,7 @@ __libxfs_getbufr(int blen)
                }
                if (&bp->b_node.cn_mru == &xfs_buf_freelist.cm_list) {
                        bp = list_entry(xfs_buf_freelist.cm_list.next,
-                                       xfs_buf_t, b_node.cn_mru);
+                                       struct xfs_buf, b_node.cn_mru);
                        list_del_init(&bp->b_node.cn_mru);
                        free(bp->b_addr);
                        bp->b_addr = NULL;
@@ -331,10 +331,10 @@ __libxfs_getbufr(int blen)
        return bp;
 }
 
-static xfs_buf_t *
+static struct xfs_buf *
 libxfs_getbufr(struct xfs_buftarg *btp, xfs_daddr_t blkno, int bblen)
 {
-       xfs_buf_t       *bp;
+       struct xfs_buf  *bp;
        int             blen = BBTOB(bblen);
 
        bp =__libxfs_getbufr(blen);
@@ -343,11 +343,11 @@ libxfs_getbufr(struct xfs_buftarg *btp, xfs_daddr_t blkno, int bblen)
        return bp;
 }
 
-static xfs_buf_t *
+static struct xfs_buf *
 libxfs_getbufr_map(struct xfs_buftarg *btp, xfs_daddr_t blkno, int bblen,
                struct xfs_buf_map *map, int nmaps)
 {
-       xfs_buf_t       *bp;
+       struct xfs_buf  *bp;
        int             blen = BBTOB(bblen);
 
        if (!map || !nmaps) {
@@ -574,7 +574,7 @@ __read_buf(int fd, void *buf, int len, off64_t offset, int flags)
 }
 
 int
-libxfs_readbufr(struct xfs_buftarg *btp, xfs_daddr_t blkno, xfs_buf_t *bp,
+libxfs_readbufr(struct xfs_buftarg *btp, xfs_daddr_t blkno, struct xfs_buf *bp,
                int len, int flags)
 {
        int     fd = libxfs_device_to_fd(btp->bt_bdev);
@@ -915,7 +915,7 @@ libxfs_bulkrelse(
        struct cache            *cache,
        struct list_head        *list)
 {
-       xfs_buf_t               *bp;
+       struct xfs_buf          *bp;
        int                     count = 0;
 
        if (list_empty(list))
@@ -941,7 +941,7 @@ void
 libxfs_bcache_free(void)
 {
        struct list_head        *cm_list;
-       xfs_buf_t               *bp, *next;
+       struct xfs_buf          *bp, *next;
 
        cm_list = &xfs_buf_freelist.cm_list;
        list_for_each_entry_safe(bp, next, cm_list, b_node.cn_mru) {
index bc4af26c09f603a7e75a58e4ed50f7d7348b5107..a4a5cbe0734104bc8a1855c3f566157d42d884ec 100644 (file)
@@ -396,7 +396,7 @@ libxfs_trans_bjoin(
 void
 libxfs_trans_bhold_release(
        xfs_trans_t             *tp,
-       xfs_buf_t               *bp)
+       struct xfs_buf          *bp)
 {
        struct xfs_buf_log_item *bip = bp->b_log_item;
 
@@ -462,7 +462,7 @@ libxfs_trans_get_buf_map(
        return 0;
 }
 
-xfs_buf_t *
+struct xfs_buf *
 libxfs_trans_getsb(
        struct xfs_trans        *tp)
 {
@@ -605,7 +605,7 @@ libxfs_trans_brelse(
 void
 libxfs_trans_bhold(
        xfs_trans_t             *tp,
-       xfs_buf_t               *bp)
+       struct xfs_buf          *bp)
 {
        struct xfs_buf_log_item *bip = bp->b_log_item;
 
@@ -662,7 +662,7 @@ libxfs_trans_log_buf(
 void
 libxfs_trans_binval(
        xfs_trans_t             *tp,
-       xfs_buf_t               *bp)
+       struct xfs_buf          *bp)
 {
        struct xfs_buf_log_item *bip = bp->b_log_item;
 
@@ -696,7 +696,7 @@ libxfs_trans_binval(
 void
 libxfs_trans_inode_alloc_buf(
        xfs_trans_t             *tp,
-       xfs_buf_t               *bp)
+       struct xfs_buf          *bp)
 {
        struct xfs_buf_log_item *bip = bp->b_log_item;
 
@@ -813,7 +813,7 @@ static void
 inode_item_done(
        struct xfs_inode_log_item       *iip)
 {
-       xfs_buf_t                       *bp;
+       struct xfs_buf                  *bp;
        int                             error;
 
        ASSERT(iip->ili_inode != NULL);
@@ -849,7 +849,7 @@ static void
 buf_item_done(
        xfs_buf_log_item_t      *bip)
 {
-       xfs_buf_t               *bp;
+       struct xfs_buf          *bp;
        int                     hold;
        extern kmem_zone_t      *xfs_buf_item_zone;
 
@@ -893,7 +893,7 @@ static void
 buf_item_unlock(
        xfs_buf_log_item_t      *bip)
 {
-       xfs_buf_t               *bp = bip->bli_buf;
+       struct xfs_buf          *bp = bip->bli_buf;
        uint                    hold;
 
        /* Clear the buffer's association with this transaction. */
index 2ee9337ad9be61c660233596a517ffefc5366592..1025ad2462989685769bf28b1cebbc77ae7f7a26 100644 (file)
@@ -339,7 +339,7 @@ libxfs_init_new_inode(
 int
 libxfs_iflush_int(
        xfs_inode_t                     *ip,
-       xfs_buf_t                       *bp)
+       struct xfs_buf                  *bp)
 {
        struct xfs_inode_log_item       *iip;
        xfs_dinode_t                    *dip;
index 92f61fae4a7083e8b670d048e657108403bc0a0b..0bef9f0d8b4aff44a810436b240d2f59764f66f7 100644 (file)
@@ -686,9 +686,9 @@ xfs_alloc_read_agfl(
        xfs_mount_t     *mp,            /* mount point structure */
        xfs_trans_t     *tp,            /* transaction pointer */
        xfs_agnumber_t  agno,           /* allocation group number */
-       xfs_buf_t       **bpp)          /* buffer for the ag free block array */
+       struct xfs_buf  **bpp)          /* buffer for the ag free block array */
 {
-       xfs_buf_t       *bp;            /* return value */
+       struct xfs_buf  *bp;            /* return value */
        int             error;
 
        ASSERT(agno != NULLAGNUMBER);
@@ -2643,12 +2643,12 @@ out_no_agbp:
 int                            /* error */
 xfs_alloc_get_freelist(
        xfs_trans_t     *tp,    /* transaction pointer */
-       xfs_buf_t       *agbp,  /* buffer containing the agf structure */
+       struct xfs_buf  *agbp,  /* buffer containing the agf structure */
        xfs_agblock_t   *bnop,  /* block address retrieved from freelist */
        int             btreeblk) /* destination is a AGF btree */
 {
        struct xfs_agf  *agf = agbp->b_addr;
-       xfs_buf_t       *agflbp;/* buffer for a.g. freelist structure */
+       struct xfs_buf  *agflbp;/* buffer for a.g. freelist structure */
        xfs_agblock_t   bno;    /* block number returned */
        __be32          *agfl_bno;
        int             error;
@@ -2707,7 +2707,7 @@ xfs_alloc_get_freelist(
 void
 xfs_alloc_log_agf(
        xfs_trans_t     *tp,    /* transaction pointer */
-       xfs_buf_t       *bp,    /* buffer for a.g. freelist header */
+       struct xfs_buf  *bp,    /* buffer for a.g. freelist header */
        int             fields) /* mask of fields to be logged (XFS_AGF_...) */
 {
        int     first;          /* first byte offset */
@@ -2753,7 +2753,7 @@ xfs_alloc_pagf_init(
        xfs_agnumber_t          agno,   /* allocation group number */
        int                     flags)  /* XFS_ALLOC_FLAGS_... */
 {
-       xfs_buf_t               *bp;
+       struct xfs_buf          *bp;
        int                     error;
 
        error = xfs_alloc_read_agf(mp, tp, agno, flags, &bp);
@@ -2768,8 +2768,8 @@ xfs_alloc_pagf_init(
 int                                    /* error */
 xfs_alloc_put_freelist(
        xfs_trans_t             *tp,    /* transaction pointer */
-       xfs_buf_t               *agbp,  /* buffer for a.g. freelist header */
-       xfs_buf_t               *agflbp,/* buffer for a.g. free block array */
+       struct xfs_buf          *agbp,  /* buffer for a.g. freelist header */
+       struct xfs_buf          *agflbp,/* buffer for a.g. free block array */
        xfs_agblock_t           bno,    /* block being freed */
        int                     btreeblk) /* block came from a AGF btree */
 {
index 458085e3479a857738feb588683b04fd57d22829..1e53cbdd083358ea246f0e9c00ee702bba5ab36f 100644 (file)
@@ -314,7 +314,7 @@ xfs_bmap_check_leaf_extents(
        struct xfs_ifork        *ifp = XFS_IFORK_PTR(ip, whichfork);
        struct xfs_btree_block  *block; /* current btree block */
        xfs_fsblock_t           bno;    /* block # of "block" */
-       xfs_buf_t               *bp;    /* buffer for "block" */
+       struct xfs_buf          *bp;    /* buffer for "block" */
        int                     error;  /* error return value */
        xfs_extnum_t            i=0, j; /* index into the extents list */
        int                     level;  /* btree level, for checking */
@@ -585,7 +585,7 @@ xfs_bmap_btree_to_extents(
        struct xfs_btree_block  *rblock = ifp->if_broot;
        struct xfs_btree_block  *cblock;/* child btree block */
        xfs_fsblock_t           cbno;   /* child block number */
-       xfs_buf_t               *cbp;   /* child block's buffer */
+       struct xfs_buf          *cbp;   /* child block's buffer */
        int                     error;  /* error return value */
        __be64                  *pp;    /* ptr to block address */
        struct xfs_owner_info   oinfo;
@@ -823,7 +823,7 @@ xfs_bmap_local_to_extents(
        int             flags;          /* logging flags returned */
        struct xfs_ifork *ifp;          /* inode fork pointer */
        xfs_alloc_arg_t args;           /* allocation arguments */
-       xfs_buf_t       *bp;            /* buffer for extent block */
+       struct xfs_buf  *bp;            /* buffer for extent block */
        struct xfs_bmbt_irec rec;
        struct xfs_iext_cursor icur;
 
index da122d88d3c230df6eebb8af67bac018dd054669..a2356df6a097c804ca6c5598040edf08b6350ed3 100644 (file)
@@ -394,7 +394,7 @@ xfs_btree_dup_cursor(
        xfs_btree_cur_t *cur,           /* input cursor */
        xfs_btree_cur_t **ncur)         /* output cursor */
 {
-       xfs_buf_t       *bp;            /* btree block's buffer pointer */
+       struct xfs_buf  *bp;            /* btree block's buffer pointer */
        int             error;          /* error return value */
        int             i;              /* level number of btree block */
        xfs_mount_t     *mp;            /* mount structure for filesystem */
@@ -698,7 +698,7 @@ xfs_btree_firstrec(
        int                     level)  /* level to change */
 {
        struct xfs_btree_block  *block; /* generic btree block pointer */
-       xfs_buf_t               *bp;    /* buffer containing block */
+       struct xfs_buf          *bp;    /* buffer containing block */
 
        /*
         * Get the block pointer for this level.
@@ -728,7 +728,7 @@ xfs_btree_lastrec(
        int                     level)  /* level to change */
 {
        struct xfs_btree_block  *block; /* generic btree block pointer */
-       xfs_buf_t               *bp;    /* buffer containing block */
+       struct xfs_buf          *bp;    /* buffer containing block */
 
        /*
         * Get the block pointer for this level.
@@ -990,7 +990,7 @@ STATIC void
 xfs_btree_setbuf(
        xfs_btree_cur_t         *cur,   /* btree cursor */
        int                     lev,    /* level in btree */
-       xfs_buf_t               *bp)    /* new buffer to set */
+       struct xfs_buf          *bp)    /* new buffer to set */
 {
        struct xfs_btree_block  *b;     /* btree block */
 
@@ -1633,7 +1633,7 @@ xfs_btree_decrement(
        int                     *stat)          /* success/failure */
 {
        struct xfs_btree_block  *block;
-       xfs_buf_t               *bp;
+       struct xfs_buf          *bp;
        int                     error;          /* error return value */
        int                     lev;
        union xfs_btree_ptr     ptr;
index 26a3d4b27c899d340f424173ed55832008af1d5b..c8e2125db85d2c9c245f8a89e509ded1ac309ead 100644 (file)
@@ -2454,7 +2454,7 @@ out_map:
 void
 xfs_ialloc_log_agi(
        xfs_trans_t     *tp,            /* transaction pointer */
-       xfs_buf_t       *bp,            /* allocation group header buffer */
+       struct xfs_buf  *bp,            /* allocation group header buffer */
        int             fields)         /* bitmask of fields to log */
 {
        int                     first;          /* first byte number */
@@ -2675,7 +2675,7 @@ xfs_ialloc_pagi_init(
        xfs_trans_t     *tp,            /* transaction pointer */
        xfs_agnumber_t  agno)           /* allocation group number */
 {
-       xfs_buf_t       *bp = NULL;
+       struct xfs_buf  *bp = NULL;
        int             error;
 
        error = xfs_ialloc_read_agi(mp, tp, agno, &bp);
index dcb94f2059b1024a6ae7dad72f18eef65da5622b..db3e2449fd379957e0a1cf61152e3be2d5dbb4a1 100644 (file)
@@ -54,9 +54,9 @@ xfs_rtbuf_get(
        xfs_trans_t     *tp,            /* transaction pointer */
        xfs_rtblock_t   block,          /* block number in bitmap or summary */
        int             issum,          /* is summary not bitmap */
-       xfs_buf_t       **bpp)          /* output: buffer for the block */
+       struct xfs_buf  **bpp)          /* output: buffer for the block */
 {
-       xfs_buf_t       *bp;            /* block buffer, result */
+       struct xfs_buf  *bp;            /* block buffer, result */
        xfs_inode_t     *ip;            /* bitmap or summary inode */
        xfs_bmbt_irec_t map;
        int             nmap = 1;
@@ -99,7 +99,7 @@ xfs_rtfind_back(
        xfs_rtword_t    *b;             /* current word in buffer */
        int             bit;            /* bit number in the word */
        xfs_rtblock_t   block;          /* bitmap block number */
-       xfs_buf_t       *bp;            /* buf for the block */
+       struct xfs_buf  *bp;            /* buf for the block */
        xfs_rtword_t    *bufp;          /* starting word in buffer */
        int             error;          /* error value */
        xfs_rtblock_t   firstbit;       /* first useful bit in the word */
@@ -274,7 +274,7 @@ xfs_rtfind_forw(
        xfs_rtword_t    *b;             /* current word in buffer */
        int             bit;            /* bit number in the word */
        xfs_rtblock_t   block;          /* bitmap block number */
-       xfs_buf_t       *bp;            /* buf for the block */
+       struct xfs_buf  *bp;            /* buf for the block */
        xfs_rtword_t    *bufp;          /* starting word in buffer */
        int             error;          /* error value */
        xfs_rtblock_t   i;              /* current bit number rel. to start */
@@ -445,11 +445,11 @@ xfs_rtmodify_summary_int(
        int             log,            /* log2 of extent size */
        xfs_rtblock_t   bbno,           /* bitmap block number */
        int             delta,          /* change to make to summary info */
-       xfs_buf_t       **rbpp,         /* in/out: summary block buffer */
+       struct xfs_buf  **rbpp,         /* in/out: summary block buffer */
        xfs_fsblock_t   *rsb,           /* in/out: summary block number */
        xfs_suminfo_t   *sum)           /* out: summary info for this block */
 {
-       xfs_buf_t       *bp;            /* buffer for the summary block */
+       struct xfs_buf  *bp;            /* buffer for the summary block */
        int             error;          /* error value */
        xfs_fsblock_t   sb;             /* summary fsblock */
        int             so;             /* index into the summary file */
@@ -515,7 +515,7 @@ xfs_rtmodify_summary(
        int             log,            /* log2 of extent size */
        xfs_rtblock_t   bbno,           /* bitmap block number */
        int             delta,          /* change to make to summary info */
-       xfs_buf_t       **rbpp,         /* in/out: summary block buffer */
+       struct xfs_buf  **rbpp,         /* in/out: summary block buffer */
        xfs_fsblock_t   *rsb)           /* in/out: summary block number */
 {
        return xfs_rtmodify_summary_int(mp, tp, log, bbno,
@@ -537,7 +537,7 @@ xfs_rtmodify_range(
        xfs_rtword_t    *b;             /* current word in buffer */
        int             bit;            /* bit number in the word */
        xfs_rtblock_t   block;          /* bitmap block number */
-       xfs_buf_t       *bp;            /* buf for the block */
+       struct xfs_buf  *bp;            /* buf for the block */
        xfs_rtword_t    *bufp;          /* starting word in buffer */
        int             error;          /* error value */
        xfs_rtword_t    *first;         /* first used word in the buffer */
@@ -688,7 +688,7 @@ xfs_rtfree_range(
        xfs_trans_t     *tp,            /* transaction pointer */
        xfs_rtblock_t   start,          /* starting block to free */
        xfs_extlen_t    len,            /* length to free */
-       xfs_buf_t       **rbpp,         /* in/out: summary block buffer */
+       struct xfs_buf  **rbpp,         /* in/out: summary block buffer */
        xfs_fsblock_t   *rsb)           /* in/out: summary block number */
 {
        xfs_rtblock_t   end;            /* end of the freed extent */
@@ -771,7 +771,7 @@ xfs_rtcheck_range(
        xfs_rtword_t    *b;             /* current word in buffer */
        int             bit;            /* bit number in the word */
        xfs_rtblock_t   block;          /* bitmap block number */
-       xfs_buf_t       *bp;            /* buf for the block */
+       struct xfs_buf  *bp;            /* buf for the block */
        xfs_rtword_t    *bufp;          /* starting word in buffer */
        int             error;          /* error value */
        xfs_rtblock_t   i;              /* current bit number rel. to start */
@@ -967,7 +967,7 @@ xfs_rtfree_extent(
        int             error;          /* error value */
        xfs_mount_t     *mp;            /* file system mount structure */
        xfs_fsblock_t   sb;             /* summary file block number */
-       xfs_buf_t       *sumbp = NULL;  /* summary file block buffer */
+       struct xfs_buf  *sumbp = NULL;  /* summary file block buffer */
 
        mp = tp->t_mountp;
 
index 8fb439db62d52ee63444a7f9c29157e6399e8621..40d18b88f0f27eebb63cfcaf981821034e29b0a1 100644 (file)
@@ -227,7 +227,7 @@ xlog_find_verify_cycle(
 {
        xfs_daddr_t     i, j;
        uint            cycle;
-       xfs_buf_t       *bp;
+       struct xfs_buf  *bp;
        int             bufblks;
        char            *buf = NULL;
        int             error = 0;
@@ -294,7 +294,7 @@ xlog_find_verify_log_record(
        int                     extra_bblks)
 {
        xfs_daddr_t             i;
-       xfs_buf_t               *bp;
+       struct xfs_buf          *bp;
        char                    *offset = NULL;
        xlog_rec_header_t       *head = NULL;
        int                     error = 0;
@@ -401,7 +401,7 @@ xlog_find_head(
        struct xlog     *log,
        xfs_daddr_t     *return_head_blk)
 {
-       xfs_buf_t       *bp;
+       struct xfs_buf  *bp;
        char            *offset;
        xfs_daddr_t     new_blk, first_blk, start_blk, last_blk, head_blk;
        int             num_scan_bblks;
@@ -676,7 +676,7 @@ xlog_find_tail(
        xlog_rec_header_t       *rhead;
        xlog_op_header_t        *op_head;
        char                    *offset = NULL;
-       xfs_buf_t               *bp;
+       struct xfs_buf          *bp;
        int                     error, i, found;
        xfs_daddr_t             umount_data_blk;
        xfs_daddr_t             after_umount_blk;
@@ -882,7 +882,7 @@ xlog_find_zeroed(
        struct xlog     *log,
        xfs_daddr_t     *blk_no)
 {
-       xfs_buf_t       *bp;
+       struct xfs_buf  *bp;
        char            *offset;
        uint            first_cycle, last_cycle;
        xfs_daddr_t     new_blk, last_blk, start_blk;
@@ -1419,7 +1419,7 @@ xlog_do_recovery_pass(
        xlog_rec_header_t       *rhead;
        xfs_daddr_t             blk_no;
        char                    *offset;
-       xfs_buf_t               *hbp, *dbp;
+       struct xfs_buf          *hbp, *dbp;
        int                     error = 0, h_size;
        int                     bblks, split_bblks;
        int                     hblks, split_hblks, wrapped_hblks;
index f32c932992e3aef83ce8a3786c0decdca90a0736..20f2a445257899ab28ef27fa19cc63bf4a909bab 100644 (file)
@@ -16,7 +16,7 @@ xlog_print_find_oldest(
        struct xlog     *log,
        xfs_daddr_t     *last_blk)
 {
-       xfs_buf_t       *bp;
+       struct xfs_buf  *bp;
        xfs_daddr_t     first_blk;
        uint            first_half_cycle, last_half_cycle;
        int             error = 0;
index 8439efc44256d49c89d4617f545267240d053565..e1cf08d1761cc952390319d3597f0f0f5cdc27b9 100644 (file)
@@ -225,7 +225,7 @@ newfile(
        char            *buf,
        int             len)
 {
-       xfs_buf_t       *bp;
+       struct xfs_buf  *bp;
        xfs_daddr_t     d;
        int             error;
        int             flags;
index 47acc127c075a3115599c0d252226e70abe1158a..0c66255a3f531e4a194fc9647a36c0690a1e5780 100644 (file)
@@ -3800,7 +3800,7 @@ main(
        char                    **argv)
 {
        xfs_agnumber_t          agno;
-       xfs_buf_t               *buf;
+       struct xfs_buf          *buf;
        int                     c;
        char                    *dfile = NULL;
        char                    *logfile = NULL;
index f28d8a7bb0de041fec56425633709b01890bc0ce..8bb99489f8e74ca737c55f8b4a530a10142a42be 100644 (file)
@@ -467,7 +467,7 @@ secondary_sb_whack(
  */
 
 int
-verify_set_agheader(xfs_mount_t *mp, xfs_buf_t *sbuf, xfs_sb_t *sb,
+verify_set_agheader(xfs_mount_t *mp, struct xfs_buf *sbuf, xfs_sb_t *sb,
        xfs_agf_t *agf, xfs_agi_t *agi, xfs_agnumber_t i)
 {
        int rval = 0;
index ba39c2b5ede48c8a9d8af1bf9457c49fa7136b2a..bc3c2bef7c1635ab815f96e4450781fe708697ca 100644 (file)
@@ -388,7 +388,7 @@ rmtval_get(xfs_mount_t *mp, xfs_ino_t ino, blkmap_t *blkmap,
                xfs_dablk_t blocknum, int valuelen, char* value)
 {
        xfs_fsblock_t   bno;
-       xfs_buf_t       *bp;
+       struct xfs_buf  *bp;
        int             clearit = 0, i = 0, length = 0, amountdone = 0;
        int             hdrsize = 0;
        int             error;
@@ -730,7 +730,7 @@ process_leaf_attr_level(xfs_mount_t *mp,
 {
        int                     repair;
        xfs_attr_leafblock_t    *leaf;
-       xfs_buf_t               *bp;
+       struct xfs_buf          *bp;
        xfs_ino_t               ino;
        xfs_fsblock_t           dev_bno;
        xfs_dablk_t             da_bno;
index 90fec00c7addec87bfacca9b4d9cd04ffee086f1..2e26178c2511063abc19a965f4ff91f3193626a7 100644 (file)
@@ -8,7 +8,7 @@
 #define        _XR_DA_UTIL_H
 
 struct da_level_state  {
-       xfs_buf_t       *bp;            /* block bp */
+       struct xfs_buf  *bp;            /* block bp */
        xfs_dablk_t     bno;            /* file block number */
        xfs_dahash_t    hashval;        /* last verified hashval */
        int             index;          /* current index in block */
index 0c60ab431e13d0660b7c792f9def6d2d4055a48c..c87a435d8c6aec7f82d58a67e5744d7749af43b8 100644 (file)
@@ -30,7 +30,7 @@ check_aginode_block(xfs_mount_t       *mp,
        xfs_dinode_t    *dino_p;
        int             i;
        int             cnt = 0;
-       xfs_buf_t       *bp;
+       struct xfs_buf  *bp;
        int             error;
 
        /*
@@ -597,7 +597,7 @@ process_inode_chunk(
 {
        xfs_ino_t               parent;
        ino_tree_node_t         *ino_rec;
-       xfs_buf_t               **bplist;
+       struct xfs_buf          **bplist;
        xfs_dinode_t            *dino;
        int                     icnt;
        int                     status;
@@ -644,10 +644,10 @@ process_inode_chunk(
        ino_rec = first_irec;
        irec_offset = 0;
 
-       bplist = malloc(cluster_count * sizeof(xfs_buf_t *));
+       bplist = malloc(cluster_count * sizeof(struct xfs_buf *));
        if (bplist == NULL)
                do_error(_("failed to allocate %zd bytes of memory\n"),
-                       cluster_count * sizeof(xfs_buf_t *));
+                       cluster_count * sizeof(struct xfs_buf *));
 
        for (bp_index = 0; bp_index < cluster_count; bp_index++) {
                /*
index 074ca98a3989321d3098f5048e85ed185be8a5cb..977e5dd04336b1ac028a328d5696c1a9e18c026d 100644 (file)
@@ -599,7 +599,7 @@ typedef struct bm_level_state  {
 /*
        int                     level;
        uint64_t                prev_last_key;
-       xfs_buf_t               *bp;
+       struct xfs_buf          *bp;
        xfs_bmbt_block_t        *block;
 */
 } bm_level_state_t;
index b97d23809f3c47e8e53b83ce04f17295f5f50471..fcdf757ccd12640dcfeba0f5004d217a072a8bd5 100644 (file)
@@ -395,7 +395,7 @@ build_agf_agfl(
 static void
 sync_sb(xfs_mount_t *mp)
 {
-       xfs_buf_t       *bp;
+       struct xfs_buf  *bp;
 
        bp = libxfs_getsb(mp);
        if (!bp)
index f69afac90e82214a8c8e2c209a8ffdb1fd4cb9c0..14464befa8b693cf785bc11137c3c890aac52277 100644 (file)
@@ -558,7 +558,7 @@ mk_rbmino(xfs_mount_t *mp)
 static int
 fill_rbmino(xfs_mount_t *mp)
 {
-       xfs_buf_t       *bp;
+       struct xfs_buf  *bp;
        xfs_trans_t     *tp;
        xfs_inode_t     *ip;
        xfs_rtword_t    *bmp;
@@ -626,7 +626,7 @@ _("can't access block %" PRIu64 " (fsbno %" PRIu64 ") of realtime bitmap inode %
 static int
 fill_rsumino(xfs_mount_t *mp)
 {
-       xfs_buf_t       *bp;
+       struct xfs_buf  *bp;
        xfs_trans_t     *tp;
        xfs_inode_t     *ip;
        xfs_suminfo_t   *smp;
index 3e63b8bea484b415eea76891c8db0f72bd862acb..48affa1869f8d4a53374316bd892d97eb2f59d2c 100644 (file)
@@ -34,7 +34,7 @@ static int            pf_max_fsbs;
 static int             pf_batch_bytes;
 static int             pf_batch_fsbs;
 
-static void            pf_read_inode_dirs(prefetch_args_t *, xfs_buf_t *);
+static void            pf_read_inode_dirs(prefetch_args_t *, struct xfs_buf *);
 
 /*
  * Buffer priorities for the libxfs cache
@@ -271,7 +271,7 @@ pf_scan_lbtree(
                                        int                     isadir,
                                        prefetch_args_t         *args))
 {
-       xfs_buf_t               *bp;
+       struct xfs_buf          *bp;
        int                     rc;
        int                     error;
 
@@ -399,7 +399,7 @@ pf_read_exinode(
 static void
 pf_read_inode_dirs(
        prefetch_args_t         *args,
-       xfs_buf_t               *bp)
+       struct xfs_buf          *bp)
 {
        xfs_dinode_t            *dino;
        int                     icnt = 0;
@@ -473,7 +473,7 @@ pf_batch_read(
        pf_which_t              which,
        void                    *buf)
 {
-       xfs_buf_t               *bplist[MAX_BUFS];
+       struct xfs_buf          *bplist[MAX_BUFS];
        unsigned int            num;
        off64_t                 first_off, last_off, next_off;
        int                     len, size;
@@ -592,8 +592,8 @@ pf_batch_read(
 
                if (len > 0) {
                        /*
-                        * go through the xfs_buf_t list copying from the
-                        * read buffer into the xfs_buf_t's and release them.
+                        * go through the struct xfs_buf list copying from the
+                        * read buffer into the struct xfs_buf's and release them.
                         */
                        for (i = 0; i < num; i++) {
 
index d901e751830391ce4451ca4becad8a6c1a14be3b..793efb8089f9c1474307a925fc5e4730b8b2f726 100644 (file)
@@ -163,7 +163,7 @@ process_rtbitmap(xfs_mount_t        *mp,
        int             bmbno;
        int             end_bmbno;
        xfs_fsblock_t   bno;
-       xfs_buf_t       *bp;
+       struct xfs_buf  *bp;
        xfs_rtblock_t   extno;
        int             i;
        int             len;
@@ -243,7 +243,7 @@ process_rtsummary(xfs_mount_t       *mp,
                blkmap_t        *blkmap)
 {
        xfs_fsblock_t   bno;
-       xfs_buf_t       *bp;
+       struct xfs_buf  *bp;
        char            *bytes;
        int             sumbno;
 
index 44e794a0ac5a874e23d02833b7b7a63dd6c1b58d..2c25af5784cd46e47b9729a8c14f237d6bee640f 100644 (file)
@@ -152,7 +152,7 @@ scan_lbtree(
        uint64_t        magic,
        const struct xfs_buf_ops *ops)
 {
-       xfs_buf_t       *bp;
+       struct xfs_buf  *bp;
        int             err;
        int             dirty = 0;
        bool            badcrc = false;
@@ -2204,7 +2204,7 @@ scan_freelist(
        xfs_agf_t               *agf,
        struct aghdr_cnts       *agcnts)
 {
-       xfs_buf_t               *agflbuf;
+       struct xfs_buf          *agflbuf;
        xfs_agnumber_t          agno;
        struct agfl_state       state;
        int                     error;
index 5efc5586bf16d73a8f57454544ed072b1b6a8232..724661d848c4b40b1d796b1500730e974132e717 100644 (file)
@@ -718,7 +718,7 @@ main(int argc, char **argv)
        xfs_mount_t     *temp_mp;
        xfs_mount_t     *mp;
        xfs_dsb_t       *dsb;
-       xfs_buf_t       *sbp;
+       struct xfs_buf  *sbp;
        xfs_mount_t     xfs_m;
        struct xlog     log = {0};
        char            *msgbuf;