cvs commit: src/sbin/fsck_ffs main.c

Jaakko Heinonen jh at saunalahti.fi
Wed May 14 09:07:47 UTC 2008


Hi,

On 2008-04-04, Yar Tikhiy wrote:
> On Fri, Apr 04, 2008 at 01:50:58AM +0000, Craig Rodrigues wrote:
> > diff -u src/sbin/fsck_ffs/main.c:1.49 src/sbin/fsck_ffs/main.c:1.50
> > --- src/sbin/fsck_ffs/main.c:1.49     Wed Mar  5 08:25:49 2008
> > +++ src/sbin/fsck_ffs/main.c  Fri Apr  4 01:50:58 2008
> > @@ -541,6 +541,10 @@
> >               build_iovec(&iov, &iovlen, "errmsg", errmsg,
> >                   sizeof(errmsg));
> >               build_iovec(&iov, &iovlen, "update", NULL, 0);
>                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> As I've already pointed out, this line you also added is dangerous
> because it installs the string "update" to among the root mount
> point options, which may blow up later with more changes to the
> mount framework.  The option still needs to be spelled MNT_UPDATE
> and passed as a flag for now.

There's also a similar problem with "snapshot" mount option. See these
problem reports:

kern/122833
kern/118360

Problems are caused by the fact that "snapshot" mount option persist
after a nmount(2) call. "update" and "snapshot" shouldn't be permanent
mount options.

# mount -u -o snapshot /.snap/foo /
# mount -u -o atime /
mount: /dev/ad2s1a : Cross-device link
# mount -u -o nosnapshot /
# mount -u -o atime /
#

Oh, and the original bug still kind of exists:

(boot to single user mode)
# mount
/dev/ad2s1a on / (ufs, local, read-only)
devfs on /dev (devfs, local)
# mount -o noatime /
# mount
/dev/ad2s1a on / (ufs, local, noatime)
devfs on /dev (devfs, local)
#
(/ is now read-write)

-- 
Jaakko


More information about the cvs-src mailing list