From owner-svn-src-all@freebsd.org Sat Mar 10 16:44:14 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0AAE5F46F6B; Sat, 10 Mar 2018 16:44:14 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 553427A5AB; Sat, 10 Mar 2018 16:44:12 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: from pdx.rh.CN85.dnsmgr.net (localhost [127.0.0.1]) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3) with ESMTP id w2AGiALV070243; Sat, 10 Mar 2018 08:44:10 -0800 (PST) (envelope-from freebsd@pdx.rh.CN85.dnsmgr.net) Received: (from freebsd@localhost) by pdx.rh.CN85.dnsmgr.net (8.13.3/8.13.3/Submit) id w2AGiA0x070242; Sat, 10 Mar 2018 08:44:10 -0800 (PST) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201803101644.w2AGiA0x070242@pdx.rh.CN85.dnsmgr.net> Subject: Re: svn commit: r328013 - head/sbin/fsck_ffs In-Reply-To: <20180310161701.GA73335@raichu> To: Mark Johnston Date: Sat, 10 Mar 2018 08:44:10 -0800 (PST) CC: David Bright , Ian Lepore , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Mar 2018 16:44:14 -0000 [ Charset UTF-8 unsupported, converting... ] > On Fri, Mar 09, 2018 at 09:36:25PM -0500, David Bright wrote: > > On Mar 9, 2018, at 17:31, Ian Lepore 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. [?] > > >> > > >> 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 to put in a retry loop to rc.d/fsck, but found that I couldn?t get it 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 status when it hasn?t completely cleaned the file system; > > Sure, but that's a regression IMO: before, I believe we'd successfully > mount the FS even without retrying fsck, and continue booting. > > > /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?s 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 similar flag on the fsck wrapper to be passed along to the filesystem-specific checker, but I think fsck_ffs is the only one that currently implements such a flag. > > As was pointed out by others, this isn't true. In my experience it's > fsck -p that is exiting with status 16. It thus seems like it would be > desirable to add "-T ffs:-R" to the initial fsck invocation in > rc.d/fsck. Please do not do that, if fsck -p fails YOU may optionally wish to continue, or do retries, but please do not make this a hardcoded situation. At most make it a controllable knob that defaults to the old behavior please. Thanks you, -- Rod Grimes rgrimes@freebsd.org