xfs
[Top] [All Lists]

[PATCH] xfs_repair: exit with status 2 if log dirtiness is unknown

To: xfs-oss <xfs@xxxxxxxxxxx>, linux-xfs@xxxxxxxxxxxxxxx
Subject: [PATCH] xfs_repair: exit with status 2 if log dirtiness is unknown
From: Eric Sandeen <sandeen@xxxxxxxxxx>
Date: Mon, 12 Sep 2016 07:46:05 -0500
Delivered-to: xfs@xxxxxxxxxxx
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:45.0) Gecko/20100101 Thunderbird/45.3.0
This new case is mostly like the known dirty log case; the log
is corrupt, dirtiness cannot be determined, and a mount/umount
cycle or an xfs_repair -L is required.

So exit with status 2 here as well.

Signed-off-by: Eric Sandeen <sandeen@xxxxxxxxxx>
---

diff --git a/repair/phase2.c b/repair/phase2.c
index e21ffa6..5964244 100644
--- a/repair/phase2.c
+++ b/repair/phase2.c
@@ -79,10 +79,11 @@ zero_log(
                _("zero_log: cannot find log head/tail (xlog_find_tail=%d)\n"),
                        error);
                if (!no_modify && !zap_log)
-                       do_error(_(
+                       do_warn(_(
 "ERROR: The log head and/or tail cannot be discovered. Attempt to mount the\n"
 "filesystem to replay the log or use the -L option to destroy the log and\n"
 "attempt a repair.\n"));
+                       exit(2);
        } else {
                if (verbose) {
                        do_warn(

<Prev in Thread] Current Thread [Next in Thread>