1 // SPDX-License-Identifier: GPL-2.0
3 * Copyright (c) 2000-2001,2005 Silicon Graphics, Inc.
12 xlog_recover_print_trans_head(
15 printf(_("TRANS: tid:0x%x #items:%d trans:0x%x q:0x%lx\n"),
17 tr
->r_theader
.th_num_items
,
18 tr
->r_theader
.th_tid
, (long)&tr
->r_itemq
);
22 xlog_recover_do_trans(
24 xlog_recover_t
*trans
,
27 xlog_recover_print_trans(trans
, &trans
->r_itemq
, 3);
34 int print_block_start
)
36 xfs_daddr_t head_blk
, tail_blk
;
39 error
= xlog_find_tail(log
, &head_blk
, &tail_blk
);
41 fprintf(stderr
, _("%s: failed to find head and tail, error: %d\n"),
46 printf(_(" log tail: %lld head: %lld state: %s\n"),
49 (tail_blk
== head_blk
)?"<CLEAN>":"<DIRTY>");
51 if (print_block_start
!= -1) {
52 printf(_(" override tail: %d\n"), print_block_start
);
53 tail_blk
= print_block_start
;
57 print_record_header
= 1;
59 if (head_blk
== tail_blk
)
63 * Version 5 superblock log feature mask validation. We know the
64 * log is dirty so check if there are any unknown log features
65 * in what we need to recover. If there are unknown features
66 * (e.g. unsupported transactions) then warn about it.
68 if (XFS_SB_VERSION_NUM(&log
->l_mp
->m_sb
) == XFS_SB_VERSION_5
&&
69 xfs_sb_has_incompat_log_feature(&log
->l_mp
->m_sb
,
70 XFS_SB_FEAT_INCOMPAT_LOG_UNKNOWN
)) {
72 "Superblock has unknown incompatible log features (0x%x) enabled.\n"
73 "Output may be incomplete or inaccurate. It is recommended that you\n"
74 "upgrade your xfsprogs installation to match the filesystem features.\n"),
75 (log
->l_mp
->m_sb
.sb_features_log_incompat
&
76 XFS_SB_FEAT_INCOMPAT_LOG_UNKNOWN
));
79 if ((error
= xlog_do_recovery_pass(log
, head_blk
, tail_blk
, XLOG_RECOVER_PASS1
))) {
80 fprintf(stderr
, _("%s: failed in xfs_do_recovery_pass, error: %d\n"),