xfs
[Top] [All Lists]

Re: xfs_check exit code?

To: Nathan Scott <nathans@xxxxxxx>
Subject: Re: xfs_check exit code?
From: Michael Sinz <msinz@xxxxxxxxx>
Date: Tue, 03 Dec 2002 06:50:45 -0500
Cc: linux-xfs@xxxxxxxxxxx
References: <20021129063350.35728.qmail@web15205.mail.bjs.yahoo.com> <3DEB4F26.5010608@wgate.com> <20021203044009.GD6391@frodo.melbourne.sgi.com>
Sender: linux-xfs-bounce@xxxxxxxxxxx
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.1) Gecko/20021111
Nathan Scott wrote:
On Mon, Dec 02, 2002 at 07:16:38AM -0500, Michael Sinz wrote:

I have been, it seems wrongly, assuming that if xfs_check finds
a problem on the disk that the exit code is non-zero.  (And,
conversely, if all is well, that the exit code is zero)

Anyway, I have, this weekend, had some problems with one of my machines.
(I have not fully diagnosed the problem so I don't want to point fingers
at XFS yet).  During the recovery process, I used my /boot recovery
script and, while xfs_check found errors, the exit code of xfs_check
was zero.  This prevented auto-recovery from working.

Is the exit code part of the defined API for xfs_check?  Could it be
part of the defined behavior?

For now I will need to check if xfs_check has any output - which is
almost as good as long as that behavior is "defined"


This is what is currently used in the XFS regression tests.  From
a quick look in the cmd/xfsprogs/db/check.c source, it looks like
the intent was that an error would be flagged with an exit code of
2, and a serious_error with a code of 3.  Looks like somewhere on
the way, this is getting lost.  If you're keen to make this work,
it shouldn't be too difficult to figure out where things are going
astray... I don't have much time to spend on it right now though.

When I can come up for some air on the current project at work I will have a look at it. Since this was the intent then I can at least try to make it do that without going against the intent.

--
Michael Sinz -- Director, Systems Engineering -- Worldgate Communications
A master's secrets are only as good as
        the master's ability to explain them to others.


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