Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 7 Feb 2008 22:00:04 GMT
From:      Jaakko Heinonen <jh@saunalahti.fi>
To:        freebsd-bugs@FreeBSD.org
Subject:   Re: kern/120319: fsck on read-only root fs upgrades it to read-write
Message-ID:  <200802072200.m17M04sj010370@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR kern/120319; it has been noted by GNATS.

From: Jaakko Heinonen <jh@saunalahti.fi>
To: Yar Tikhiy <yar@comp.chem.msu.su>
Cc: bug-followup@FreeBSD.org
Subject: Re: kern/120319: fsck on read-only root fs upgrades it to
	read-write
Date: Thu, 7 Feb 2008 23:53:23 +0200

 On 2008-02-07, Yar Tikhiy wrote:
 > > This happens because the kernel doesn't set the "ro" mount option
 > > initially for mounts in vfs_mountroot_try() (vfs_mount.c). ffs_mount()
 > > remounts a file system as read-write if the "ro" option is missing.
 > 
 > You've hit the nail on the head!  Now the question is: Which of the
 > two functions should be fixed after all?  Some parts of the system
 > seem to rely solely on MNT_RDONLY to get a read-only mount, so it
 > might be wrong for ffs_mount() to look for the "ro" option even if
 > MNT_RDONLY is set in the mount flags.  Any ideas?
 
 Seems that msdosfs, ext2fs, nfs and zfs also rely on "ro" on remount. So
 changing ffs_mount() means changes for other file systems too to keep
 their behavior identical. For me the vfs_mountroot_try() approach seems
 logical because that unifies behavior of mount(8) and
 vfs_mountroot_try().
 
 -- 
 Jaakko



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200802072200.m17M04sj010370>