Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 11 Jul 2017 11:55:45 -0700
From:      Ravi Pokala <rpokala@mac.com>
To:        Edward Napierala <trasz@freebsd.org>
Cc:        "src-committers@freebsd.org" <src-committers@freebsd.org>, "svn-src-all@freebsd.org" <svn-src-all@freebsd.org>, "svn-src-head@freebsd.org" <svn-src-head@freebsd.org>
Subject:   Re: svn commit: r320892 - head/etc/defaults
Message-ID:  <CA1BE9ED-6345-468C-B34A-AB8A1E86DFD7@panasas.com>
In-Reply-To: <CAFLM3-oRR=XnMaePvTMm=-wcbcNLGB=3%2Bk0J32ymZHRyhMm2ug@mail.gmail.com>
References:  <201707111232.v6BCWeXu073060@repo.freebsd.org> <B06C8477-9B07-4EC5-A929-2BDEA9C7311C@panasas.com> <CAFLM3-oRR=XnMaePvTMm=-wcbcNLGB=3%2Bk0J32ymZHRyhMm2ug@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
So the answer is "magic!" ;-)

Fair enough; I'll RTFSource if I'm still sufficiently curious tomorrow. :-)

Thanks again,

Ravi (rpokala@)

-----Original Message-----
From: <owner-src-committers@freebsd.org> on behalf of Edward Napierala <trasz@freebsd.org>
Date: 2017-07-11, Tuesday at 11:46
To: Ravi Pokala <rpokala@mac.com>
Cc: "src-committers@freebsd.org" <src-committers@freebsd.org>, "svn-src-all@freebsd.org" <svn-src-all@freebsd.org>, "svn-src-head@freebsd.org" <svn-src-head@freebsd.org>
Subject: Re: svn commit: r320892 - head/etc/defaults

Well, fsck(8) is a bit weird.
Assuming you don't have /dev/md0 in your fstab(5):

[trasz@v2:~]% fsck -d -t ffs -T ufs:-R /dev/md0
start (null) wait fsck_ffs /dev/md0
[trasz@v2:~]% fsck -d -t ufs -T ufs:-R /dev/md0

start (null) wait fsck_ufs -R /dev/md0

However (/ is defined as ufs in my fstab(5)):

[trasz@v2:~]% fsck -d -t ffs -T ufs:-R /       
start / wait fsck_ufs -R /dev/ada0s1a
[trasz@v2:~]% fsck -d -t ufs -T ufs:-R /
start / wait fsck_ufs -R /dev/ada0s1a




2017-07-11 16:21 GMT+01:00 Ravi Pokala <rpokala@mac.com>:

I appreciate the spirit of this change; thanks Trasz!

A question though: you're telling the generic `fsck' to pass "-R" to either `fsck_ffs' or `fsck_ufs', as needed. But those are both names for the same executable. Won't the generic `fsck' always end up invoking (per sbin/fsck/fsck.c::ptype_map[]) `fsck_ffs'? In which case, is the `fsck_ufs' case needed here?

Thanks,

Ravi (rpokala@)

-----Original Message-----
From: <owner-src-committers@freebsd.org> on behalf of Edward Tomasz Napierala <trasz@FreeBSD.org>
Date: 2017-07-11, Tuesday at 05:32
To: <src-committers@freebsd.org>, <svn-src-all@freebsd.org>, <svn-src-head@freebsd.org>
Subject: svn commit: r320892 - head/etc/defaults

Author: trasz
Date: Tue Jul 11 12:32:40 2017
New Revision: 320892
URL: https://svnweb.freebsd.org/changeset/base/320892

Log:
  Make fsck_y_enable default to passing pass -R to fsck_ffs(8) in addition
  to -y.  To me, fsck_y_enable means "try as hard as possible", and without
  -R, it... well, doesn't.

  Reviewed by:  mckusick
  Obtained from:        CheriBSD
  MFC after:    2 weeks
  Sponsored by: DARPA, AFRL
  Differential Revision:        https://reviews.freebsd.org/D11490

Modified:
  head/etc/defaults/rc.conf

Modified: head/etc/defaults/rc.conf
==============================================================================
--- head/etc/defaults/rc.conf   Tue Jul 11 06:39:12 2017        (r320891)
+++ head/etc/defaults/rc.conf   Tue Jul 11 12:32:40 2017        (r320892)
@@ -92,7 +92,7 @@ geli_autodetach="YES" # Automatically detach on last c
 root_rw_mount="YES"    # Set to NO to inhibit remounting root read-write.
 root_hold_delay="30"   # Time to wait for root mount hold release.
 fsck_y_enable="NO"     # Set to YES to do fsck -y if the initial preen fails.
-fsck_y_flags=""                # Additional flags for fsck -y
+fsck_y_flags="-T ffs:-R -T ufs:-R"     # Additional flags for fsck -y
 background_fsck="YES"  # Attempt to run fsck in the background where possible.
 background_fsck_delay="60" # Time to wait (seconds) before starting the fsck.
 netfs_types="nfs:NFS smbfs:SMB" # Net filesystems.
















Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CA1BE9ED-6345-468C-B34A-AB8A1E86DFD7>