From owner-svn-src-all@FreeBSD.ORG Wed Oct 21 14:40:22 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 834541065670; Wed, 21 Oct 2009 14:40:22 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail07.syd.optusnet.com.au (mail07.syd.optusnet.com.au [211.29.132.188]) by mx1.freebsd.org (Postfix) with ESMTP id 1A62F8FC0A; Wed, 21 Oct 2009 14:40:21 +0000 (UTC) Received: from c122-106-156-249.carlnfd1.nsw.optusnet.com.au (c122-106-156-249.carlnfd1.nsw.optusnet.com.au [122.106.156.249]) by mail07.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id n9LEdbCd002651 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 22 Oct 2009 01:39:39 +1100 Date: Thu, 22 Oct 2009 01:39:37 +1100 (EST) From: Bruce Evans X-X-Sender: bde@delplex.bde.org To: Bruce Evans In-Reply-To: <20091022005227.A12866@delplex.bde.org> Message-ID: <20091022012525.D12905@delplex.bde.org> References: <200910211015.n9LAFQwY094532@svn.freebsd.org> <20091021222805.I12783@delplex.bde.org> <7E425E81-2ACC-46F8-B864-169CDBFBB03B@elvandar.org> <20091022005227.A12866@delplex.bde.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@freebsd.org, Remko Lodder , Remko Lodder , src-committers@freebsd.org, svn-src-all@freebsd.org Subject: Re: svn commit: r198316 - head/sbin/tunefs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Oct 2009 14:40:22 -0000 On Thu, 22 Oct 2009, Bruce Evans wrote: > ... > NetBSD's 2005 version says: > > % BUGS > % This program should work on mounted and active file systems. Because > the > % super-block is not kept in the buffer cache, the changes will only > take > % effect if the program is run on unmounted file systems. To change the > % root file system, the system must be rebooted after the file system is > % tuned. > > "mounted and active" is as unclear as "active". The rotted words about > rebooting seem to have come from here -- I just noticed that they are > very recent additions to FreeBSD's tunefs.8. They were added in 2007 > 8 years after they stopped applying. Bah, they aren't evem wrong like > that: allthough they are identical to NetBSD, they have a completely > different meaning. In NetBSD they are related to the buffer cache as > dsecribed above, but in FreeBSD they are a special case for soft updates, > as described only in their log message. It takes a full mount to get the ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > soft updates flag looked at, so the remount done by tunefs doesn't work ^^^^^^^^^^^^^^^^^^^^^^^^^^^ > for changes to the soft updates flag. Actually, ffs_mount(...MNT_UPDATE...) looks at it and seems to partly work. I tried it with the file system mounted r/o (had to MNT_UPDATE from r/w to r/o to run tunefs to test this). Then MNT_UPDATE from tunefs didn't give a soft update mount and didn't clear my async mount flag according to mount(1), but a subsequent MNT_UPDATE to r/w did (after manually clearing the async flag for safety). Soft updates then didn't cause any problems (didn't test enough to see if it really worked). Then turning of the soft updates flag using tunefs (after MNT_UPDATE to r/o) didn't get rid of the soft updates mount after various remounts. I think the off->on transition of the soft updates flag is only seen accidentally by some paths through ffs_mount(...MNT_UPDATE...) and this transition should be avoided for all MNT_UPDATEs for safety, so tunefs asking MNT_UPDATE to see it is dangerous. Bruce