linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dmitry Monakhov <dmonakhov@openvz.org>
To: Al Viro <viro@ZenIV.linux.org.uk>
Cc: linux-fsdevel@vger.kernel.org
Subject: Re: [RFC] vfs generic subtree support
Date: Tue, 16 Feb 2010 18:00:32 +0300	[thread overview]
Message-ID: <87hbphns33.fsf@openvz.org> (raw)
In-Reply-To: <20100216142154.GE30031@ZenIV.linux.org.uk> (Al Viro's message of "Tue, 16 Feb 2010 14:21:54 +0000")

Al Viro <viro@ZenIV.linux.org.uk> writes:

> On Tue, Feb 16, 2010 at 05:01:36PM +0300, Dmitry Monakhov wrote:
>
>> Let's call it "metagroup" id. If you know better (more descriptive) word
>> for this purpose i please make your suggestion.
>> 
>> - Such metagroup may be assigned to inode. And this id is stored on
>>   inode.
>> - It may be inherent from parent, if corresponding flag is set 
>>   on parent dir.
- if inherent flag is not set, then inherent metagroup id
  from mnt_root 
>> - metagroup id may be used by generic quota.
>
> I would probably like to see example with fewer "may" and more details ;-)
> Seriously, what kind of rules and uses for it do you have in mind?  More
> specific example would be nice...
Use-cases:
*Assing maximum disc space consumption for some hierarchy *

  1) Create chroot environment
    # tar  xf chroot_env.tar /var/xxx/chroot
  2) Assign some metagroup id to the chroot content (via not yet
     existent ./metagroup cmd-tool)
    # find /var/xxx/chroot  | xargs ./metagroup --set 1000

  3) Setup quota limits
    # quota-set --type metagroup --blk_soft=1024M blk_hard=1024M /var

  4) Export this tree (it may be more complex)
    # mount /var/xxx/chroot /mnt/chroot -obound

  5)Now we may use this /mnt/chroot as:
    5A) A regular chroot envirement, user is unable to exceed metagroup
        quota, regardless to real available space on /var/
    5B) As a container's (namespace) root. 
    5C) export this /mnt/chroot to nfs server and nfs client can not
        overcome given metagroup quota limit. 

  reply	other threads:[~2010-02-16 15:00 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-16 10:52 [RFC] vfs generic subtree support Dmitry Monakhov
2010-02-16 12:20 ` Al Viro
2010-02-16 12:37   ` Dmitry Monakhov
2010-02-16 13:38     ` Al Viro
2010-02-16 14:01       ` Dmitry Monakhov
2010-02-16 14:21         ` Al Viro
2010-02-16 15:00           ` Dmitry Monakhov [this message]
2010-02-16 15:12             ` Matthew Wilcox
2010-02-16 15:32               ` Dmitry Monakhov
2010-02-16 19:25                 ` J. Bruce Fields
2010-02-16 19:32                   ` Christoph Hellwig
2010-02-16 19:39                     ` J. Bruce Fields

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=87hbphns33.fsf@openvz.org \
    --to=dmonakhov@openvz.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=viro@ZenIV.linux.org.uk \
    /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;
as well as URLs for NNTP newsgroup(s).