X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=fs%2Fxfs%2Fxfs_log_priv.h;h=c31e3ce3be6602cd8f96fcb7419af04d9912b445;hb=f7f1b0f1e2fbadeab12d24236000e778aa9b1ead;hp=7d91f70bd7af05b9f0926b245570dfd2b263c72a;hpb=c7b5ebbddf7bcd3651947760f423e3783bbe6573;p=linux-2.6.git diff --git a/fs/xfs/xfs_log_priv.h b/fs/xfs/xfs_log_priv.h index 7d91f70bd..c31e3ce3b 100644 --- a/fs/xfs/xfs_log_priv.h +++ b/fs/xfs/xfs_log_priv.h @@ -74,17 +74,17 @@ struct xfs_mount; * set lsns */ -#define ASSIGN_LSN_CYCLE(lsn,cycle,arch) \ - INT_SET(((uint *)&(lsn))[LSN_FIELD_CYCLE(arch)], arch, (cycle)); -#define ASSIGN_LSN_BLOCK(lsn,block,arch) \ - INT_SET(((uint *)&(lsn))[LSN_FIELD_BLOCK(arch)], arch, (block)); -#define ASSIGN_ANY_LSN(lsn,cycle,block,arch) \ +#define ASSIGN_ANY_LSN_HOST(lsn,cycle,block) \ { \ - ASSIGN_LSN_CYCLE(lsn,cycle,arch); \ - ASSIGN_LSN_BLOCK(lsn,block,arch); \ + (lsn) = ((xfs_lsn_t)(cycle)<<32)|(block); \ } -#define ASSIGN_LSN(lsn,log,arch) \ - ASSIGN_ANY_LSN(lsn,(log)->l_curr_cycle,(log)->l_curr_block,arch); +#define ASSIGN_ANY_LSN_DISK(lsn,cycle,block) \ + { \ + INT_SET(((uint *)&(lsn))[0], ARCH_CONVERT, (cycle)); \ + INT_SET(((uint *)&(lsn))[1], ARCH_CONVERT, (block)); \ + } +#define ASSIGN_LSN(lsn,log) \ + ASSIGN_ANY_LSN_DISK(lsn,(log)->l_curr_cycle,(log)->l_curr_block); #define XLOG_SET(f,b) (((f) & (b)) == (b)) @@ -430,7 +430,6 @@ typedef struct xlog_iclog_fields { int ic_size; int ic_offset; int ic_refcnt; - int ic_roundoff; int ic_bwritecnt; ushort_t ic_state; char *ic_datap; /* pointer to iclog data */ @@ -462,7 +461,6 @@ typedef struct xlog_in_core { #define ic_size hic_fields.ic_size #define ic_offset hic_fields.ic_offset #define ic_refcnt hic_fields.ic_refcnt -#define ic_roundoff hic_fields.ic_roundoff #define ic_bwritecnt hic_fields.ic_bwritecnt #define ic_state hic_fields.ic_state #define ic_datap hic_fields.ic_datap @@ -498,7 +496,6 @@ typedef struct log { xfs_daddr_t l_logBBstart; /* start block of log */ int l_logsize; /* size of log in bytes */ int l_logBBsize; /* size of log in BB chunks */ - int l_roundoff; /* round off error of iclogs */ int l_curr_cycle; /* Cycle number of log writes */ int l_prev_cycle; /* Cycle number before last * block increment */ @@ -545,7 +542,7 @@ extern int xlog_find_tail(xlog_t *log, int readonly); extern int xlog_recover(xlog_t *log, int readonly); extern int xlog_recover_finish(xlog_t *log, int mfsi_flags); -extern void xlog_pack_data(xlog_t *log, xlog_in_core_t *iclog); +extern void xlog_pack_data(xlog_t *log, xlog_in_core_t *iclog, int); extern void xlog_recover_process_iunlinks(xlog_t *log); extern struct xfs_buf *xlog_get_bp(xlog_t *, int);