From owner-freebsd-hackers@FreeBSD.ORG Mon Dec 19 18:40:31 2005 Return-Path: X-Original-To: freebsd-hackers@FreeBSD.org Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 20F9A16A424; Mon, 19 Dec 2005 18:40:31 +0000 (GMT) (envelope-from se@FreeBSD.org) Received: from frueh.atsec.com (frueh.atsec.com [217.110.13.170]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5E96B43D66; Mon, 19 Dec 2005 18:40:30 +0000 (GMT) (envelope-from se@FreeBSD.org) Received: from [10.2.2.88] (se-pad.koeln.atsec [10.2.2.88]) by frueh.atsec.com (omb_smtp 1.5.8) with ESMTP; Mon, 19 Dec 2005 19:37:07 +0100 (CET) Message-ID: <43A6FE8E.9010701@FreeBSD.org> Date: Mon, 19 Dec 2005 19:40:14 +0100 From: Stefan Esser User-Agent: Thunderbird 1.5 (Windows/20051025) MIME-Version: 1.0 To: Pawel Jakub Dawidek References: <20051217122006.GA2758@twelvegates.homeip.net> <20051217134258.GC1706@britannica.bec.de> <20051217171029.GB14214@twelvegates.homeip.net> <20051218015418.sf2ne6sckkss0oww@webmail.spamcop.net> <20051218151616.GA4782@britannica.bec.de> <20051218171001.GA84988@garage.freebsd.pl> In-Reply-To: <20051218171001.GA84988@garage.freebsd.pl> X-Enigmail-Version: 0.93.2.0 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@FreeBSD.org Subject: Re: accessing NetBSD filesystem X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Dec 2005 18:40:31 -0000 Pawel Jakub Dawidek schrieb: > On Sun, Dec 18, 2005 at 04:16:16PM +0100, joerg@britannica.bec.de wrote: > +> FFS v1 and v2 are both working. I'm using that everyday. The one part > +> which needs attention is soft updates: FreeBSD / DragonFly have it as > +> permanent flag, NetBSD as mount option. > > Interesting. In FreeBSD fsck(8) works differently for SU-enabled FS, so > having SU as a mount option won't be possible (if we want to protect our > users from a foot-shooting). > And because of the way SU works, it is possible to run background fsck, > as the only problems are unreferenced objects (inodes, blocks, etc.). No, I've been running with soft-updates as a mount option for years (starting a few months after it made it into the then -current). My patches were even accepted for later integration by Kirk McKusick after some discussion, but there was some resistance to integrate it at that time (wait for the next major release) and then because it had been a tunefs option for so long and the default had been set to "on" in sysinstall. I'm still convinced, that my solution is better than what we currently have, and that is the reason I keep on maintaining the patch on my local systems. There is no problem with fsck, since all the patch does is simulate the effect of a tunefs -n enable/disable immediately before a r/w mount of the partition. That means, that fsck sees the previous state of the softdep flag (no change of the current behaviour). Even if I mount a removable disk without soft-updates, which was not cleanly unmounted before and had soft-updates enable, fsck will see the soft-updates flag and treat the partition correctly. The next mount will set (but not necessarily change) the softdep flag in the superblock depending on the mount options in effect. That guarantees, that the drive will be correctly checked on a system without my patch, in case that should be required. My patch is without any risk and pre-dates the import of soft-updates to NetBSD (I never checked, whether they used my then long published diffs or implemented the softdep mount option themselves). I'd appreciate if my patch would be reviewed and possibly accepted for -current. It affects just a few lines of code (use the mount option instead of the flag found in the super block when mounting a drive r/w; ignore requests to turn off softdep for a drive mounted r/w). Regards, STefan