linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jan Kara <jack@suse.cz>
To: Dmitry Monakhov <dmonakhov@openvz.org>
Cc: linux-fsdevel@vger.kernel.org, jack@suse.cz, hch@infradead.org
Subject: Re: [PATCH 0/4] quota: RFC add extend quota type v2
Date: Tue, 16 Feb 2010 22:13:26 +0100	[thread overview]
Message-ID: <20100216211325.GH3153@quack.suse.cz> (raw)
In-Reply-To: <1266298312-25885-1-git-send-email-dmonakhov@openvz.org>

On Tue 16-02-10 08:31:48, Dmitry Monakhov wrote:
> Currently only USER/GROUP quota are supported bu linux quota
> But sometimes it is reasonable to have other types of quota
> For example:
> 1) project_id in XFS
> 2) container_id in container(chroot) solutions.
> This patch series is aimed to extend quota interface to support
> different quota types. Last patch add the SUBTREE quota type.
> This patch series does not contain fs-related part of
> subtree-quota-type support. This is because generic subtree
> support is relatively independent from quota part.
> And in fact patches depends on two different devel trees
> linux-fs.2.6 and ext4.git. So i've divided big subtree patchset
> in to generic fs-related and quota-related parts.
> 
> First tree patches performs necessary cleanup work, And
> the last one extends quota to support new quota's type.
> 
> Changes from v1:
>  - fixes suggested by Jan Kara
>  - redesign get_id() callback. Initially i've overlooked a quota transfer
>    case. We have to pass new id's array to get_id() and it will return
>    corresponding quota id. 
>  - fix hard-coded values in dquot_initialize()
  Dmitry, I like the first two patches now so I've merged those. About the
other two: I was thinking about what you and Christoph wrote. My conclusion
was that maybe you are trying to mix two different features into one.
  If I understand it right, one of your requirements is that you want to
limit the amount of space some subtree (container in your case) uses. This
is exactly what XFS project quota does.
  Another requirement which I see as a different feature is that you
want a separate accounting of quotas for each user / group in each
container. And your intention is to implement this feature by remapping
uid to (tree_id << 32 | uid) for quota purposes. Right?
  The trouble with your uid / gid mapping is that you would need 64-bit
ids but kernel-userspace interface (quotactl) takes just a 32-bit value.
So you cannot use this interface for getting and setting quota limits.
At least not in the obvious way.
  Also I think having tree_id explicitely separated from uid / gid might
make things clearer. We would store it in dquot, compare it in dqget and
quota formats that are able to handle tree_ids (none currently ;) would
decide how to store all the information.

								Honza
-- 
Jan Kara <jack@suse.cz>
SUSE Labs, CR

      parent reply	other threads:[~2010-02-16 21:13 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-16  5:31 [PATCH 0/4] quota: RFC add extend quota type v2 Dmitry Monakhov
2010-02-16  5:31 ` [PATCH 1/4] quota: sb_quota state flags cleanup Dmitry Monakhov
2010-02-16  5:31   ` [PATCH 2/4] quota: generalize quota transfer interface Dmitry Monakhov
2010-02-16  5:31     ` [PATCH 3/4] introduce get_id callback Dmitry Monakhov
2010-02-16  5:31       ` [PATCH 4/4] quota: add generic subtree quota support Dmitry Monakhov
2010-02-16  8:14         ` Christoph Hellwig
2010-02-16  8:25           ` Dmitry Monakhov
2010-02-16  8:28             ` Christoph Hellwig
2010-02-16  8:56               ` Dmitry Monakhov
2010-02-16  9:03                 ` Christoph Hellwig
2010-02-16 21:13 ` Jan Kara [this message]

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=20100216211325.GH3153@quack.suse.cz \
    --to=jack@suse.cz \
    --cc=dmonakhov@openvz.org \
    --cc=hch@infradead.org \
    --cc=linux-fsdevel@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).