From owner-freebsd-current@FreeBSD.ORG Wed Dec 15 10:46:22 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1C67A16A4CE; Wed, 15 Dec 2004 10:46:22 +0000 (GMT) Received: from critter.freebsd.dk (critter.freebsd.dk [212.242.86.163]) by mx1.FreeBSD.org (Postfix) with ESMTP id 71D5243D46; Wed, 15 Dec 2004 10:46:21 +0000 (GMT) (envelope-from phk@critter.freebsd.dk) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.13.1/8.13.1) with ESMTP id iBFAkIVu043575; Wed, 15 Dec 2004 11:46:18 +0100 (CET) (envelope-from phk@critter.freebsd.dk) To: Ruslan Ermilov From: "Poul-Henning Kamp" In-Reply-To: Your message of "Wed, 15 Dec 2004 11:59:01 +0200." <20041215095901.GK25967@ip.net.ua> Date: Wed, 15 Dec 2004 11:46:18 +0100 Message-ID: <43574.1103107578@critter.freebsd.dk> Sender: phk@critter.freebsd.dk cc: current@FreeBSD.org Subject: Re: Background fsck is broken X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 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: Wed, 15 Dec 2004 10:46:22 -0000 In message <20041215095901.GK25967@ip.net.ua>, Ruslan Ermilov writes: > >--KjSGHOmKKB2VUiQn >Content-Type: text/plain; charset=us-ascii >Content-Disposition: inline >Content-Transfer-Encoding: quoted-printable > >Hi, > >Here's another fsck(8) buglet. While booting single-user, / is >mounted read-only, and "fsck -p /" succeeds as expected. While >remounting / read-only (e.g., after shutting down from multi-user >to single-user), it doesn't: This is working as designed. The way it works is that when you boot, the root filesystem opens the device (r=1, w=0, e=0) thereby permitting fsck to open the device for write. When the root filesystem is upgraded to RW, the open is opgraded to (r=1,w=1,e=1) and writing via /dev/mumble is no longer permitted. Architecturally the way we fsck the root filesystem is highly bogus and it would be much cleaner if mounted filesystems _always_ were fsck'ed through a snapshot, but there are a unknown code to be written to allow that to happen for the case where "unexpected softupdates inconsistencies" are found. -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence.