From owner-cvs-src@FreeBSD.ORG Thu Apr 22 21:25:53 2004 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6C22716A4CE; Thu, 22 Apr 2004 21:25:53 -0700 (PDT) Received: from fledge.watson.org (fledge.watson.org [204.156.12.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id 14BD543D45; Thu, 22 Apr 2004 21:25:53 -0700 (PDT) (envelope-from robert@fledge.watson.org) Received: from fledge.watson.org (localhost [127.0.0.1]) by fledge.watson.org (8.12.11/8.12.11) with ESMTP id i3N4PZVb040726; Fri, 23 Apr 2004 00:25:35 -0400 (EDT) (envelope-from robert@fledge.watson.org) Received: from localhost (robert@localhost)i3N4PYAU040723; Fri, 23 Apr 2004 00:25:34 -0400 (EDT) (envelope-from robert@fledge.watson.org) Date: Fri, 23 Apr 2004 00:25:34 -0400 (EDT) From: Robert Watson X-Sender: robert@fledge.watson.org To: Thomas Moestl In-Reply-To: <20040422231910.GB709@timesink.dyndns.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: cvs-src@FreeBSD.org cc: src-committers@FreeBSD.org cc: Pawel Jakub Dawidek cc: cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/kern vfs_syscalls.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Apr 2004 04:25:53 -0000 On Fri, 23 Apr 2004, Thomas Moestl wrote: > Hmmm, I'm not sure, but wasn't the real bug to use the struct mount * > that vn_start_write() returns instead of nd.ni_vp->v_mount (or at least, > not using nd.ni_vp->v_mount if mp turns out to be NULL)? extattrctl() > chooses that way. It seems that file systems are not required to > implement VOP_GETWRITEMOUNT(), but could choose to implement > VFS_QUOTACTL() anyway (although IIRC there currently are none that > maintain this combination), so unconditionally returning EOPNOTSUPP > would be too strict. > > The only case where the mount point of the vnode and the mount point > returned by vn_start_write() should differ is when unionfs is involved; > in that case, the correct semantics of quotactl() is a bit doubtful, and > so unionfs does not support quotactl() at all; thus using the mount > point of the vnode should not break anything. FWIW, in Darwin, Apple has moved the majority of ufs_quota.c to a vfs_quota.c, which acts as a library of quota-related functions serving both UFS and HFS+. It's not impossible to imagine a similar arrangement in FreeBSD should we import HFS+ into the base system, or for other file systems as it proves necessary. A bit of cleanup is required to make the utility functions accept explicit ID arguments instead of inode pointers, etc, but it would be fairly straight forward. Robert N M Watson FreeBSD Core Team, TrustedBSD Projects robert@fledge.watson.org Senior Research Scientist, McAfee Research