From owner-freebsd-arch@FreeBSD.ORG Mon Apr 23 23:25:43 2007 Return-Path: X-Original-To: arch@freebsd.org Delivered-To: freebsd-arch@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D84C416A404 for ; Mon, 23 Apr 2007 23:25:43 +0000 (UTC) (envelope-from howard0su@gmail.com) Received: from py-out-1112.google.com (py-out-1112.google.com [64.233.166.183]) by mx1.freebsd.org (Postfix) with ESMTP id 8646513C45D for ; Mon, 23 Apr 2007 23:25:43 +0000 (UTC) (envelope-from howard0su@gmail.com) Received: by py-out-1112.google.com with SMTP id f31so1398577pyh for ; Mon, 23 Apr 2007 16:25:43 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=q5R8TSubJLkmF0jABuKej9VCaCteRO+ei0lVaMMo+HFHStQcPdhgV53iueVwLK3RqJjWPWdpSrF5kr90/4dH854h2kbUCXL3ft1RtpEGePVu34cdHlOdrT1fRsFA41QxFjCJvesvEPCQJWPEfAWV3TXNRr+x1lPlJ9B1FDUS++I= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=P/iD+SXdOF03GNZ8duliP8Cp2et7Kf3BoaIW7g5N8LIFtgCdoGjlYp0g+YHA36Fugp5I4Ab87lhixgWHNjolhlCQmXis6K1VrJpqgJUgOX/vzQiXV8G5AIURl4OHvlX9Tf5KywcXaZpRw0rGal7GT6mvm5PdpZzNyvmOV/dbEEE= Received: by 10.35.111.14 with SMTP id o14mr11860868pym.1177370742902; Mon, 23 Apr 2007 16:25:42 -0700 (PDT) Received: by 10.35.54.15 with HTTP; Mon, 23 Apr 2007 16:25:42 -0700 (PDT) Message-ID: Date: Mon, 23 Apr 2007 16:25:42 -0700 From: "Howard Su" To: "Kostik Belousov" In-Reply-To: <20070423115042.GF2052@deviant.kiev.zoral.com.ua> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20070423115042.GF2052@deviant.kiev.zoral.com.ua> Cc: arch@freebsd.org, Pawel Jakub Dawidek Subject: Re: move audit/priviliage check into VFS X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Apr 2007 23:25:43 -0000 On 4/23/07, Kostik Belousov wrote: > On Sun, Apr 22, 2007 at 02:58:30PM -0700, Howard Su wrote: > Quota code (ufs/ufs/ufs_quota.c) is mostly filesystem-independent, it > only require particular format for the quota file, and several fields in > the ufs mount structure, as well as ufs mount interlock. The later could be > factored-out quite easily. > > On the other hand, only ufs is stuffed with hooks for the quota handling. I agree that current implementation is FS-depend. However in theory, nothing prevent you to store quota data in another FS even. We only need some API calls which expose through VFS like AllocateQuota, FreeQuota, CheckQuota. The storage part can be hide by VFS. Anyway, this is my dream. No prototyping prove it yet. > > > I would let others comment on the feasibility of factoring out permission > check code. > > What I want to point out is that some time ago UFS itself was considered > as layer with underlying implementation providing the actual structure > for the storage. At least two such implementations existed, FFS and > LFS. The LFS is long dead and removed from CVS. All that left from the > layering is several method pointers in struct ufsmount. I suspect that > current code has eroded the border between UFS and FFS. That said, I'm > not sure whether implementing tmpfs as some TMPFS under UFS layer is > possible now, but you may look at this. > Glad to know some old stuffs. Very helpful. -- -Howard