xfs_dinode_t *dip;
xfs_fileoff_t eoffset;
xfs_bmbt_rec_t *ep;
- xfs_dinode_fmt_t fmt;
+ enum xfs_dinode_fmt fmt;
int fsize;
xfs_bmbt_key_t *kp;
int n;
n = 0;
eoffset = offset + len - 1;
curoffset = offset;
- fmt = (xfs_dinode_fmt_t)XFS_DFORK_FORMAT(dip, whichfork);
+ fmt = (enum xfs_dinode_fmt)XFS_DFORK_FORMAT(dip, whichfork);
typ = whichfork == XFS_DATA_FORK ? TYP_BMAPBTD : TYP_BMAPBTA;
ASSERT(typtab[typ].typnm == typ);
ASSERT(fmt == XFS_DINODE_FMT_LOCAL || fmt == XFS_DINODE_FMT_EXTENTS ||
int array)
{
int bitpos;
- xfs_dinode_fmt_t f;
+ enum xfs_dinode_fmt f;
int i;
for (i = 0, bitpos = bit; i < count; i++, bitpos += size) {
- f = (xfs_dinode_fmt_t)getbitval(obj, bitpos, size, BVUNSIGNED);
+ f = (enum xfs_dinode_fmt)getbitval(obj, bitpos, size, BVUNSIGNED);
if (array)
dbprintf("%d:", i + base);
if (f < 0 || f >= dinode_fmt_name_size)
}
/* workaround craziness in the xlog routines */
-int xlog_recover_do_trans(struct xlog *log, xlog_recover_t *t, int p)
+int xlog_recover_do_trans(struct xlog *log, struct xlog_recover *t, int p)
{
return 0;
}
extern int xlog_recover(struct xlog *log, int readonly);
extern void xlog_recover_print_data(char *p, int len);
extern void xlog_recover_print_logitem(xlog_recover_item_t *item);
-extern void xlog_recover_print_trans_head(xlog_recover_t *tr);
+extern void xlog_recover_print_trans_head(struct xlog_recover *tr);
extern int xlog_print_find_oldest(struct xlog *log, xfs_daddr_t *last_blk);
/* for transactional view */
-extern void xlog_recover_print_trans_head(xlog_recover_t *tr);
-extern void xlog_recover_print_trans(xlog_recover_t *trans,
+extern void xlog_recover_print_trans_head(struct xlog_recover *tr);
+extern void xlog_recover_print_trans(struct xlog_recover *trans,
struct list_head *itemq, int print);
extern int xlog_do_recovery_pass(struct xlog *log, xfs_daddr_t head_blk,
xfs_daddr_t tail_blk, int pass);
-extern int xlog_recover_do_trans(struct xlog *log, xlog_recover_t *trans,
+extern int xlog_recover_do_trans(struct xlog *log, struct xlog_recover *trans,
int pass);
extern int xlog_header_check_recover(xfs_mount_t *mp,
xlog_rec_header_t *head);
xfs_log_iovec_t *ri_buf; /* ptr to regions buffer */
} xlog_recover_item_t;
-typedef struct xlog_recover {
+struct xlog_recover {
struct hlist_node r_list;
xlog_tid_t r_log_tid; /* log's transaction id */
xfs_trans_header_t r_theader; /* trans header for partial */
int r_state; /* not needed */
xfs_lsn_t r_lsn; /* xact lsn */
struct list_head r_itemq; /* q for items */
-} xlog_recover_t;
+};
#define ITEM_TYPE(i) (*(unsigned short *)(i)->ri_buf[0].i_addr)
* This enum is used in string mapping in xfs_trace.h; please keep the
* TRACE_DEFINE_ENUMs for it up to date.
*/
-typedef enum xfs_dinode_fmt {
+enum xfs_dinode_fmt {
XFS_DINODE_FMT_DEV, /* xfs_dev_t */
XFS_DINODE_FMT_LOCAL, /* bulk data */
XFS_DINODE_FMT_EXTENTS, /* struct xfs_bmbt_rec */
XFS_DINODE_FMT_BTREE, /* struct xfs_bmdr_block */
XFS_DINODE_FMT_UUID /* added long ago, but never used */
-} xfs_dinode_fmt_t;
+};
#define XFS_INODE_FORMAT_STR \
{ XFS_DINODE_FMT_DEV, "dev" }, \
return -1;
}
-STATIC xlog_recover_t *
+STATIC struct xlog_recover *
xlog_recover_find_tid(
struct hlist_head *head,
xlog_tid_t tid)
{
- xlog_recover_t *trans;
+ struct xlog_recover *trans;
struct hlist_node *n;
hlist_for_each_entry(trans, n, head, r_list) {
xlog_tid_t tid,
xfs_lsn_t lsn)
{
- xlog_recover_t *trans;
+ struct xlog_recover *trans;
- trans = kmem_zalloc(sizeof(xlog_recover_t), 0);
+ trans = kmem_zalloc(sizeof(struct xlog_recover), 0);
trans->r_log_tid = tid;
trans->r_lsn = lsn;
INIT_LIST_HEAD(&trans->r_itemq);
STATIC int
xlog_recover_unmount_trans(
- xlog_recover_t *trans)
+ struct xlog_recover *trans)
{
/* Do nothing now */
xfs_warn(log->l_mp, "%s: Unmount LR", __func__);
char *lp;
int num_logops;
xlog_op_header_t *ohead;
- xlog_recover_t *trans;
+ struct xlog_recover *trans;
xlog_tid_t tid;
int error;
unsigned long hash;
void
xlog_recover_print_trans(
- xlog_recover_t *trans,
+ struct xlog_recover *trans,
struct list_head *itemq,
int print)
{
void
xlog_recover_print_trans_head(
- xlog_recover_t *tr)
+ struct xlog_recover *tr)
{
printf(_("TRANS: tid:0x%x #items:%d trans:0x%x q:0x%lx\n"),
tr->r_log_tid,
int
xlog_recover_do_trans(
- struct xlog *log,
- xlog_recover_t *trans,
- int pass)
+ struct xlog *log,
+ struct xlog_recover *trans,
+ int pass)
{
xlog_recover_print_trans(trans, &trans->r_itemq, 3);
return 0;
#include "scan.h"
/* workaround craziness in the xlog routines */
-int xlog_recover_do_trans(struct xlog *log, xlog_recover_t *t, int p)
+int xlog_recover_do_trans(struct xlog *log, struct xlog_recover *t, int p)
{
return 0;
}