Blame SOURCES/xfsprogs-4.11.0-xfs_repair-warn-about-dirty-log-with-n-option.patch

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