From owner-freebsd-current Wed Nov 27 11:46:58 2002 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 D6A2737B401 for ; Wed, 27 Nov 2002 11:46:56 -0800 (PST) Received: from fledge.watson.org (fledge.watson.org [204.156.12.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id 170D543E88 for ; Wed, 27 Nov 2002 11:46:56 -0800 (PST) (envelope-from robert@fledge.watson.org) Received: from fledge.watson.org (fledge.pr.watson.org [192.0.2.3]) by fledge.watson.org (8.12.6/8.12.5) with SMTP id gARJbGBF055516; Wed, 27 Nov 2002 14:37:27 -0500 (EST) (envelope-from robert@fledge.watson.org) Date: Wed, 27 Nov 2002 14:37:16 -0500 (EST) From: Robert Watson X-Sender: robert@fledge.watson.org To: Bruce Evans Cc: bsdc@xtremedev.com, Hiten Pandya , current@FreeBSD.ORG Subject: Re: ACLs on the boot partition? In-Reply-To: <20021128060920.N9287-100000@gamplex.bde.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Thu, 28 Nov 2002, Bruce Evans wrote: > On Wed, 27 Nov 2002, Robert Watson wrote: > > > On Wed, 27 Nov 2002, Bruce Evans wrote: > > > > > On Tue, 26 Nov 2002, Robert Watson wrote: > > > > > > > tunefs changes the flag for the next mount, so doesn't take immediate > > > > effect. Once you've tunefs'd a read-only file system, you need to unmount > > > > and remount it -- for the file system root, this generally means > > > > rebooting. Just to confirm: you're running with GENERIC, or with a kernel > > > > > > Er, what is the mount(..., MNT_RELOAD ...) in tunefs for then? > > > > The problem is that some flags can't be changed via MNT_RELOAD and require > > a from-scratch mount. I'm hoping that with nmount(), we can get a little > > more expressive regarding what changes are (and aren't) allowed to flags. > > Right now there's some uncomfortable masking. > > Why can't they be changed? All the other tunefs flags except FS_ACLS > and FS_MULTILABEL are related to writing, so ffs_reload() has to support > them changing as a side effect of supporting transitions from read-only > to read-write mode. Switching ACLs to support a change shouldn't be a problem, although I'd generally discourage changing the ACLs flag very much, since you don't want inconsistent access control and other side effects of using ACLs inconsistently (they get out of sync, etc). Multilabel can't be changed because of cache coherency issues: we cache label data in the vnode, and changing the origin of the label data (what MNT_MULTILABEL effectively does) would invalidate the contents of the cache. To correct that, we'd have to support immediately (and atomically) walking the entire vnode list and re-loading and validating the labels, something that we don't currently do. There are some bugs in the UFS1 extended attribute implementation relating to the remount issue, actually -- in particular, the EA backing files for UFS1 are opened read-write, and UFS blocks an upgrade from read-only to read-write if they are read rather than read-only. We need to force a re-open of the backing files and make the flags passed to open/close match that. I suspect the quota code must already have that behavior. Robert N M Watson FreeBSD Core Team, TrustedBSD Projects robert@fledge.watson.org Network Associates Laboratories To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message