xfs_inode_log_format_t *f;
int mode;
int size;
+ int skip_count;
/*
* print inode type header region
return f->ilf_size;
}
+ skip_count = f->ilf_size-1;
+
if (*i >= num_ops) /* end of LR */
- return f->ilf_size-1;
+ return skip_count;
/* core inode comes 2nd */
op_head = (xlog_op_header_t *)*ptr;
xlog_print_op_header(op_head, *i, ptr);
if (op_head->oh_flags & XLOG_CONTINUE_TRANS) {
- return f->ilf_size-1;
+ return skip_count;
}
memmove(&dino, *ptr, sizeof(dino));
size = (int)dino.di_size;
xlog_print_trans_inode_core(&dino);
*ptr += xfs_log_dinode_size(dino.di_version);
-
- if (*i == num_ops-1 && f->ilf_size == 3) {
- return 1;
- }
-
- /* does anything come next */
- op_head = (xlog_op_header_t *)*ptr;
+ skip_count--;
switch (f->ilf_fields & (XFS_ILOG_DEV | XFS_ILOG_UUID)) {
case XFS_ILOG_DEV:
ASSERT(f->ilf_size <= 4);
ASSERT((f->ilf_size == 3) || (f->ilf_fields & XFS_ILOG_AFORK));
+ /* does anything come next */
+ op_head = (xlog_op_header_t *)*ptr;
+
if (f->ilf_fields & XFS_ILOG_DFORK) {
+ if (*i == num_ops-1)
+ return skip_count;
(*i)++;
xlog_print_op_header(op_head, *i, ptr);
*ptr += be32_to_cpu(op_head->oh_len);
if (op_head->oh_flags & XLOG_CONTINUE_TRANS)
- return 1;
+ return skip_count;
op_head = (xlog_op_header_t *)*ptr;
+ skip_count--;
}
if (f->ilf_fields & XFS_ILOG_AFORK) {
+ if (*i == num_ops-1)
+ return skip_count;
(*i)++;
xlog_print_op_header(op_head, *i, ptr);
}
*ptr += be32_to_cpu(op_head->oh_len);
if (op_head->oh_flags & XLOG_CONTINUE_TRANS)
- return 1;
+ return skip_count;
+ skip_count--;
}
+ ASSERT(skip_count == 0);
+
return 0;
} /* xlog_print_trans_inode */