From owner-freebsd-bugs@FreeBSD.ORG Thu Feb 7 15:00:08 2008 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9D6C116A418 for ; Thu, 7 Feb 2008 15:00:08 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 83EC013C465 for ; Thu, 7 Feb 2008 15:00:08 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m17F08d0075397 for ; Thu, 7 Feb 2008 15:00:08 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m17F08jm075396; Thu, 7 Feb 2008 15:00:08 GMT (envelope-from gnats) Date: Thu, 7 Feb 2008 15:00:08 GMT Message-Id: <200802071500.m17F08jm075396@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org From: Yar Tikhiy Cc: Subject: Re: kern/120319: fsck on read-only root fs upgrades it to read-write X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Yar Tikhiy List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Feb 2008 15:00:08 -0000 The following reply was made to PR kern/120319; it has been noted by GNATS. From: Yar Tikhiy To: Jaakko Heinonen 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 17:58:51 +0300 On Thu, Feb 07, 2008 at 12:19:48PM +0200, Jaakko Heinonen 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. > > Following patch adds the "ro" option for initial root mounts. It should > fix the problem. Could you verify that? 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? Thanks! -- Yar