Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 9 Mar 2018 23:28:44 -0800
From:      Eitan Adler <lists@eitanadler.com>
To:        David Bright <dab@freebsd.org>
Cc:        Ian Lepore <ian@freebsd.org>, Mark Johnston <markj@freebsd.org>,  src-committers <src-committers@freebsd.org>, svn-src-all@freebsd.org,  svn-src-head@freebsd.org
Subject:   Re: svn commit: r328013 - head/sbin/fsck_ffs
Message-ID:  <CAF6rxgkm4qEZoJ2%2B0EeN_NLM3m=ctnOyWczqbDnCWfv4x6Jkbw@mail.gmail.com>
In-Reply-To: <D5627342-7FEF-47DA-AF4B-5F0D83490539@FreeBSD.org>
References:  <201801151925.w0FJPCKA019434@repo.freebsd.org> <20180309220940.GG6174@raichu> <1520634689.84937.74.camel@freebsd.org> <D5627342-7FEF-47DA-AF4B-5F0D83490539@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 9 March 2018 at 18:36, David Bright <dab@freebsd.org> wrote:
> On Mar 9, 2018, at 17:31, Ian Lepore <ian@freebsd.org> wrote:
>>
>> On Fri, 2018-03-09 at 17:09 -0500, Mark Johnston wrote:
>>>
>>> etc/rc.d/fsck doesn't know how to interpret the new exit code and now
>>> just drops to a single-user shell when it is encountered. [=E2=80=A6]
>>>
>>> Is there any reason etc/rc.d/fsck shouldn't automatically retry (up to
>
> This is, in fact, the reason that I made the change I did. I was trying t=
o put in a retry loop to rc.d/fsck, but found that I couldn=E2=80=99t get i=
t to work because fsck and fsck_ffs were not exiting with non-zero status. =
The drop to single user is not really due to the specific (new) error code =
of 16, it is due to the fact that fsck_ffs is now exiting with a non-zero s=
tatus when it hasn=E2=80=99t completely cleaned the file system; /any/ non-=
zero status would cause the current rc.d/fsck script to go to single user. =
Prior to my change, fsck_ffs was exiting with a zero status even though it =
had not completely cleaned the filesystem and told the user to run it again=
.
>
>>
>> fsck_ffs already has a -R flag to automatically retry, wouldn't that be
>> a better mechanism for handling this new type of retry?
>
> That=E2=80=99s true; however, there is currently no way to pass that flag=
 through the filesystem-agnostic fsck wrapper called from rc.d/fsck to the =
filesystem-specific fsck_ffs program that it calls. One could implement a s=
imilar flag on the fsck wrapper to be passed along to the filesystem-specif=
ic checker, but I think fsck_ffs is the only one that currently implements =
such a flag.

Why does it need to be filesystem specific? Can't the retry happen in
the wrapper itself?


--=20
Eitan Adler



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAF6rxgkm4qEZoJ2%2B0EeN_NLM3m=ctnOyWczqbDnCWfv4x6Jkbw>