From owner-svn-src-head@freebsd.org Sat Mar 10 16:17:08 2018 Return-Path: Delivered-To: svn-src-head@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 3212DF45040; Sat, 10 Mar 2018 16:17:08 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-it0-x244.google.com (mail-it0-x244.google.com [IPv6:2607:f8b0:4001:c0b::244]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B55C079531; Sat, 10 Mar 2018 16:17:07 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: by mail-it0-x244.google.com with SMTP id c11so6204053ith.4; Sat, 10 Mar 2018 08:17:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=oEzYCbTZx2M25e8uryn4V6B1YmIDY8xCs9ZzBe+uksM=; b=ZBE8vpvm4wz8HYfLKk5O4lnwowzsM0oygwcyqlHS0vAJvsRH6Bh9PzEWrzsKCAuNfH DAenuKGy33MQSmcLUawkFJeyspL20eBFIJHnvhuAD99xDx3ADeh+faB4hXjGeYAwMSXf A3qtNT7ZXRF/OP6Hw9JhdIbjSseB/VOPAXTf8eg5V2yEN3drNZlDXIYczfBpnRZz0frm RP1YbmPozPmQvQFQjrMozft+ejsXHjy03XC/GeSv+w6PtFXr+Ww4x8lmLc7AjW+wDnnj dkglu3lTLabELYuAVUkqby9WNWqvdRLPIiBm9lzjsBK7yocsw++h/W41CdsblhuTgU1I sIfw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=oEzYCbTZx2M25e8uryn4V6B1YmIDY8xCs9ZzBe+uksM=; b=Ajpzf9pgxGs5Ocg7YsPFodyuDNnSWhDet/MDPgQkSKF5iaUAbyfu5yUWb7EesyQfjz Uzhzc2fMM0JitDcN6x9nXpoMCkmxp9blVuv5flExZ1TmBvHDBYigJznLpKPztm2TBYHn wfats8UiQ9p3mmKszLBIZXqIXRdQDes82HjrHW54q5p8I0boEaJinZIkabhaIKXZgXwA Weqrq0siqAT9jteGzds6wFsTXkva6yWIxm+cEwTYzP6ZyjVW+nxcZDAMQjGUoTEmAXHH v9ZdkikPgz/cMJOyDUePvSjkNvArZY2wF8WeA9yIT3I921ieXNkY/p2PLNOLwQJhmOdN UkOg== X-Gm-Message-State: AElRT7FP3CTh2yaRtSNCCXzNF25QikCKGdxKMvhR5F3HL8WFkJV98YCM Z/L9odOprMxfGVjneB0J9CihlQ== X-Google-Smtp-Source: AG47ELun5+DRh277+6WrawQ23giNrZzgEo4hbp/S6OBLlSKulQDMieYOdPK8vInk+X+uAYgoHixOgQ== X-Received: by 10.36.101.194 with SMTP id u185mr2174110itb.124.1520698626812; Sat, 10 Mar 2018 08:17:06 -0800 (PST) Received: from raichu (toroon0560w-lp130-01-174-88-76-226.dsl.bell.ca. [174.88.76.226]) by smtp.gmail.com with ESMTPSA id s1sm2451387ioe.79.2018.03.10.08.17.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 10 Mar 2018 08:17:05 -0800 (PST) Sender: Mark Johnston Date: Sat, 10 Mar 2018 11:17:01 -0500 From: Mark Johnston To: David Bright Cc: Ian Lepore , 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: <20180310161701.GA73335@raichu> References: <201801151925.w0FJPCKA019434@repo.freebsd.org> <20180309220940.GG6174@raichu> <1520634689.84937.74.camel@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Mar 2018 16:17:08 -0000 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.