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

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