From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dmitry Monakhov Subject: Re: [PATCH 4/4] quota: add generic subtree quota support Date: Tue, 16 Feb 2010 11:56:44 +0300 Message-ID: <877hqdv9rn.fsf@openvz.org> References: <1266298312-25885-1-git-send-email-dmonakhov@openvz.org> <1266298312-25885-2-git-send-email-dmonakhov@openvz.org> <1266298312-25885-3-git-send-email-dmonakhov@openvz.org> <1266298312-25885-4-git-send-email-dmonakhov@openvz.org> <1266298312-25885-5-git-send-email-dmonakhov@openvz.org> <20100216081426.GA2622@infradead.org> <87d405vb7r.fsf@openvz.org> <20100216082850.GA14821@infradead.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: linux-fsdevel@vger.kernel.org, jack@suse.cz To: Christoph Hellwig Return-path: Received: from mail-bw0-f213.google.com ([209.85.218.213]:52939 "EHLO mail-bw0-f213.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756274Ab0BPI4s (ORCPT ); Tue, 16 Feb 2010 03:56:48 -0500 Received: by bwz5 with SMTP id 5so1706073bwz.1 for ; Tue, 16 Feb 2010 00:56:47 -0800 (PST) In-Reply-To: <20100216082850.GA14821@infradead.org> (Christoph Hellwig's message of "Tue, 16 Feb 2010 03:28:50 -0500") Sender: linux-fsdevel-owner@vger.kernel.org List-ID: Christoph Hellwig writes: > On Tue, Feb 16, 2010 at 11:25:28AM +0300, Dmitry Monakhov wrote: >> But this is not "project quota". Project quota is XFS feature. >> This patch aimed to give an opportunity to implement fs-specific >> quota_id mapping, and XFS is just an one of possible usecases. > > What you desribe as subtree quota is exactly a slightly limited > implementation of project quotas. And yes, fs-specific quota interfaces what do you mean by "slightly limited" ? I dont now xfs project-id feature very well. I cant find good explanation of this feature(except man pages). Can you please post main design assumptions. > are a horribly bad idea. If you add features add them in generic code > and make them opt-in for a specific filesystem to support. Please read following thread. http://marc.info/?l=linux-ext4&m=126563931215496&w=2 It will be good idea to implement this in generic vfs layer. Today i'll plan to post patches which introduce genetic subtree support on vfs layer. In fact i use get_id in order to support second-level quota feature *Second-level quota* In order to isolate user/group quota in one subtree from other subtree we have to remap quota id similar to: quota_uid = (subtree_id << 32) | uid; > > And yes, fs-specific quota interfaces are an utter nightmare, speaking > as the person fixing all this crap up right now. I've prepare patches against ext4 because: - i do know something about it internals - it has journalled quota support. But off course it will be brilliant to have this feature in VFS layer. > > ---end quoted text---