xfs: remove xfs_buf_t typedef

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>
This commit is contained in:
Dave Chinner 2020-12-16 16:07:34 -08:00 committed by Darrick J. Wong
parent 1189686e54
commit e82226138b
15 changed files with 78 additions and 78 deletions

View file

@ -690,9 +690,9 @@ xfs_alloc_read_agfl(
xfs_mount_t *mp, /* mount point structure */ xfs_mount_t *mp, /* mount point structure */
xfs_trans_t *tp, /* transaction pointer */ xfs_trans_t *tp, /* transaction pointer */
xfs_agnumber_t agno, /* allocation group number */ 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; int error;
ASSERT(agno != NULLAGNUMBER); ASSERT(agno != NULLAGNUMBER);
@ -2647,12 +2647,12 @@ xfs_alloc_fix_freelist(
int /* error */ int /* error */
xfs_alloc_get_freelist( xfs_alloc_get_freelist(
xfs_trans_t *tp, /* transaction pointer */ 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 */ xfs_agblock_t *bnop, /* block address retrieved from freelist */
int btreeblk) /* destination is a AGF btree */ int btreeblk) /* destination is a AGF btree */
{ {
struct xfs_agf *agf = agbp->b_addr; 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 */ xfs_agblock_t bno; /* block number returned */
__be32 *agfl_bno; __be32 *agfl_bno;
int error; int error;
@ -2711,7 +2711,7 @@ xfs_alloc_get_freelist(
void void
xfs_alloc_log_agf( xfs_alloc_log_agf(
xfs_trans_t *tp, /* transaction pointer */ 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 fields) /* mask of fields to be logged (XFS_AGF_...) */
{ {
int first; /* first byte offset */ int first; /* first byte offset */
@ -2757,7 +2757,7 @@ xfs_alloc_pagf_init(
xfs_agnumber_t agno, /* allocation group number */ xfs_agnumber_t agno, /* allocation group number */
int flags) /* XFS_ALLOC_FLAGS_... */ int flags) /* XFS_ALLOC_FLAGS_... */
{ {
xfs_buf_t *bp; struct xfs_buf *bp;
int error; int error;
error = xfs_alloc_read_agf(mp, tp, agno, flags, &bp); error = xfs_alloc_read_agf(mp, tp, agno, flags, &bp);
@ -2772,8 +2772,8 @@ xfs_alloc_pagf_init(
int /* error */ int /* error */
xfs_alloc_put_freelist( xfs_alloc_put_freelist(
xfs_trans_t *tp, /* transaction pointer */ xfs_trans_t *tp, /* transaction pointer */
xfs_buf_t *agbp, /* buffer for a.g. freelist header */ struct xfs_buf *agbp, /* buffer for a.g. freelist header */
xfs_buf_t *agflbp,/* buffer for a.g. free block array */ struct xfs_buf *agflbp,/* buffer for a.g. free block array */
xfs_agblock_t bno, /* block being freed */ xfs_agblock_t bno, /* block being freed */
int btreeblk) /* block came from a AGF btree */ int btreeblk) /* block came from a AGF btree */
{ {

View file

@ -321,7 +321,7 @@ xfs_bmap_check_leaf_extents(
struct xfs_ifork *ifp = XFS_IFORK_PTR(ip, whichfork); struct xfs_ifork *ifp = XFS_IFORK_PTR(ip, whichfork);
struct xfs_btree_block *block; /* current btree block */ struct xfs_btree_block *block; /* current btree block */
xfs_fsblock_t bno; /* block # of "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 */ int error; /* error return value */
xfs_extnum_t i=0, j; /* index into the extents list */ xfs_extnum_t i=0, j; /* index into the extents list */
int level; /* btree level, for checking */ int level; /* btree level, for checking */
@ -592,7 +592,7 @@ xfs_bmap_btree_to_extents(
struct xfs_btree_block *rblock = ifp->if_broot; struct xfs_btree_block *rblock = ifp->if_broot;
struct xfs_btree_block *cblock;/* child btree block */ struct xfs_btree_block *cblock;/* child btree block */
xfs_fsblock_t cbno; /* child block number */ 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 */ int error; /* error return value */
__be64 *pp; /* ptr to block address */ __be64 *pp; /* ptr to block address */
struct xfs_owner_info oinfo; struct xfs_owner_info oinfo;
@ -830,7 +830,7 @@ xfs_bmap_local_to_extents(
int flags; /* logging flags returned */ int flags; /* logging flags returned */
struct xfs_ifork *ifp; /* inode fork pointer */ struct xfs_ifork *ifp; /* inode fork pointer */
xfs_alloc_arg_t args; /* allocation arguments */ 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_bmbt_irec rec;
struct xfs_iext_cursor icur; struct xfs_iext_cursor icur;

View file

@ -397,7 +397,7 @@ xfs_btree_dup_cursor(
xfs_btree_cur_t *cur, /* input cursor */ xfs_btree_cur_t *cur, /* input cursor */
xfs_btree_cur_t **ncur) /* output 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 error; /* error return value */
int i; /* level number of btree block */ int i; /* level number of btree block */
xfs_mount_t *mp; /* mount structure for filesystem */ xfs_mount_t *mp; /* mount structure for filesystem */
@ -701,7 +701,7 @@ xfs_btree_firstrec(
int level) /* level to change */ int level) /* level to change */
{ {
struct xfs_btree_block *block; /* generic btree block pointer */ 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. * Get the block pointer for this level.
@ -731,7 +731,7 @@ xfs_btree_lastrec(
int level) /* level to change */ int level) /* level to change */
{ {
struct xfs_btree_block *block; /* generic btree block pointer */ 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. * Get the block pointer for this level.
@ -993,7 +993,7 @@ STATIC void
xfs_btree_setbuf( xfs_btree_setbuf(
xfs_btree_cur_t *cur, /* btree cursor */ xfs_btree_cur_t *cur, /* btree cursor */
int lev, /* level in btree */ 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 */ struct xfs_btree_block *b; /* btree block */
@ -1636,7 +1636,7 @@ xfs_btree_decrement(
int *stat) /* success/failure */ int *stat) /* success/failure */
{ {
struct xfs_btree_block *block; struct xfs_btree_block *block;
xfs_buf_t *bp; struct xfs_buf *bp;
int error; /* error return value */ int error; /* error return value */
int lev; int lev;
union xfs_btree_ptr ptr; union xfs_btree_ptr ptr;

View file

@ -2459,7 +2459,7 @@ xfs_imap(
void void
xfs_ialloc_log_agi( xfs_ialloc_log_agi(
xfs_trans_t *tp, /* transaction pointer */ 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 fields) /* bitmask of fields to log */
{ {
int first; /* first byte number */ int first; /* first byte number */
@ -2680,7 +2680,7 @@ xfs_ialloc_pagi_init(
xfs_trans_t *tp, /* transaction pointer */ xfs_trans_t *tp, /* transaction pointer */
xfs_agnumber_t agno) /* allocation group number */ xfs_agnumber_t agno) /* allocation group number */
{ {
xfs_buf_t *bp = NULL; struct xfs_buf *bp = NULL;
int error; int error;
error = xfs_ialloc_read_agi(mp, tp, agno, &bp); error = xfs_ialloc_read_agi(mp, tp, agno, &bp);

View file

@ -56,9 +56,9 @@ xfs_rtbuf_get(
xfs_trans_t *tp, /* transaction pointer */ xfs_trans_t *tp, /* transaction pointer */
xfs_rtblock_t block, /* block number in bitmap or summary */ xfs_rtblock_t block, /* block number in bitmap or summary */
int issum, /* is summary not bitmap */ 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_inode_t *ip; /* bitmap or summary inode */
xfs_bmbt_irec_t map; xfs_bmbt_irec_t map;
int nmap = 1; int nmap = 1;
@ -101,7 +101,7 @@ xfs_rtfind_back(
xfs_rtword_t *b; /* current word in buffer */ xfs_rtword_t *b; /* current word in buffer */
int bit; /* bit number in the word */ int bit; /* bit number in the word */
xfs_rtblock_t block; /* bitmap block number */ 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 */ xfs_rtword_t *bufp; /* starting word in buffer */
int error; /* error value */ int error; /* error value */
xfs_rtblock_t firstbit; /* first useful bit in the word */ xfs_rtblock_t firstbit; /* first useful bit in the word */
@ -276,7 +276,7 @@ xfs_rtfind_forw(
xfs_rtword_t *b; /* current word in buffer */ xfs_rtword_t *b; /* current word in buffer */
int bit; /* bit number in the word */ int bit; /* bit number in the word */
xfs_rtblock_t block; /* bitmap block number */ 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 */ xfs_rtword_t *bufp; /* starting word in buffer */
int error; /* error value */ int error; /* error value */
xfs_rtblock_t i; /* current bit number rel. to start */ xfs_rtblock_t i; /* current bit number rel. to start */
@ -447,11 +447,11 @@ xfs_rtmodify_summary_int(
int log, /* log2 of extent size */ int log, /* log2 of extent size */
xfs_rtblock_t bbno, /* bitmap block number */ xfs_rtblock_t bbno, /* bitmap block number */
int delta, /* change to make to summary info */ 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_fsblock_t *rsb, /* in/out: summary block number */
xfs_suminfo_t *sum) /* out: summary info for this block */ 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 */ int error; /* error value */
xfs_fsblock_t sb; /* summary fsblock */ xfs_fsblock_t sb; /* summary fsblock */
int so; /* index into the summary file */ int so; /* index into the summary file */
@ -517,7 +517,7 @@ xfs_rtmodify_summary(
int log, /* log2 of extent size */ int log, /* log2 of extent size */
xfs_rtblock_t bbno, /* bitmap block number */ xfs_rtblock_t bbno, /* bitmap block number */
int delta, /* change to make to summary info */ 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_fsblock_t *rsb) /* in/out: summary block number */
{ {
return xfs_rtmodify_summary_int(mp, tp, log, bbno, return xfs_rtmodify_summary_int(mp, tp, log, bbno,
@ -539,7 +539,7 @@ xfs_rtmodify_range(
xfs_rtword_t *b; /* current word in buffer */ xfs_rtword_t *b; /* current word in buffer */
int bit; /* bit number in the word */ int bit; /* bit number in the word */
xfs_rtblock_t block; /* bitmap block number */ 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 */ xfs_rtword_t *bufp; /* starting word in buffer */
int error; /* error value */ int error; /* error value */
xfs_rtword_t *first; /* first used word in the buffer */ xfs_rtword_t *first; /* first used word in the buffer */
@ -690,7 +690,7 @@ xfs_rtfree_range(
xfs_trans_t *tp, /* transaction pointer */ xfs_trans_t *tp, /* transaction pointer */
xfs_rtblock_t start, /* starting block to free */ xfs_rtblock_t start, /* starting block to free */
xfs_extlen_t len, /* length 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_fsblock_t *rsb) /* in/out: summary block number */
{ {
xfs_rtblock_t end; /* end of the freed extent */ xfs_rtblock_t end; /* end of the freed extent */
@ -773,7 +773,7 @@ xfs_rtcheck_range(
xfs_rtword_t *b; /* current word in buffer */ xfs_rtword_t *b; /* current word in buffer */
int bit; /* bit number in the word */ int bit; /* bit number in the word */
xfs_rtblock_t block; /* bitmap block number */ 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 */ xfs_rtword_t *bufp; /* starting word in buffer */
int error; /* error value */ int error; /* error value */
xfs_rtblock_t i; /* current bit number rel. to start */ xfs_rtblock_t i; /* current bit number rel. to start */
@ -969,7 +969,7 @@ xfs_rtfree_extent(
int error; /* error value */ int error; /* error value */
xfs_mount_t *mp; /* file system mount structure */ xfs_mount_t *mp; /* file system mount structure */
xfs_fsblock_t sb; /* summary file block number */ 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; mp = tp->t_mountp;

View file

@ -278,7 +278,7 @@ _xfs_buf_alloc(
*/ */
STATIC int STATIC int
_xfs_buf_get_pages( _xfs_buf_get_pages(
xfs_buf_t *bp, struct xfs_buf *bp,
int page_count) int page_count)
{ {
/* Make sure that we have a page list */ /* Make sure that we have a page list */
@ -302,7 +302,7 @@ _xfs_buf_get_pages(
*/ */
STATIC void STATIC void
_xfs_buf_free_pages( _xfs_buf_free_pages(
xfs_buf_t *bp) struct xfs_buf *bp)
{ {
if (bp->b_pages != bp->b_page_array) { if (bp->b_pages != bp->b_page_array) {
kmem_free(bp->b_pages); kmem_free(bp->b_pages);
@ -319,7 +319,7 @@ _xfs_buf_free_pages(
*/ */
static void static void
xfs_buf_free( xfs_buf_free(
xfs_buf_t *bp) struct xfs_buf *bp)
{ {
trace_xfs_buf_free(bp, _RET_IP_); trace_xfs_buf_free(bp, _RET_IP_);
@ -352,7 +352,7 @@ xfs_buf_free(
*/ */
STATIC int STATIC int
xfs_buf_allocate_memory( xfs_buf_allocate_memory(
xfs_buf_t *bp, struct xfs_buf *bp,
uint flags) uint flags)
{ {
size_t size; size_t size;
@ -463,7 +463,7 @@ xfs_buf_allocate_memory(
*/ */
STATIC int STATIC int
_xfs_buf_map_pages( _xfs_buf_map_pages(
xfs_buf_t *bp, struct xfs_buf *bp,
uint flags) uint flags)
{ {
ASSERT(bp->b_flags & _XBF_PAGES); ASSERT(bp->b_flags & _XBF_PAGES);
@ -590,7 +590,7 @@ xfs_buf_find(
struct xfs_buf **found_bp) struct xfs_buf **found_bp)
{ {
struct xfs_perag *pag; struct xfs_perag *pag;
xfs_buf_t *bp; struct xfs_buf *bp;
struct xfs_buf_map cmap = { .bm_bn = map[0].bm_bn }; struct xfs_buf_map cmap = { .bm_bn = map[0].bm_bn };
xfs_daddr_t eofs; xfs_daddr_t eofs;
int i; int i;
@ -762,7 +762,7 @@ xfs_buf_get_map(
int int
_xfs_buf_read( _xfs_buf_read(
xfs_buf_t *bp, struct xfs_buf *bp,
xfs_buf_flags_t flags) xfs_buf_flags_t flags)
{ {
ASSERT(!(flags & XBF_WRITE)); ASSERT(!(flags & XBF_WRITE));
@ -1005,7 +1005,7 @@ xfs_buf_get_uncached(
*/ */
void void
xfs_buf_hold( xfs_buf_hold(
xfs_buf_t *bp) struct xfs_buf *bp)
{ {
trace_xfs_buf_hold(bp, _RET_IP_); trace_xfs_buf_hold(bp, _RET_IP_);
atomic_inc(&bp->b_hold); atomic_inc(&bp->b_hold);
@ -1017,7 +1017,7 @@ xfs_buf_hold(
*/ */
void void
xfs_buf_rele( xfs_buf_rele(
xfs_buf_t *bp) struct xfs_buf *bp)
{ {
struct xfs_perag *pag = bp->b_pag; struct xfs_perag *pag = bp->b_pag;
bool release; bool release;
@ -1161,7 +1161,7 @@ xfs_buf_unlock(
STATIC void STATIC void
xfs_buf_wait_unpin( xfs_buf_wait_unpin(
xfs_buf_t *bp) struct xfs_buf *bp)
{ {
DECLARE_WAITQUEUE (wait, current); DECLARE_WAITQUEUE (wait, current);
@ -1373,7 +1373,7 @@ xfs_buf_ioend_work(
struct work_struct *work) struct work_struct *work)
{ {
struct xfs_buf *bp = struct xfs_buf *bp =
container_of(work, xfs_buf_t, b_ioend_work); container_of(work, struct xfs_buf, b_ioend_work);
xfs_buf_ioend(bp); xfs_buf_ioend(bp);
} }
@ -1388,7 +1388,7 @@ xfs_buf_ioend_async(
void void
__xfs_buf_ioerror( __xfs_buf_ioerror(
xfs_buf_t *bp, struct xfs_buf *bp,
int error, int error,
xfs_failaddr_t failaddr) xfs_failaddr_t failaddr)
{ {

View file

@ -124,7 +124,7 @@ struct xfs_buf_ops {
xfs_failaddr_t (*verify_struct)(struct xfs_buf *bp); xfs_failaddr_t (*verify_struct)(struct xfs_buf *bp);
}; };
typedef struct xfs_buf { struct xfs_buf {
/* /*
* first cacheline holds all the fields needed for an uncontended cache * first cacheline holds all the fields needed for an uncontended cache
* hit to be fully processed. The semaphore straddles the cacheline * hit to be fully processed. The semaphore straddles the cacheline
@ -190,7 +190,7 @@ typedef struct xfs_buf {
int b_last_error; int b_last_error;
const struct xfs_buf_ops *b_ops; const struct xfs_buf_ops *b_ops;
} xfs_buf_t; };
/* Finding and Reading Buffers */ /* Finding and Reading Buffers */
struct xfs_buf *xfs_buf_incore(struct xfs_buftarg *target, struct xfs_buf *xfs_buf_incore(struct xfs_buftarg *target,
@ -253,16 +253,16 @@ int _xfs_buf_read(struct xfs_buf *bp, xfs_buf_flags_t flags);
void xfs_buf_hold(struct xfs_buf *bp); void xfs_buf_hold(struct xfs_buf *bp);
/* Releasing Buffers */ /* Releasing Buffers */
extern void xfs_buf_rele(xfs_buf_t *); extern void xfs_buf_rele(struct xfs_buf *);
/* Locking and Unlocking Buffers */ /* Locking and Unlocking Buffers */
extern int xfs_buf_trylock(xfs_buf_t *); extern int xfs_buf_trylock(struct xfs_buf *);
extern void xfs_buf_lock(xfs_buf_t *); extern void xfs_buf_lock(struct xfs_buf *);
extern void xfs_buf_unlock(xfs_buf_t *); extern void xfs_buf_unlock(struct xfs_buf *);
#define xfs_buf_islocked(bp) \ #define xfs_buf_islocked(bp) \
((bp)->b_sema.count <= 0) ((bp)->b_sema.count <= 0)
static inline void xfs_buf_relse(xfs_buf_t *bp) static inline void xfs_buf_relse(struct xfs_buf *bp)
{ {
xfs_buf_unlock(bp); xfs_buf_unlock(bp);
xfs_buf_rele(bp); xfs_buf_rele(bp);

View file

@ -412,7 +412,7 @@ xfs_buf_item_unpin(
int remove) int remove)
{ {
struct xfs_buf_log_item *bip = BUF_ITEM(lip); struct xfs_buf_log_item *bip = BUF_ITEM(lip);
xfs_buf_t *bp = bip->bli_buf; struct xfs_buf *bp = bip->bli_buf;
int stale = bip->bli_flags & XFS_BLI_STALE; int stale = bip->bli_flags & XFS_BLI_STALE;
int freed; int freed;
@ -942,7 +942,7 @@ xfs_buf_item_free(
*/ */
void void
xfs_buf_item_relse( xfs_buf_item_relse(
xfs_buf_t *bp) struct xfs_buf *bp)
{ {
struct xfs_buf_log_item *bip = bp->b_log_item; struct xfs_buf_log_item *bip = bp->b_log_item;

View file

@ -28,7 +28,7 @@ xfs_growfs_data_private(
xfs_mount_t *mp, /* mount point for filesystem */ xfs_mount_t *mp, /* mount point for filesystem */
xfs_growfs_data_t *in) /* growfs data input struct */ xfs_growfs_data_t *in) /* growfs data input struct */
{ {
xfs_buf_t *bp; struct xfs_buf *bp;
int error; int error;
xfs_agnumber_t nagcount; xfs_agnumber_t nagcount;
xfs_agnumber_t nagimax = 0; xfs_agnumber_t nagimax = 0;

View file

@ -2631,7 +2631,7 @@ xlog_recover_clear_agi_bucket(
{ {
xfs_trans_t *tp; xfs_trans_t *tp;
xfs_agi_t *agi; xfs_agi_t *agi;
xfs_buf_t *agibp; struct xfs_buf *agibp;
int offset; int offset;
int error; int error;
@ -2749,7 +2749,7 @@ xlog_recover_process_iunlinks(
xfs_mount_t *mp; xfs_mount_t *mp;
xfs_agnumber_t agno; xfs_agnumber_t agno;
xfs_agi_t *agi; xfs_agi_t *agi;
xfs_buf_t *agibp; struct xfs_buf *agibp;
xfs_agino_t agino; xfs_agino_t agino;
int bucket; int bucket;
int error; int error;
@ -3501,8 +3501,8 @@ xlog_recover_check_summary(
struct xlog *log) struct xlog *log)
{ {
xfs_mount_t *mp; xfs_mount_t *mp;
xfs_buf_t *agfbp; struct xfs_buf *agfbp;
xfs_buf_t *agibp; struct xfs_buf *agibp;
xfs_agnumber_t agno; xfs_agnumber_t agno;
uint64_t freeblks; uint64_t freeblks;
uint64_t itotal; uint64_t itotal;

View file

@ -32,7 +32,7 @@ xfs_rtget_summary(
xfs_trans_t *tp, /* transaction pointer */ xfs_trans_t *tp, /* transaction pointer */
int log, /* log2 of extent size */ int log, /* log2 of extent size */
xfs_rtblock_t bbno, /* bitmap block number */ xfs_rtblock_t bbno, /* bitmap block number */
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_fsblock_t *rsb, /* in/out: summary block number */
xfs_suminfo_t *sum) /* out: summary info for this block */ xfs_suminfo_t *sum) /* out: summary info for this block */
{ {
@ -50,7 +50,7 @@ xfs_rtany_summary(
int low, /* low log2 extent size */ int low, /* low log2 extent size */
int high, /* high log2 extent size */ int high, /* high log2 extent size */
xfs_rtblock_t bbno, /* bitmap block number */ xfs_rtblock_t bbno, /* bitmap block number */
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_fsblock_t *rsb, /* in/out: summary block number */
int *stat) /* out: any good extents here? */ int *stat) /* out: any good extents here? */
{ {
@ -104,7 +104,7 @@ xfs_rtcopy_summary(
xfs_trans_t *tp) /* transaction pointer */ xfs_trans_t *tp) /* transaction pointer */
{ {
xfs_rtblock_t bbno; /* bitmap block number */ xfs_rtblock_t bbno; /* bitmap block number */
xfs_buf_t *bp; /* summary buffer */ struct xfs_buf *bp; /* summary buffer */
int error; /* error return value */ int error; /* error return value */
int log; /* summary level number (log length) */ int log; /* summary level number (log length) */
xfs_suminfo_t sum; /* summary data */ xfs_suminfo_t sum; /* summary data */
@ -144,7 +144,7 @@ xfs_rtallocate_range(
xfs_trans_t *tp, /* transaction pointer */ xfs_trans_t *tp, /* transaction pointer */
xfs_rtblock_t start, /* start block to allocate */ xfs_rtblock_t start, /* start block to allocate */
xfs_extlen_t len, /* length to allocate */ xfs_extlen_t len, /* length to allocate */
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_fsblock_t *rsb) /* in/out: summary block number */
{ {
xfs_rtblock_t end; /* end of the allocated extent */ xfs_rtblock_t end; /* end of the allocated extent */
@ -226,7 +226,7 @@ xfs_rtallocate_extent_block(
xfs_extlen_t maxlen, /* maximum length to allocate */ xfs_extlen_t maxlen, /* maximum length to allocate */
xfs_extlen_t *len, /* out: actual length allocated */ xfs_extlen_t *len, /* out: actual length allocated */
xfs_rtblock_t *nextp, /* out: next block to try */ xfs_rtblock_t *nextp, /* out: next block to try */
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_fsblock_t *rsb, /* in/out: summary block number */
xfs_extlen_t prod, /* extent product factor */ xfs_extlen_t prod, /* extent product factor */
xfs_rtblock_t *rtblock) /* out: start block allocated */ xfs_rtblock_t *rtblock) /* out: start block allocated */
@ -345,7 +345,7 @@ xfs_rtallocate_extent_exact(
xfs_extlen_t minlen, /* minimum length to allocate */ xfs_extlen_t minlen, /* minimum length to allocate */
xfs_extlen_t maxlen, /* maximum length to allocate */ xfs_extlen_t maxlen, /* maximum length to allocate */
xfs_extlen_t *len, /* out: actual length allocated */ xfs_extlen_t *len, /* out: actual length allocated */
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_fsblock_t *rsb, /* in/out: summary block number */
xfs_extlen_t prod, /* extent product factor */ xfs_extlen_t prod, /* extent product factor */
xfs_rtblock_t *rtblock) /* out: start block allocated */ xfs_rtblock_t *rtblock) /* out: start block allocated */
@ -424,7 +424,7 @@ xfs_rtallocate_extent_near(
xfs_extlen_t minlen, /* minimum length to allocate */ xfs_extlen_t minlen, /* minimum length to allocate */
xfs_extlen_t maxlen, /* maximum length to allocate */ xfs_extlen_t maxlen, /* maximum length to allocate */
xfs_extlen_t *len, /* out: actual length allocated */ xfs_extlen_t *len, /* out: actual length allocated */
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_fsblock_t *rsb, /* in/out: summary block number */
xfs_extlen_t prod, /* extent product factor */ xfs_extlen_t prod, /* extent product factor */
xfs_rtblock_t *rtblock) /* out: start block allocated */ xfs_rtblock_t *rtblock) /* out: start block allocated */
@ -626,7 +626,7 @@ xfs_rtallocate_extent_size(
xfs_extlen_t minlen, /* minimum length to allocate */ xfs_extlen_t minlen, /* minimum length to allocate */
xfs_extlen_t maxlen, /* maximum length to allocate */ xfs_extlen_t maxlen, /* maximum length to allocate */
xfs_extlen_t *len, /* out: actual length allocated */ xfs_extlen_t *len, /* out: actual length allocated */
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_fsblock_t *rsb, /* in/out: summary block number */
xfs_extlen_t prod, /* extent product factor */ xfs_extlen_t prod, /* extent product factor */
xfs_rtblock_t *rtblock) /* out: start block allocated */ xfs_rtblock_t *rtblock) /* out: start block allocated */
@ -900,7 +900,7 @@ xfs_growfs_rt(
xfs_growfs_rt_t *in) /* growfs rt input struct */ xfs_growfs_rt_t *in) /* growfs rt input struct */
{ {
xfs_rtblock_t bmbno; /* bitmap block number */ xfs_rtblock_t bmbno; /* bitmap block number */
xfs_buf_t *bp; /* temporary buffer */ struct xfs_buf *bp; /* temporary buffer */
int error; /* error return value */ int error; /* error return value */
xfs_mount_t *nmp; /* new (fake) mount structure */ xfs_mount_t *nmp; /* new (fake) mount structure */
xfs_rfsblock_t nrblocks; /* new number of realtime blocks */ xfs_rfsblock_t nrblocks; /* new number of realtime blocks */
@ -1151,7 +1151,7 @@ xfs_rtallocate_extent(
int error; /* error value */ int error; /* error value */
xfs_rtblock_t r; /* result allocated block */ xfs_rtblock_t r; /* result allocated block */
xfs_fsblock_t sb; /* summary file block number */ xfs_fsblock_t sb; /* summary file block number */
xfs_buf_t *sumbp; /* summary file block buffer */ struct xfs_buf *sumbp; /* summary file block buffer */
ASSERT(xfs_isilocked(mp->m_rbmip, XFS_ILOCK_EXCL)); ASSERT(xfs_isilocked(mp->m_rbmip, XFS_ILOCK_EXCL));
ASSERT(minlen > 0 && minlen <= maxlen); ASSERT(minlen > 0 && minlen <= maxlen);

View file

@ -115,10 +115,10 @@ int xfs_rtmodify_range(struct xfs_mount *mp, struct xfs_trans *tp,
xfs_rtblock_t start, xfs_extlen_t len, int val); xfs_rtblock_t start, xfs_extlen_t len, int val);
int xfs_rtmodify_summary_int(struct xfs_mount *mp, struct xfs_trans *tp, int xfs_rtmodify_summary_int(struct xfs_mount *mp, struct xfs_trans *tp,
int log, xfs_rtblock_t bbno, int delta, 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); xfs_suminfo_t *sum);
int xfs_rtmodify_summary(struct xfs_mount *mp, struct xfs_trans *tp, int log, 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); xfs_fsblock_t *rsb);
int xfs_rtfree_range(struct xfs_mount *mp, struct xfs_trans *tp, int xfs_rtfree_range(struct xfs_mount *mp, struct xfs_trans *tp,
xfs_rtblock_t start, xfs_extlen_t len, xfs_rtblock_t start, xfs_extlen_t len,

View file

@ -154,7 +154,7 @@ xfs_symlink(
const char *cur_chunk; const char *cur_chunk;
int byte_cnt; int byte_cnt;
int n; int n;
xfs_buf_t *bp; struct xfs_buf *bp;
prid_t prid; prid_t prid;
struct xfs_dquot *udqp = NULL; struct xfs_dquot *udqp = NULL;
struct xfs_dquot *gdqp = NULL; struct xfs_dquot *gdqp = NULL;
@ -365,7 +365,7 @@ STATIC int
xfs_inactive_symlink_rmt( xfs_inactive_symlink_rmt(
struct xfs_inode *ip) struct xfs_inode *ip)
{ {
xfs_buf_t *bp; struct xfs_buf *bp;
int done; int done;
int error; int error;
int i; int i;

View file

@ -465,7 +465,7 @@ xfs_trans_apply_sb_deltas(
xfs_trans_t *tp) xfs_trans_t *tp)
{ {
xfs_dsb_t *sbp; xfs_dsb_t *sbp;
xfs_buf_t *bp; struct xfs_buf *bp;
int whole = 0; int whole = 0;
bp = xfs_trans_getsb(tp); bp = xfs_trans_getsb(tp);

View file

@ -121,7 +121,7 @@ xfs_trans_get_buf_map(
xfs_buf_flags_t flags, xfs_buf_flags_t flags,
struct xfs_buf **bpp) struct xfs_buf **bpp)
{ {
xfs_buf_t *bp; struct xfs_buf *bp;
struct xfs_buf_log_item *bip; struct xfs_buf_log_item *bip;
int error; int error;
@ -401,7 +401,7 @@ xfs_trans_brelse(
void void
xfs_trans_bhold( xfs_trans_bhold(
xfs_trans_t *tp, xfs_trans_t *tp,
xfs_buf_t *bp) struct xfs_buf *bp)
{ {
struct xfs_buf_log_item *bip = bp->b_log_item; struct xfs_buf_log_item *bip = bp->b_log_item;
@ -422,7 +422,7 @@ xfs_trans_bhold(
void void
xfs_trans_bhold_release( xfs_trans_bhold_release(
xfs_trans_t *tp, xfs_trans_t *tp,
xfs_buf_t *bp) struct xfs_buf *bp)
{ {
struct xfs_buf_log_item *bip = bp->b_log_item; struct xfs_buf_log_item *bip = bp->b_log_item;
@ -538,7 +538,7 @@ xfs_trans_log_buf(
void void
xfs_trans_binval( xfs_trans_binval(
xfs_trans_t *tp, xfs_trans_t *tp,
xfs_buf_t *bp) struct xfs_buf *bp)
{ {
struct xfs_buf_log_item *bip = bp->b_log_item; struct xfs_buf_log_item *bip = bp->b_log_item;
int i; int i;
@ -593,7 +593,7 @@ xfs_trans_binval(
void void
xfs_trans_inode_buf( xfs_trans_inode_buf(
xfs_trans_t *tp, xfs_trans_t *tp,
xfs_buf_t *bp) struct xfs_buf *bp)
{ {
struct xfs_buf_log_item *bip = bp->b_log_item; struct xfs_buf_log_item *bip = bp->b_log_item;
@ -618,7 +618,7 @@ xfs_trans_inode_buf(
void void
xfs_trans_stale_inode_buf( xfs_trans_stale_inode_buf(
xfs_trans_t *tp, xfs_trans_t *tp,
xfs_buf_t *bp) struct xfs_buf *bp)
{ {
struct xfs_buf_log_item *bip = bp->b_log_item; struct xfs_buf_log_item *bip = bp->b_log_item;
@ -643,7 +643,7 @@ xfs_trans_stale_inode_buf(
void void
xfs_trans_inode_alloc_buf( xfs_trans_inode_alloc_buf(
xfs_trans_t *tp, xfs_trans_t *tp,
xfs_buf_t *bp) struct xfs_buf *bp)
{ {
struct xfs_buf_log_item *bip = bp->b_log_item; struct xfs_buf_log_item *bip = bp->b_log_item;
@ -737,7 +737,7 @@ xfs_trans_buf_copy_type(
void void
xfs_trans_dquot_buf( xfs_trans_dquot_buf(
xfs_trans_t *tp, xfs_trans_t *tp,
xfs_buf_t *bp, struct xfs_buf *bp,
uint type) uint type)
{ {
struct xfs_buf_log_item *bip = bp->b_log_item; struct xfs_buf_log_item *bip = bp->b_log_item;