* [PATCH v3] xfs_repair: update the manual content about xfs_repair exit status
@ 2016-09-14 17:00 Zorro Lang
2016-09-14 17:18 ` Darrick J. Wong
0 siblings, 1 reply; 2+ messages in thread
From: Zorro Lang @ 2016-09-14 17:00 UTC (permalink / raw)
To: linux-xfs; +Cc: Zorro Lang
The man 8 xfs_repair said "xfs_repair run without the -n option will
always return a status code of 0". That's not correct.
xfs_repair will return 2 if it finds a fs log which needs to be
replayed or cleared, 1 if runtime error is encountered, and 0 for
all other cases.
Signed-off-by: Zorro Lang <zlang@redhat.com>
---
V3 add more description for return status 1, suggest the user to run
xfs_repair again if it return 1.
Thanks,
Zorro
man/man8/xfs_repair.8 | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/man/man8/xfs_repair.8 b/man/man8/xfs_repair.8
index 1b4d9e3..314f2c2 100644
--- a/man/man8/xfs_repair.8
+++ b/man/man8/xfs_repair.8
@@ -504,12 +504,18 @@ that is known to be free. The entry is therefore invalid and is deleted.
This message refers to a large directory.
If the directory were small, the message would read "junking entry ...".
.SH EXIT STATUS
+.TP
.B xfs_repair \-n
-(no modify node)
+(no modify mode)
will return a status of 1 if filesystem corruption was detected and
0 if no filesystem corruption was detected.
+.TP
.B xfs_repair
-run without the \-n option will always return a status code of 0.
+run without the \-n option will return a status code of 2 if it finds a
+filesystem log which needs to be replayed (by a mount/umount cycle) or
+cleared (by -L option), 1 if a runtime error is encountered, filesystem
+may be even more broken than before, so repair needs to be run again,
+and 0 in all other cases, whether or not filesystem corruption was detected.
.SH BUGS
The filesystem to be checked and repaired must have been
unmounted cleanly using normal system administration procedures
--
2.7.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v3] xfs_repair: update the manual content about xfs_repair exit status
2016-09-14 17:00 [PATCH v3] xfs_repair: update the manual content about xfs_repair exit status Zorro Lang
@ 2016-09-14 17:18 ` Darrick J. Wong
0 siblings, 0 replies; 2+ messages in thread
From: Darrick J. Wong @ 2016-09-14 17:18 UTC (permalink / raw)
To: Zorro Lang; +Cc: linux-xfs
On Thu, Sep 15, 2016 at 01:00:51AM +0800, Zorro Lang wrote:
> The man 8 xfs_repair said "xfs_repair run without the -n option will
> always return a status code of 0". That's not correct.
>
> xfs_repair will return 2 if it finds a fs log which needs to be
> replayed or cleared, 1 if runtime error is encountered, and 0 for
> all other cases.
>
> Signed-off-by: Zorro Lang <zlang@redhat.com>
> ---
>
> V3 add more description for return status 1, suggest the user to run
> xfs_repair again if it return 1.
>
> Thanks,
> Zorro
>
> man/man8/xfs_repair.8 | 10 ++++++++--
> 1 file changed, 8 insertions(+), 2 deletions(-)
>
> diff --git a/man/man8/xfs_repair.8 b/man/man8/xfs_repair.8
> index 1b4d9e3..314f2c2 100644
> --- a/man/man8/xfs_repair.8
> +++ b/man/man8/xfs_repair.8
> @@ -504,12 +504,18 @@ that is known to be free. The entry is therefore invalid and is deleted.
> This message refers to a large directory.
> If the directory were small, the message would read "junking entry ...".
> .SH EXIT STATUS
> +.TP
> .B xfs_repair \-n
> -(no modify node)
> +(no modify mode)
> will return a status of 1 if filesystem corruption was detected and
> 0 if no filesystem corruption was detected.
> +.TP
> .B xfs_repair
> -run without the \-n option will always return a status code of 0.
> +run without the \-n option will return a status code of 2 if it finds a
> +filesystem log which needs to be replayed (by a mount/umount cycle) or
> +cleared (by -L option), 1 if a runtime error is encountered, filesystem
> +may be even more broken than before, so repair needs to be run again,
> +and 0 in all other cases, whether or not filesystem corruption was detected.
Hm. I never did manage to reply with any suggested wording of my own
yesterday. I dislike the runon sentence that this is becoming. How
about this?
"xfs_repair -n (no modify mode) will return a status code of 1 if it is
unable to show that the filesystem is clean, whether due to corruption
or runtime errors. A status code of 0 is returned if the filesystem
was clean.
"xfs_repair run without the -n option will return one of three status
codes. If the filesystem log is dirty, a status code of 2 will be
returned. The dirty log must be replayed by a mount/umount cycle or
cleared with the -L option. If xfs_repair was unable to fix corruption
or encountered a runtime error, a status code of 1 will be returned.
A status code of 0 is returned if the filesystem is now clean."
--D
> .SH BUGS
> The filesystem to be checked and repaired must have been
> unmounted cleanly using normal system administration procedures
> --
> 2.7.4
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-09-14 17:19 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-14 17:00 [PATCH v3] xfs_repair: update the manual content about xfs_repair exit status Zorro Lang
2016-09-14 17:18 ` Darrick J. Wong
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).