]>
git.ipfire.org Git - thirdparty/xfsprogs-dev.git/blob - logprint/log_print_trans.c
2 * Copyright (c) 2000-2001 Silicon Graphics, Inc. All Rights Reserved.
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms of version 2 of the GNU General Public License as
6 * published by the Free Software Foundation.
8 * This program is distributed in the hope that it would be useful, but
9 * WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
12 * Further, this software is distributed without any warranty that it is
13 * free of the rightful claim of any third person regarding infringement
14 * or the like. Any license provided herein, whether implied or
15 * otherwise, applies only to this software file. Patent licenses, if
16 * any, provided herein do not apply to combinations of this program with
17 * other software, or any other product whatsoever.
19 * You should have received a copy of the GNU General Public License along
20 * with this program; if not, write the Free Software Foundation, Inc., 59
21 * Temple Place - Suite 330, Boston MA 02111-1307, USA.
23 * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
24 * Mountain View, CA 94043, or:
28 * For further information regarding this notice, see:
30 * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/
36 xlog_recover_print_trans_head(
39 printf("TRANS: tid:0x%x type:%s #items:%d trans:0x%x q:0x%lx\n",
40 tr
->r_log_tid
, trans_type
[tr
->r_theader
.th_type
],
41 tr
->r_theader
.th_num_items
,
42 tr
->r_theader
.th_tid
, (long)tr
->r_itemq
);
43 } /* xlog_recover_print_trans_head */
46 xlog_recover_do_trans(xlog_t
*log
,
47 xlog_recover_t
*trans
,
50 xlog_recover_print_trans(trans
, trans
->r_itemq
, 3);
52 } /* xlog_recover_do_trans */
56 xfs_log_print_trans(xlog_t
*log
,
57 int print_block_start
)
59 xfs_daddr_t head_blk
, tail_blk
;
61 if (xlog_find_tail(log
, &head_blk
, &tail_blk
, 0))
64 printf(" log tail: %lld head: %lld state: %s\n",
67 (tail_blk
== head_blk
)?"<CLEAN>":"<DIRTY>");
69 if (print_block_start
!= -1) {
70 printf(" override tail: %lld\n",
71 (long long)print_block_start
);
72 tail_blk
= print_block_start
;
76 print_record_header
=1;
77 if (xlog_do_recovery_pass(log
, head_blk
, tail_blk
, XLOG_RECOVER_PASS1
))
80 } /* xfs_log_print_trans */