From owner-freebsd-current@FreeBSD.ORG Mon Jun 1 15:33:16 2009 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3A323106566B; Mon, 1 Jun 2009 15:33:16 +0000 (UTC) (envelope-from avg@freebsd.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 516888FC13; Mon, 1 Jun 2009 15:33:15 +0000 (UTC) (envelope-from avg@freebsd.org) Received: from odyssey.starpoint.kiev.ua (alpha-e.starpoint.kiev.ua [212.40.38.101]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id SAA07395; Mon, 01 Jun 2009 18:33:13 +0300 (EEST) (envelope-from avg@freebsd.org) Message-ID: <4A23F4B8.7000002@freebsd.org> Date: Mon, 01 Jun 2009 18:33:12 +0300 From: Andriy Gapon User-Agent: Thunderbird 2.0.0.21 (X11/20090406) MIME-Version: 1.0 To: freebsd-current@freebsd.org References: <4A23D5A4.6020009@icyb.net.ua> In-Reply-To: <4A23D5A4.6020009@icyb.net.ua> X-Enigmail-Version: 0.95.7 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: Re: fsck_y_enable: use -C X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Jun 2009 15:33:16 -0000 on 01/06/2009 16:20 Andriy Gapon said the following: > What about the following patch? > I believe that the idea behind fsck_y_enable is to try to make unattended systems > with rw filesystems as recoverable as possible at the cost of potential damage to > the data. The new "-C" option should not interfere with this goal, but should > reduce recovery time, because currently fsck -y checks *all* filesystems from > fstab, even those that are ro or clean: > > -C Check if the “clean” flag is set in the superblock and skip file > system checks if file system was properly dismounted and marked > clean. > One potential issue that I've just thought of is that fsck_msdosfs doesn't seem to support this option (even in a dummy way), so it would be a problem for those who have msdos filesystems in fstab and also have fsck_y_enable. > diff --git a/etc/rc.d/fsck b/etc/rc.d/fsck > index bf51089..c0cb359 100755 > --- a/etc/rc.d/fsck > +++ b/etc/rc.d/fsck > @@ -45,7 +45,7 @@ fsck_start() > 8) > if checkyesno fsck_y_enable; then > echo "File system preen failed, trying fsck -y." > - fsck -y > + fsck -y -C > case $? in > 0) > ;; > -- Andriy Gapon