|
 |
cbb4b9 |
From 47e48705ed893ca9f46adb02ad15e5acddbe060a Mon Sep 17 00:00:00 2001
|
|
 |
cbb4b9 |
From: Eric Sandeen <sandeen@redhat.com>
|
|
 |
cbb4b9 |
Date: Mon, 10 Apr 2017 17:32:04 -0500
|
|
 |
cbb4b9 |
Subject: [PATCH] xfs_repair: warn about dirty log with -n option
|
|
 |
cbb4b9 |
|
|
 |
cbb4b9 |
When looking at xfs_repair -n output today, we have no idea if
|
|
 |
cbb4b9 |
reported errors may be due to an un-replayed dirty log. If this
|
|
 |
cbb4b9 |
is the case, mention it in the output.
|
|
 |
cbb4b9 |
|
|
 |
cbb4b9 |
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
|
|
 |
cbb4b9 |
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
|
|
 |
cbb4b9 |
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
|
|
 |
cbb4b9 |
---
|
|
 |
cbb4b9 |
repair/phase2.c | 9 +++++++--
|
|
 |
cbb4b9 |
1 file changed, 7 insertions(+), 2 deletions(-)
|
|
 |
cbb4b9 |
|
|
 |
cbb4b9 |
Index: xfsprogs-4.5.0/repair/phase2.c
|
|
 |
cbb4b9 |
===================================================================
|
|
 |
cbb4b9 |
--- xfsprogs-4.5.0.orig/repair/phase2.c
|
|
 |
cbb4b9 |
+++ xfsprogs-4.5.0/repair/phase2.c
|
|
 |
cbb4b9 |
@@ -89,11 +89,16 @@ zero_log(
|
|
 |
cbb4b9 |
_("zero_log: head block %" PRId64 " tail block %" PRId64 "\n"),
|
|
 |
cbb4b9 |
head_blk, tail_blk);
|
|
 |
cbb4b9 |
}
|
|
 |
cbb4b9 |
- if (!no_modify && head_blk != tail_blk) {
|
|
 |
cbb4b9 |
- if (zap_log) {
|
|
 |
cbb4b9 |
+ if (head_blk != tail_blk) {
|
|
 |
cbb4b9 |
+ if (!no_modify && zap_log) {
|
|
 |
cbb4b9 |
do_warn(_(
|
|
 |
cbb4b9 |
"ALERT: The filesystem has valuable metadata changes in a log which is being\n"
|
|
 |
cbb4b9 |
"destroyed because the -L option was used.\n"));
|
|
 |
cbb4b9 |
+ } else if (no_modify) {
|
|
 |
cbb4b9 |
+ do_warn(_(
|
|
 |
cbb4b9 |
+"ALERT: The filesystem has valuable metadata changes in a log which is being\n"
|
|
 |
cbb4b9 |
+"ignored because the -n option was used. Expect spurious inconsistencies\n"
|
|
 |
cbb4b9 |
+"which may be resolved by first mounting the filesystem to replay the log.\n"));
|
|
 |
cbb4b9 |
} else {
|
|
 |
cbb4b9 |
do_warn(_(
|
|
 |
cbb4b9 |
"ERROR: The filesystem has valuable metadata changes in a log which needs to\n"
|