From owner-svn-src-all@freebsd.org Sat Mar 10 13:48:08 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 420CCF38D3C; Sat, 10 Mar 2018 13:48:08 +0000 (UTC) (envelope-from etnapierala@gmail.com) Received: from mail-wr0-x243.google.com (mail-wr0-x243.google.com [IPv6:2a00:1450:400c:c0c::243]) (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 A8FAA74030; Sat, 10 Mar 2018 13:48:07 +0000 (UTC) (envelope-from etnapierala@gmail.com) Received: by mail-wr0-x243.google.com with SMTP id f14so11502320wre.8; Sat, 10 Mar 2018 05:48: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:mail-followup-to :references:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=IX5UlUbmctDBEeEQ8FaOsuoqxDWP1vN9eIAEuGN2064=; b=ujUlWL0ALAK1OyVjQKi671OqyF9/wLVgj1D2DQoOl/llogMJSss5zjbklnhNL4OwPG OFclmyFWinyGkh6LQBWwaVuU/P1V79aR8ugmBOzuhj7qpGPTXoSe9elHVxpXYo4hnLqi z/idTnsvl2p0TgTngU7rW742xiKfGhac2zsHL/nt4mu8vhY9C8YgamV4N5VkrAx6nrds fi4m+QY6NgUiMgz6iar0+ZDnn1hkeBTZ9I6eFXrMNw+AtSV9Pv9xWLd0sbWKvyBjt+1h FJnNY9Ye+MXiu/JI/xYuJCDxu/GHAphoTtx+ykilmgGJjdgzrkRoxKE8dGV/pOvF+ZSR XHdg== 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 :mail-followup-to:references:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=IX5UlUbmctDBEeEQ8FaOsuoqxDWP1vN9eIAEuGN2064=; b=XXp+uSG7pSelChoKsQM2FJbwPaAt70UpRA/HK84G5aNYQcVwXmQ3e0r0O9/X3nsnJb WulmGDIU9Z8LG65+TWyNI4U2VI/FYrv37rnb7+Z6qLAhhubUVsmp3mYgA8SC/mgjoddz i1XPfORw8Te7x7qGQVb65iFafut/wASd2f5D3hLX2fzaZAlWr/akZ1laq4gs75ipWREz gMRidi9W25FVuS04ijTe26Uo0VNKoKYkmxHn4/FFjfLbcfoZ9kP3l/XTHvxiL24mXldq LLTFmyUdyVF8AhK2qSlnjck8noeGCrlmnI3VXQUXVe5yOd539FR+ddLc9Yn8lBYGLKA7 7bmQ== X-Gm-Message-State: AElRT7F1oj0tcfs4tpmG8P3l/LME1jHPum+P3ih1F6pHVDW/DbnrNZc/ +HdzdAwprRhtdaCFgLKWuJWVDg== X-Google-Smtp-Source: AG47ELtKYcDrHnMaz9KqwLPSYksXBzhN3W4IGfOEyIsPpn3tO6w/nNfHxYWWsg7tubqCDizADT2+Lg== X-Received: by 10.223.195.204 with SMTP id d12mr1699202wrg.116.1520689686255; Sat, 10 Mar 2018 05:48:06 -0800 (PST) Received: from brick (cpc92302-cmbg19-2-0-cust461.5-4.cable.virginm.net. [82.1.209.206]) by smtp.gmail.com with ESMTPSA id l11sm2895892wrg.71.2018.03.10.05.48.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 10 Mar 2018 05:48:05 -0800 (PST) Sender: =?UTF-8?Q?Edward_Tomasz_Napiera=C5=82a?= Date: Sat, 10 Mar 2018 13:48:02 +0000 From: Edward Tomasz =?utf-8?Q?Napiera=C5=82a?= To: David Bright Cc: Ian Lepore , Mark Johnston , 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: <20180310134802.GA7708@brick> Mail-Followup-To: David Bright , Ian Lepore , Mark Johnston , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org 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.3 (2018-01-21) 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 13:48:08 -0000 On 0309T2136, 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; /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. Sure there is. See /etc/defaults/rc.conf: fsck_y_flags="-T ffs:-R -T ufs:-R" # Additional flags for fsck -y