Commit 9a8d2fdb authored by Mark Tinguely's avatar Mark Tinguely Committed by Ben Myers

xfs: remove xlog_t typedef

Remove the xlog_t type definitions.
Signed-off-by: default avatarMark Tinguely <tinguely@sgi.com>
Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarBen Myers <bpm@sgi.com>
parent ad223e60
This diff is collapsed.
...@@ -487,7 +487,7 @@ struct xlog_grant_head { ...@@ -487,7 +487,7 @@ struct xlog_grant_head {
* overflow 31 bits worth of byte offset, so using a byte number will mean * overflow 31 bits worth of byte offset, so using a byte number will mean
* that round off problems won't occur when releasing partial reservations. * that round off problems won't occur when releasing partial reservations.
*/ */
typedef struct xlog { struct xlog {
/* The following fields don't need locking */ /* The following fields don't need locking */
struct xfs_mount *l_mp; /* mount point */ struct xfs_mount *l_mp; /* mount point */
struct xfs_ail *l_ailp; /* AIL log is working with */ struct xfs_ail *l_ailp; /* AIL log is working with */
...@@ -540,7 +540,7 @@ typedef struct xlog { ...@@ -540,7 +540,7 @@ typedef struct xlog {
char *l_iclog_bak[XLOG_MAX_ICLOGS]; char *l_iclog_bak[XLOG_MAX_ICLOGS];
#endif #endif
} xlog_t; };
#define XLOG_BUF_CANCEL_BUCKET(log, blkno) \ #define XLOG_BUF_CANCEL_BUCKET(log, blkno) \
((log)->l_buf_cancel_table + ((__uint64_t)blkno % XLOG_BC_TABLE_SIZE)) ((log)->l_buf_cancel_table + ((__uint64_t)blkno % XLOG_BC_TABLE_SIZE))
...@@ -548,9 +548,17 @@ typedef struct xlog { ...@@ -548,9 +548,17 @@ typedef struct xlog {
#define XLOG_FORCED_SHUTDOWN(log) ((log)->l_flags & XLOG_IO_ERROR) #define XLOG_FORCED_SHUTDOWN(log) ((log)->l_flags & XLOG_IO_ERROR)
/* common routines */ /* common routines */
extern int xlog_recover(xlog_t *log); extern int
extern int xlog_recover_finish(xlog_t *log); xlog_recover(
extern void xlog_pack_data(xlog_t *log, xlog_in_core_t *iclog, int); struct xlog *log);
extern int
xlog_recover_finish(
struct xlog *log);
extern void
xlog_pack_data(
struct xlog *log,
struct xlog_in_core *iclog,
int);
extern kmem_zone_t *xfs_log_ticket_zone; extern kmem_zone_t *xfs_log_ticket_zone;
struct xlog_ticket * struct xlog_ticket *
......
...@@ -43,10 +43,18 @@ ...@@ -43,10 +43,18 @@
#include "xfs_utils.h" #include "xfs_utils.h"
#include "xfs_trace.h" #include "xfs_trace.h"
STATIC int xlog_find_zeroed(xlog_t *, xfs_daddr_t *); STATIC int
STATIC int xlog_clear_stale_blocks(xlog_t *, xfs_lsn_t); xlog_find_zeroed(
struct xlog *,
xfs_daddr_t *);
STATIC int
xlog_clear_stale_blocks(
struct xlog *,
xfs_lsn_t);
#if defined(DEBUG) #if defined(DEBUG)
STATIC void xlog_recover_check_summary(xlog_t *); STATIC void
xlog_recover_check_summary(
struct xlog *);
#else #else
#define xlog_recover_check_summary(log) #define xlog_recover_check_summary(log)
#endif #endif
...@@ -74,7 +82,7 @@ struct xfs_buf_cancel { ...@@ -74,7 +82,7 @@ struct xfs_buf_cancel {
static inline int static inline int
xlog_buf_bbcount_valid( xlog_buf_bbcount_valid(
xlog_t *log, struct xlog *log,
int bbcount) int bbcount)
{ {
return bbcount > 0 && bbcount <= log->l_logBBsize; return bbcount > 0 && bbcount <= log->l_logBBsize;
...@@ -87,7 +95,7 @@ xlog_buf_bbcount_valid( ...@@ -87,7 +95,7 @@ xlog_buf_bbcount_valid(
*/ */
STATIC xfs_buf_t * STATIC xfs_buf_t *
xlog_get_bp( xlog_get_bp(
xlog_t *log, struct xlog *log,
int nbblks) int nbblks)
{ {
struct xfs_buf *bp; struct xfs_buf *bp;
...@@ -138,10 +146,10 @@ xlog_put_bp( ...@@ -138,10 +146,10 @@ xlog_put_bp(
*/ */
STATIC xfs_caddr_t STATIC xfs_caddr_t
xlog_align( xlog_align(
xlog_t *log, struct xlog *log,
xfs_daddr_t blk_no, xfs_daddr_t blk_no,
int nbblks, int nbblks,
xfs_buf_t *bp) struct xfs_buf *bp)
{ {
xfs_daddr_t offset = blk_no & ((xfs_daddr_t)log->l_sectBBsize - 1); xfs_daddr_t offset = blk_no & ((xfs_daddr_t)log->l_sectBBsize - 1);
...@@ -155,10 +163,10 @@ xlog_align( ...@@ -155,10 +163,10 @@ xlog_align(
*/ */
STATIC int STATIC int
xlog_bread_noalign( xlog_bread_noalign(
xlog_t *log, struct xlog *log,
xfs_daddr_t blk_no, xfs_daddr_t blk_no,
int nbblks, int nbblks,
xfs_buf_t *bp) struct xfs_buf *bp)
{ {
int error; int error;
...@@ -189,10 +197,10 @@ xlog_bread_noalign( ...@@ -189,10 +197,10 @@ xlog_bread_noalign(
STATIC int STATIC int
xlog_bread( xlog_bread(
xlog_t *log, struct xlog *log,
xfs_daddr_t blk_no, xfs_daddr_t blk_no,
int nbblks, int nbblks,
xfs_buf_t *bp, struct xfs_buf *bp,
xfs_caddr_t *offset) xfs_caddr_t *offset)
{ {
int error; int error;
...@@ -211,10 +219,10 @@ xlog_bread( ...@@ -211,10 +219,10 @@ xlog_bread(
*/ */
STATIC int STATIC int
xlog_bread_offset( xlog_bread_offset(
xlog_t *log, struct xlog *log,
xfs_daddr_t blk_no, /* block to read from */ xfs_daddr_t blk_no, /* block to read from */
int nbblks, /* blocks to read */ int nbblks, /* blocks to read */
xfs_buf_t *bp, struct xfs_buf *bp,
xfs_caddr_t offset) xfs_caddr_t offset)
{ {
xfs_caddr_t orig_offset = bp->b_addr; xfs_caddr_t orig_offset = bp->b_addr;
...@@ -241,10 +249,10 @@ xlog_bread_offset( ...@@ -241,10 +249,10 @@ xlog_bread_offset(
*/ */
STATIC int STATIC int
xlog_bwrite( xlog_bwrite(
xlog_t *log, struct xlog *log,
xfs_daddr_t blk_no, xfs_daddr_t blk_no,
int nbblks, int nbblks,
xfs_buf_t *bp) struct xfs_buf *bp)
{ {
int error; int error;
...@@ -378,8 +386,8 @@ xlog_recover_iodone( ...@@ -378,8 +386,8 @@ xlog_recover_iodone(
*/ */
STATIC int STATIC int
xlog_find_cycle_start( xlog_find_cycle_start(
xlog_t *log, struct xlog *log,
xfs_buf_t *bp, struct xfs_buf *bp,
xfs_daddr_t first_blk, xfs_daddr_t first_blk,
xfs_daddr_t *last_blk, xfs_daddr_t *last_blk,
uint cycle) uint cycle)
...@@ -421,7 +429,7 @@ xlog_find_cycle_start( ...@@ -421,7 +429,7 @@ xlog_find_cycle_start(
*/ */
STATIC int STATIC int
xlog_find_verify_cycle( xlog_find_verify_cycle(
xlog_t *log, struct xlog *log,
xfs_daddr_t start_blk, xfs_daddr_t start_blk,
int nbblks, int nbblks,
uint stop_on_cycle_no, uint stop_on_cycle_no,
...@@ -490,7 +498,7 @@ xlog_find_verify_cycle( ...@@ -490,7 +498,7 @@ xlog_find_verify_cycle(
*/ */
STATIC int STATIC int
xlog_find_verify_log_record( xlog_find_verify_log_record(
xlog_t *log, struct xlog *log,
xfs_daddr_t start_blk, xfs_daddr_t start_blk,
xfs_daddr_t *last_blk, xfs_daddr_t *last_blk,
int extra_bblks) int extra_bblks)
...@@ -600,7 +608,7 @@ xlog_find_verify_log_record( ...@@ -600,7 +608,7 @@ xlog_find_verify_log_record(
*/ */
STATIC int STATIC int
xlog_find_head( xlog_find_head(
xlog_t *log, struct xlog *log,
xfs_daddr_t *return_head_blk) xfs_daddr_t *return_head_blk)
{ {
xfs_buf_t *bp; xfs_buf_t *bp;
...@@ -871,7 +879,7 @@ xlog_find_head( ...@@ -871,7 +879,7 @@ xlog_find_head(
*/ */
STATIC int STATIC int
xlog_find_tail( xlog_find_tail(
xlog_t *log, struct xlog *log,
xfs_daddr_t *head_blk, xfs_daddr_t *head_blk,
xfs_daddr_t *tail_blk) xfs_daddr_t *tail_blk)
{ {
...@@ -1080,7 +1088,7 @@ xlog_find_tail( ...@@ -1080,7 +1088,7 @@ xlog_find_tail(
*/ */
STATIC int STATIC int
xlog_find_zeroed( xlog_find_zeroed(
xlog_t *log, struct xlog *log,
xfs_daddr_t *blk_no) xfs_daddr_t *blk_no)
{ {
xfs_buf_t *bp; xfs_buf_t *bp;
...@@ -1183,7 +1191,7 @@ xlog_find_zeroed( ...@@ -1183,7 +1191,7 @@ xlog_find_zeroed(
*/ */
STATIC void STATIC void
xlog_add_record( xlog_add_record(
xlog_t *log, struct xlog *log,
xfs_caddr_t buf, xfs_caddr_t buf,
int cycle, int cycle,
int block, int block,
...@@ -1205,7 +1213,7 @@ xlog_add_record( ...@@ -1205,7 +1213,7 @@ xlog_add_record(
STATIC int STATIC int
xlog_write_log_records( xlog_write_log_records(
xlog_t *log, struct xlog *log,
int cycle, int cycle,
int start_block, int start_block,
int blocks, int blocks,
...@@ -1305,7 +1313,7 @@ xlog_write_log_records( ...@@ -1305,7 +1313,7 @@ xlog_write_log_records(
*/ */
STATIC int STATIC int
xlog_clear_stale_blocks( xlog_clear_stale_blocks(
xlog_t *log, struct xlog *log,
xfs_lsn_t tail_lsn) xfs_lsn_t tail_lsn)
{ {
int tail_cycle, head_cycle; int tail_cycle, head_cycle;
...@@ -2050,11 +2058,11 @@ xfs_qm_dqcheck( ...@@ -2050,11 +2058,11 @@ xfs_qm_dqcheck(
*/ */
STATIC void STATIC void
xlog_recover_do_dquot_buffer( xlog_recover_do_dquot_buffer(
xfs_mount_t *mp, struct xfs_mount *mp,
xlog_t *log, struct xlog *log,
xlog_recover_item_t *item, struct xlog_recover_item *item,
xfs_buf_t *bp, struct xfs_buf *bp,
xfs_buf_log_format_t *buf_f) struct xfs_buf_log_format *buf_f)
{ {
uint type; uint type;
...@@ -2108,9 +2116,9 @@ xlog_recover_do_dquot_buffer( ...@@ -2108,9 +2116,9 @@ xlog_recover_do_dquot_buffer(
*/ */
STATIC int STATIC int
xlog_recover_buffer_pass2( xlog_recover_buffer_pass2(
xlog_t *log, struct xlog *log,
struct list_head *buffer_list, struct list_head *buffer_list,
xlog_recover_item_t *item) struct xlog_recover_item *item)
{ {
xfs_buf_log_format_t *buf_f = item->ri_buf[0].i_addr; xfs_buf_log_format_t *buf_f = item->ri_buf[0].i_addr;
xfs_mount_t *mp = log->l_mp; xfs_mount_t *mp = log->l_mp;
...@@ -2189,9 +2197,9 @@ xlog_recover_buffer_pass2( ...@@ -2189,9 +2197,9 @@ xlog_recover_buffer_pass2(
STATIC int STATIC int
xlog_recover_inode_pass2( xlog_recover_inode_pass2(
xlog_t *log, struct xlog *log,
struct list_head *buffer_list, struct list_head *buffer_list,
xlog_recover_item_t *item) struct xlog_recover_item *item)
{ {
xfs_inode_log_format_t *in_f; xfs_inode_log_format_t *in_f;
xfs_mount_t *mp = log->l_mp; xfs_mount_t *mp = log->l_mp;
...@@ -2452,14 +2460,14 @@ xlog_recover_inode_pass2( ...@@ -2452,14 +2460,14 @@ xlog_recover_inode_pass2(
} }
/* /*
* Recover QUOTAOFF records. We simply make a note of it in the xlog_t * Recover QUOTAOFF records. We simply make a note of it in the xlog
* structure, so that we know not to do any dquot item or dquot buffer recovery, * structure, so that we know not to do any dquot item or dquot buffer recovery,
* of that type. * of that type.
*/ */
STATIC int STATIC int
xlog_recover_quotaoff_pass1( xlog_recover_quotaoff_pass1(
xlog_t *log, struct xlog *log,
xlog_recover_item_t *item) struct xlog_recover_item *item)
{ {
xfs_qoff_logformat_t *qoff_f = item->ri_buf[0].i_addr; xfs_qoff_logformat_t *qoff_f = item->ri_buf[0].i_addr;
ASSERT(qoff_f); ASSERT(qoff_f);
...@@ -2483,9 +2491,9 @@ xlog_recover_quotaoff_pass1( ...@@ -2483,9 +2491,9 @@ xlog_recover_quotaoff_pass1(
*/ */
STATIC int STATIC int
xlog_recover_dquot_pass2( xlog_recover_dquot_pass2(
xlog_t *log, struct xlog *log,
struct list_head *buffer_list, struct list_head *buffer_list,
xlog_recover_item_t *item) struct xlog_recover_item *item)
{ {
xfs_mount_t *mp = log->l_mp; xfs_mount_t *mp = log->l_mp;
xfs_buf_t *bp; xfs_buf_t *bp;
...@@ -2578,9 +2586,9 @@ xlog_recover_dquot_pass2( ...@@ -2578,9 +2586,9 @@ xlog_recover_dquot_pass2(
*/ */
STATIC int STATIC int
xlog_recover_efi_pass2( xlog_recover_efi_pass2(
xlog_t *log, struct xlog *log,
xlog_recover_item_t *item, struct xlog_recover_item *item,
xfs_lsn_t lsn) xfs_lsn_t lsn)
{ {
int error; int error;
xfs_mount_t *mp = log->l_mp; xfs_mount_t *mp = log->l_mp;
...@@ -2616,8 +2624,8 @@ xlog_recover_efi_pass2( ...@@ -2616,8 +2624,8 @@ xlog_recover_efi_pass2(
*/ */
STATIC int STATIC int
xlog_recover_efd_pass2( xlog_recover_efd_pass2(
xlog_t *log, struct xlog *log,
xlog_recover_item_t *item) struct xlog_recover_item *item)
{ {
xfs_efd_log_format_t *efd_formatp; xfs_efd_log_format_t *efd_formatp;
xfs_efi_log_item_t *efip = NULL; xfs_efi_log_item_t *efip = NULL;
...@@ -2812,9 +2820,9 @@ xlog_recover_unmount_trans( ...@@ -2812,9 +2820,9 @@ xlog_recover_unmount_trans(
*/ */
STATIC int STATIC int
xlog_recover_process_data( xlog_recover_process_data(
xlog_t *log, struct xlog *log,
struct hlist_head rhash[], struct hlist_head rhash[],
xlog_rec_header_t *rhead, struct xlog_rec_header *rhead,
xfs_caddr_t dp, xfs_caddr_t dp,
int pass) int pass)
{ {
...@@ -2986,7 +2994,7 @@ xlog_recover_process_efi( ...@@ -2986,7 +2994,7 @@ xlog_recover_process_efi(
*/ */
STATIC int STATIC int
xlog_recover_process_efis( xlog_recover_process_efis(
xlog_t *log) struct xlog *log)
{ {
xfs_log_item_t *lip; xfs_log_item_t *lip;
xfs_efi_log_item_t *efip; xfs_efi_log_item_t *efip;
...@@ -3147,7 +3155,7 @@ xlog_recover_process_one_iunlink( ...@@ -3147,7 +3155,7 @@ xlog_recover_process_one_iunlink(
*/ */
STATIC void STATIC void
xlog_recover_process_iunlinks( xlog_recover_process_iunlinks(
xlog_t *log) struct xlog *log)
{ {
xfs_mount_t *mp; xfs_mount_t *mp;
xfs_agnumber_t agno; xfs_agnumber_t agno;
...@@ -3209,9 +3217,9 @@ xlog_recover_process_iunlinks( ...@@ -3209,9 +3217,9 @@ xlog_recover_process_iunlinks(
#ifdef DEBUG #ifdef DEBUG
STATIC void STATIC void
xlog_pack_data_checksum( xlog_pack_data_checksum(
xlog_t *log, struct xlog *log,
xlog_in_core_t *iclog, struct xlog_in_core *iclog,
int size) int size)
{ {
int i; int i;
__be32 *up; __be32 *up;
...@@ -3234,8 +3242,8 @@ xlog_pack_data_checksum( ...@@ -3234,8 +3242,8 @@ xlog_pack_data_checksum(
*/ */
void void
xlog_pack_data( xlog_pack_data(
xlog_t *log, struct xlog *log,
xlog_in_core_t *iclog, struct xlog_in_core *iclog,
int roundoff) int roundoff)
{ {
int i, j, k; int i, j, k;
...@@ -3274,9 +3282,9 @@ xlog_pack_data( ...@@ -3274,9 +3282,9 @@ xlog_pack_data(
STATIC void STATIC void
xlog_unpack_data( xlog_unpack_data(
xlog_rec_header_t *rhead, struct xlog_rec_header *rhead,
xfs_caddr_t dp, xfs_caddr_t dp,
xlog_t *log) struct xlog *log)
{ {
int i, j, k; int i, j, k;
...@@ -3299,8 +3307,8 @@ xlog_unpack_data( ...@@ -3299,8 +3307,8 @@ xlog_unpack_data(
STATIC int STATIC int
xlog_valid_rec_header( xlog_valid_rec_header(
xlog_t *log, struct xlog *log,
xlog_rec_header_t *rhead, struct xlog_rec_header *rhead,
xfs_daddr_t blkno) xfs_daddr_t blkno)
{ {
int hlen; int hlen;
...@@ -3343,7 +3351,7 @@ xlog_valid_rec_header( ...@@ -3343,7 +3351,7 @@ xlog_valid_rec_header(
*/ */
STATIC int STATIC int
xlog_do_recovery_pass( xlog_do_recovery_pass(
xlog_t *log, struct xlog *log,
xfs_daddr_t head_blk, xfs_daddr_t head_blk,
xfs_daddr_t tail_blk, xfs_daddr_t tail_blk,
int pass) int pass)
...@@ -3595,7 +3603,7 @@ xlog_do_recovery_pass( ...@@ -3595,7 +3603,7 @@ xlog_do_recovery_pass(
*/ */
STATIC int STATIC int
xlog_do_log_recovery( xlog_do_log_recovery(
xlog_t *log, struct xlog *log,
xfs_daddr_t head_blk, xfs_daddr_t head_blk,
xfs_daddr_t tail_blk) xfs_daddr_t tail_blk)
{ {
...@@ -3646,7 +3654,7 @@ xlog_do_log_recovery( ...@@ -3646,7 +3654,7 @@ xlog_do_log_recovery(
*/ */
STATIC int STATIC int
xlog_do_recover( xlog_do_recover(
xlog_t *log, struct xlog *log,
xfs_daddr_t head_blk, xfs_daddr_t head_blk,
xfs_daddr_t tail_blk) xfs_daddr_t tail_blk)
{ {
...@@ -3721,7 +3729,7 @@ xlog_do_recover( ...@@ -3721,7 +3729,7 @@ xlog_do_recover(
*/ */
int int
xlog_recover( xlog_recover(
xlog_t *log) struct xlog *log)
{ {
xfs_daddr_t head_blk, tail_blk; xfs_daddr_t head_blk, tail_blk;
int error; int error;
...@@ -3767,7 +3775,7 @@ xlog_recover( ...@@ -3767,7 +3775,7 @@ xlog_recover(
*/ */
int int
xlog_recover_finish( xlog_recover_finish(
xlog_t *log) struct xlog *log)
{ {
/* /*
* Now we're ready to do the transactions needed for the * Now we're ready to do the transactions needed for the
...@@ -3814,7 +3822,7 @@ xlog_recover_finish( ...@@ -3814,7 +3822,7 @@ xlog_recover_finish(
*/ */
void void
xlog_recover_check_summary( xlog_recover_check_summary(
xlog_t *log) struct xlog *log)
{ {
xfs_mount_t *mp; xfs_mount_t *mp;
xfs_agf_t *agfp; xfs_agf_t *agfp;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment