xfs: remove xlog_t typedef

Remove the xlog_t type definitions.

Signed-off-by: Mark Tinguely <tinguely@sgi.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Ben Myers <bpm@sgi.com>
This commit is contained in:
Mark Tinguely 2012-06-14 09:22:16 -05:00 committed by Ben Myers
parent ad223e6030
commit 9a8d2fdbb4
3 changed files with 224 additions and 157 deletions

View File

@ -45,50 +45,84 @@ xlog_commit_record(
struct xlog_in_core **iclog, struct xlog_in_core **iclog,
xfs_lsn_t *commitlsnp); xfs_lsn_t *commitlsnp);
STATIC xlog_t * xlog_alloc_log(xfs_mount_t *mp, STATIC struct xlog *
xfs_buftarg_t *log_target, xlog_alloc_log(
struct xfs_mount *mp,
struct xfs_buftarg *log_target,
xfs_daddr_t blk_offset, xfs_daddr_t blk_offset,
int num_bblks); int num_bblks);
STATIC int STATIC int
xlog_space_left( xlog_space_left(
struct xlog *log, struct xlog *log,
atomic64_t *head); atomic64_t *head);
STATIC int xlog_sync(xlog_t *log, xlog_in_core_t *iclog); STATIC int
STATIC void xlog_dealloc_log(xlog_t *log); xlog_sync(
struct xlog *log,
struct xlog_in_core *iclog);
STATIC void
xlog_dealloc_log(
struct xlog *log);
/* local state machine functions */ /* local state machine functions */
STATIC void xlog_state_done_syncing(xlog_in_core_t *iclog, int); STATIC void xlog_state_done_syncing(xlog_in_core_t *iclog, int);
STATIC void xlog_state_do_callback(xlog_t *log,int aborted, xlog_in_core_t *iclog); STATIC void
STATIC int xlog_state_get_iclog_space(xlog_t *log, xlog_state_do_callback(
struct xlog *log,
int aborted,
struct xlog_in_core *iclog);
STATIC int
xlog_state_get_iclog_space(
struct xlog *log,
int len, int len,
xlog_in_core_t **iclog, struct xlog_in_core **iclog,
xlog_ticket_t *ticket, struct xlog_ticket *ticket,
int *continued_write, int *continued_write,
int *logoffsetp); int *logoffsetp);
STATIC int xlog_state_release_iclog(xlog_t *log, STATIC int
xlog_in_core_t *iclog); xlog_state_release_iclog(
STATIC void xlog_state_switch_iclogs(xlog_t *log, struct xlog *log,
xlog_in_core_t *iclog, struct xlog_in_core *iclog);
STATIC void
xlog_state_switch_iclogs(
struct xlog *log,
struct xlog_in_core *iclog,
int eventual_size); int eventual_size);
STATIC void xlog_state_want_sync(xlog_t *log, xlog_in_core_t *iclog); STATIC void
xlog_state_want_sync(
struct xlog *log,
struct xlog_in_core *iclog);
STATIC void STATIC void
xlog_grant_push_ail( xlog_grant_push_ail(
struct xlog *log, struct xlog *log,
int need_bytes); int need_bytes);
STATIC void xlog_regrant_reserve_log_space(xlog_t *log, STATIC void
xlog_ticket_t *ticket); xlog_regrant_reserve_log_space(
STATIC void xlog_ungrant_log_space(xlog_t *log, struct xlog *log,
xlog_ticket_t *ticket); struct xlog_ticket *ticket);
STATIC void
xlog_ungrant_log_space(
struct xlog *log,
struct xlog_ticket *ticket);
#if defined(DEBUG) #if defined(DEBUG)
STATIC void xlog_verify_dest_ptr(xlog_t *log, char *ptr); STATIC void
xlog_verify_dest_ptr(
struct xlog *log,
char *ptr);
STATIC void STATIC void
xlog_verify_grant_tail( xlog_verify_grant_tail(
struct xlog *log); struct xlog *log);
STATIC void xlog_verify_iclog(xlog_t *log, xlog_in_core_t *iclog, STATIC void
int count, boolean_t syncing); xlog_verify_iclog(
STATIC void xlog_verify_tail_lsn(xlog_t *log, xlog_in_core_t *iclog, struct xlog *log,
struct xlog_in_core *iclog,
int count,
boolean_t syncing);
STATIC void
xlog_verify_tail_lsn(
struct xlog *log,
struct xlog_in_core *iclog,
xfs_lsn_t tail_lsn); xfs_lsn_t tail_lsn);
#else #else
#define xlog_verify_dest_ptr(a,b) #define xlog_verify_dest_ptr(a,b)
@ -97,7 +131,9 @@ STATIC void xlog_verify_tail_lsn(xlog_t *log, xlog_in_core_t *iclog,
#define xlog_verify_tail_lsn(a,b,c) #define xlog_verify_tail_lsn(a,b,c)
#endif #endif
STATIC int xlog_iclogs_empty(xlog_t *log); STATIC int
xlog_iclogs_empty(
struct xlog *log);
static void static void
xlog_grant_sub_space( xlog_grant_sub_space(
@ -684,7 +720,7 @@ xfs_log_mount_finish(xfs_mount_t *mp)
int int
xfs_log_unmount_write(xfs_mount_t *mp) xfs_log_unmount_write(xfs_mount_t *mp)
{ {
xlog_t *log = mp->m_log; struct xlog *log = mp->m_log;
xlog_in_core_t *iclog; xlog_in_core_t *iclog;
#ifdef DEBUG #ifdef DEBUG
xlog_in_core_t *first_iclog; xlog_in_core_t *first_iclog;
@ -893,7 +929,7 @@ int
xfs_log_need_covered(xfs_mount_t *mp) xfs_log_need_covered(xfs_mount_t *mp)
{ {
int needed = 0; int needed = 0;
xlog_t *log = mp->m_log; struct xlog *log = mp->m_log;
if (!xfs_fs_writable(mp)) if (!xfs_fs_writable(mp))
return 0; return 0;
@ -1024,8 +1060,8 @@ xlog_space_left(
void void
xlog_iodone(xfs_buf_t *bp) xlog_iodone(xfs_buf_t *bp)
{ {
xlog_in_core_t *iclog = bp->b_fspriv; struct xlog_in_core *iclog = bp->b_fspriv;
xlog_t *l = iclog->ic_log; struct xlog *l = iclog->ic_log;
int aborted = 0; int aborted = 0;
/* /*
@ -1067,8 +1103,9 @@ xlog_iodone(xfs_buf_t *bp)
*/ */
STATIC void STATIC void
xlog_get_iclog_buffer_size(xfs_mount_t *mp, xlog_get_iclog_buffer_size(
xlog_t *log) struct xfs_mount *mp,
struct xlog *log)
{ {
int size; int size;
int xhdrs; int xhdrs;
@ -1129,13 +1166,14 @@ done:
* Its primary purpose is to fill in enough, so recovery can occur. However, * Its primary purpose is to fill in enough, so recovery can occur. However,
* some other stuff may be filled in too. * some other stuff may be filled in too.
*/ */
STATIC xlog_t * STATIC struct xlog *
xlog_alloc_log(xfs_mount_t *mp, xlog_alloc_log(
xfs_buftarg_t *log_target, struct xfs_mount *mp,
struct xfs_buftarg *log_target,
xfs_daddr_t blk_offset, xfs_daddr_t blk_offset,
int num_bblks) int num_bblks)
{ {
xlog_t *log; struct xlog *log;
xlog_rec_header_t *head; xlog_rec_header_t *head;
xlog_in_core_t **iclogp; xlog_in_core_t **iclogp;
xlog_in_core_t *iclog, *prev_iclog=NULL; xlog_in_core_t *iclog, *prev_iclog=NULL;
@ -1144,7 +1182,7 @@ xlog_alloc_log(xfs_mount_t *mp,
int error = ENOMEM; int error = ENOMEM;
uint log2_size = 0; uint log2_size = 0;
log = kmem_zalloc(sizeof(xlog_t), KM_MAYFAIL); log = kmem_zalloc(sizeof(struct xlog), KM_MAYFAIL);
if (!log) { if (!log) {
xfs_warn(mp, "Log allocation failed: No memory!"); xfs_warn(mp, "Log allocation failed: No memory!");
goto out; goto out;
@ -1434,8 +1472,9 @@ xlog_bdstrat(
*/ */
STATIC int STATIC int
xlog_sync(xlog_t *log, xlog_sync(
xlog_in_core_t *iclog) struct xlog *log,
struct xlog_in_core *iclog)
{ {
xfs_caddr_t dptr; /* pointer to byte sized element */ xfs_caddr_t dptr; /* pointer to byte sized element */
xfs_buf_t *bp; xfs_buf_t *bp;
@ -1584,7 +1623,8 @@ xlog_sync(xlog_t *log,
* Deallocate a log structure * Deallocate a log structure
*/ */
STATIC void STATIC void
xlog_dealloc_log(xlog_t *log) xlog_dealloc_log(
struct xlog *log)
{ {
xlog_in_core_t *iclog, *next_iclog; xlog_in_core_t *iclog, *next_iclog;
int i; int i;
@ -1616,8 +1656,9 @@ xlog_dealloc_log(xlog_t *log)
*/ */
/* ARGSUSED */ /* ARGSUSED */
static inline void static inline void
xlog_state_finish_copy(xlog_t *log, xlog_state_finish_copy(
xlog_in_core_t *iclog, struct xlog *log,
struct xlog_in_core *iclog,
int record_cnt, int record_cnt,
int copy_bytes) int copy_bytes)
{ {
@ -2142,7 +2183,8 @@ xlog_write(
* State Change: DIRTY -> ACTIVE * State Change: DIRTY -> ACTIVE
*/ */
STATIC void STATIC void
xlog_state_clean_log(xlog_t *log) xlog_state_clean_log(
struct xlog *log)
{ {
xlog_in_core_t *iclog; xlog_in_core_t *iclog;
int changed = 0; int changed = 0;
@ -2222,7 +2264,7 @@ xlog_state_clean_log(xlog_t *log)
STATIC xfs_lsn_t STATIC xfs_lsn_t
xlog_get_lowest_lsn( xlog_get_lowest_lsn(
xlog_t *log) struct xlog *log)
{ {
xlog_in_core_t *lsn_log; xlog_in_core_t *lsn_log;
xfs_lsn_t lowest_lsn, lsn; xfs_lsn_t lowest_lsn, lsn;
@ -2245,9 +2287,9 @@ xlog_get_lowest_lsn(
STATIC void STATIC void
xlog_state_do_callback( xlog_state_do_callback(
xlog_t *log, struct xlog *log,
int aborted, int aborted,
xlog_in_core_t *ciclog) struct xlog_in_core *ciclog)
{ {
xlog_in_core_t *iclog; xlog_in_core_t *iclog;
xlog_in_core_t *first_iclog; /* used to know when we've xlog_in_core_t *first_iclog; /* used to know when we've
@ -2467,7 +2509,7 @@ xlog_state_done_syncing(
xlog_in_core_t *iclog, xlog_in_core_t *iclog,
int aborted) int aborted)
{ {
xlog_t *log = iclog->ic_log; struct xlog *log = iclog->ic_log;
spin_lock(&log->l_icloglock); spin_lock(&log->l_icloglock);
@ -2521,10 +2563,11 @@ xlog_state_done_syncing(
* is copied. * is copied.
*/ */
STATIC int STATIC int
xlog_state_get_iclog_space(xlog_t *log, xlog_state_get_iclog_space(
struct xlog *log,
int len, int len,
xlog_in_core_t **iclogp, struct xlog_in_core **iclogp,
xlog_ticket_t *ticket, struct xlog_ticket *ticket,
int *continued_write, int *continued_write,
int *logoffsetp) int *logoffsetp)
{ {
@ -2631,8 +2674,9 @@ restart:
* move grant reservation head forward. * move grant reservation head forward.
*/ */
STATIC void STATIC void
xlog_regrant_reserve_log_space(xlog_t *log, xlog_regrant_reserve_log_space(
xlog_ticket_t *ticket) struct xlog *log,
struct xlog_ticket *ticket)
{ {
trace_xfs_log_regrant_reserve_enter(log, ticket); trace_xfs_log_regrant_reserve_enter(log, ticket);
@ -2677,8 +2721,9 @@ xlog_regrant_reserve_log_space(xlog_t *log,
* in the current reservation field. * in the current reservation field.
*/ */
STATIC void STATIC void
xlog_ungrant_log_space(xlog_t *log, xlog_ungrant_log_space(
xlog_ticket_t *ticket) struct xlog *log,
struct xlog_ticket *ticket)
{ {
int bytes; int bytes;
@ -2717,8 +2762,8 @@ xlog_ungrant_log_space(xlog_t *log,
*/ */
STATIC int STATIC int
xlog_state_release_iclog( xlog_state_release_iclog(
xlog_t *log, struct xlog *log,
xlog_in_core_t *iclog) struct xlog_in_core *iclog)
{ {
int sync = 0; /* do we sync? */ int sync = 0; /* do we sync? */
@ -2768,8 +2813,9 @@ xlog_state_release_iclog(
* that every data block. We have run out of space in this log record. * that every data block. We have run out of space in this log record.
*/ */
STATIC void STATIC void
xlog_state_switch_iclogs(xlog_t *log, xlog_state_switch_iclogs(
xlog_in_core_t *iclog, struct xlog *log,
struct xlog_in_core *iclog,
int eventual_size) int eventual_size)
{ {
ASSERT(iclog->ic_state == XLOG_STATE_ACTIVE); ASSERT(iclog->ic_state == XLOG_STATE_ACTIVE);
@ -3114,7 +3160,9 @@ xfs_log_force_lsn(
* disk. * disk.
*/ */
STATIC void STATIC void
xlog_state_want_sync(xlog_t *log, xlog_in_core_t *iclog) xlog_state_want_sync(
struct xlog *log,
struct xlog_in_core *iclog)
{ {
assert_spin_locked(&log->l_icloglock); assert_spin_locked(&log->l_icloglock);
@ -3158,7 +3206,7 @@ xfs_log_ticket_get(
/* /*
* Allocate and initialise a new log ticket. * Allocate and initialise a new log ticket.
*/ */
xlog_ticket_t * struct xlog_ticket *
xlog_ticket_alloc( xlog_ticket_alloc(
struct xlog *log, struct xlog *log,
int unit_bytes, int unit_bytes,
@ -3346,8 +3394,9 @@ xlog_verify_grant_tail(
/* check if it will fit */ /* check if it will fit */
STATIC void STATIC void
xlog_verify_tail_lsn(xlog_t *log, xlog_verify_tail_lsn(
xlog_in_core_t *iclog, struct xlog *log,
struct xlog_in_core *iclog,
xfs_lsn_t tail_lsn) xfs_lsn_t tail_lsn)
{ {
int blocks; int blocks;
@ -3385,8 +3434,9 @@ xlog_verify_tail_lsn(xlog_t *log,
* the cycle numbers agree with the current cycle number. * the cycle numbers agree with the current cycle number.
*/ */
STATIC void STATIC void
xlog_verify_iclog(xlog_t *log, xlog_verify_iclog(
xlog_in_core_t *iclog, struct xlog *log,
struct xlog_in_core *iclog,
int count, int count,
boolean_t syncing) boolean_t syncing)
{ {
@ -3482,7 +3532,7 @@ xlog_verify_iclog(xlog_t *log,
*/ */
STATIC int STATIC int
xlog_state_ioerror( xlog_state_ioerror(
xlog_t *log) struct xlog *log)
{ {
xlog_in_core_t *iclog, *ic; xlog_in_core_t *iclog, *ic;
@ -3527,7 +3577,7 @@ xfs_log_force_umount(
struct xfs_mount *mp, struct xfs_mount *mp,
int logerror) int logerror)
{ {
xlog_t *log; struct xlog *log;
int retval; int retval;
log = mp->m_log; log = mp->m_log;
@ -3634,7 +3684,8 @@ xfs_log_force_umount(
} }
STATIC int STATIC int
xlog_iclogs_empty(xlog_t *log) xlog_iclogs_empty(
struct xlog *log)
{ {
xlog_in_core_t *iclog; xlog_in_core_t *iclog;

View File

@ -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 {
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 {
#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 *

View File

@ -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 {
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(
*/ */
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(
*/ */
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(
*/ */
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(
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(
*/ */
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(
*/ */
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(
*/ */
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(
*/ */
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 @@ out:
*/ */
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 @@ out:
*/ */
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 @@ validate_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 @@ done:
*/ */
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 @@ bp_err:
*/ */
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(
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(
*/ */
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(
*/ */
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(
*/ */
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(
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 @@ error:
} }
/* /*
* 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(
*/ */
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,8 +2586,8 @@ 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;
@ -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(
*/ */
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 @@ abort_error:
*/ */
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(
*/ */
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,8 +3217,8 @@ 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;
@ -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(
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(
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(
*/ */
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(
*/ */
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(
*/ */
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(
*/ */
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(
*/ */
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(
*/ */
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;