[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20120601160421.GA17402@amd1>
Date: Fri, 1 Jun 2012 11:04:21 -0500
From: Serge Hallyn <serge.hallyn@...onical.com>
To: Jan Kara <jack@...e.cz>
Cc: jeff.liu@...cle.com, tytso@....edu,
containers@...ts.linux-foundation.org, david@...morbit.com,
hch@...radead.org, bpm@....com, christopher.jones@...cle.com,
linux-fsdevel@...r.kernel.org, cgroups@...r.kernel.org, tm@....ma,
linux-ext4@...r.kernel.org, chris.mason@...cle.com,
tinguely@....com
Subject: Re: container disk quota
Quoting Jan Kara (jack@...e.cz):
> Hello,
>
> On Wed 30-05-12 22:58:54, jeff.liu@...cle.com wrote:
> > According to glauber's comments regarding container disk quota, it should be binded to mount
> > namespace rather than cgroup.
> >
> > Per my try out, it works just fine by combining with userland quota utilitly in this way.
> > However, they are something has to be done at user tools too IMHO.
> >
> > Currently, the patchset is in very initial phase, I'd like to post it early to seek more
> > feedbacks from you guys.
> >
> > Hopefully I can clarify my ideas clearly.
> So what I miss in this introductory email is some highlevel description
> like what is the desired functionality you try to implement and what is it
> good for. Looking at the examples below, it seems you want to be able to
> set quota limits for namespace-uid (and also namespace-gid???) pairs, am I
> right?
>
> If yes, then I would like to understand one thing: When writing to a
> file, used space is accounted to the owner of the file. Now how do we
> determine owning namespace? Do you implicitely assume that only processes
> from one namespace will be able to access the file?
>
> Honza
Not having looked closely at the original patchset, let me ask - is this
feature going to be a freebie with Eric's usernamespace patches?
There, a container can be started in its own user namespace. It's uid
1000 will be mapped to something like 1101000 on the host. So the actual
uid against who the quota is counted is 1101000. In another container,
uid 1000 will be mapped to 1201000, and again quota will be counted against
1201000.
Note that this won't work with bind mounts, as a file can only be owned
by one uid, be it 1000, 1101000, or 1201000. So for the quota to work
each container would need its own files. (Of course the underlying
metadata can be shared through whatever ways - btrfs, lvm snapshotting,
etc)
-serge
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists