From: Jan Kara <jack@suse.cz>
To: Pavel Emelyanov <xemul@openvz.org>
Cc: Andreas Dilger <adilger@sun.com>, Theodore Ts'o <tytso@mit.edu>,
Andrew Morton <akpm@linux-foundation.org>,
linux-ext4@vger.kernel.org,
Dmitri Monakhov <dmonakhov@openvz.org>
Subject: Re: [PATCH] A request to reserve a "tree id" field on ext[34] inodes
Date: Tue, 17 Nov 2009 18:12:26 +0100 [thread overview]
Message-ID: <20091117171226.GC1923@atrey.karlin.mff.cuni.cz> (raw)
In-Reply-To: <4B02AD8B.2030202@openvz.org>
Hi,
> We have a proposal to implement a 2-level disk quota on ext3 and ext4.
>
> In two words - the aim is to have directories on ext3/4 partitions
> which are limited by its disk usage and the number of inodes. Further
> the plan is to allow configuring uid and gid quotas within them.
If I understand it right, this is something like XFS's project quota,
right? Note that such thing has implications such as you have to forbid
hardlinks between different "quota trees", otherwise it just won't fly...
Also by 2-level, you mean it won't be possible to nest such subtrees?
I.e. have a quota on directories a/, b/, a/b, a/c?
> The main usage of this is containers. When two or more of them are
> located on one disk their roots will be marked with a unique tree id
> and thus the disk consumption of each container will be limited. While
> achieving this goal having an id of what tree an inode belongs to is
> a key requirement.
>
> So first we would like to ask to reserve a place on ext3 and ext4 inodes
> for that ID.
Do you really need to store tree ID on disk? I'd think that it should
be enough to keep some id / pointer in memory and initialize it when we
load inode into memory (from an id / pointer of parent directory). Then
it would be enough to store a fact that some directory is a root of
"quota tree" somewhere - either in extended attributes, as a flag in
the inode, or together with quota data.
Honza
--
Jan Kara <jack@suse.cz>
SuSE CR Labs
next prev parent reply other threads:[~2009-11-17 17:12 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-17 14:04 [PATCH] A request to reserve a "tree id" field on ext[34] inodes Pavel Emelyanov
2009-11-17 17:06 ` Andreas Dilger
2009-11-17 21:19 ` Dmitry Monakhov
2009-11-18 17:43 ` Dmitry Monakhov
2009-11-19 6:33 ` Andreas Dilger
2009-11-17 17:12 ` Jan Kara [this message]
2009-11-17 17:55 ` Pavel Emelyanov
2009-11-17 18:47 ` Jan Kara
2009-11-17 21:19 ` Dmitry Monakhov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20091117171226.GC1923@atrey.karlin.mff.cuni.cz \
--to=jack@suse.cz \
--cc=adilger@sun.com \
--cc=akpm@linux-foundation.org \
--cc=dmonakhov@openvz.org \
--cc=linux-ext4@vger.kernel.org \
--cc=tytso@mit.edu \
--cc=xemul@openvz.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox