* [PATCH v4 0/4] quota: add project quota support
@ 2014-09-24 12:23 Li Xi
0 siblings, 0 replies; 6+ messages in thread
From: Li Xi @ 2014-09-24 12:23 UTC (permalink / raw)
To: linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Ext4 Developers List, linux-api-u79uwXL29TY76Z2rM5mHXA,
Theodore Ts'o, Andreas Dilger, Jan Kara,
viro-RmSDqhL/yNMiFSDQTTA3OLVCufUGDwFn@public.gmane.org,
hch-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org, Dmitry Monakhov
The following patches propose an implementation of project quota
support for ext4. A project is an aggregate of unrelated inodes
which might scatter in different directories. Inodes belongs to a
project possesses a same identification i.e. 'project ID', just
like every inode has its user/group identification. The following
patches adds project quota as supplement to the former uer/group
quota types.
The semantics of ext4 project quota is consistent with XFS. Each
directory can have EXT4_INODE_PROJINHERIT flag set. When the
EXT4_INODE_PROJINHERIT flag of a parent directory is not set, a
newly created inode under that directory will have a default project
ID (i.e. 0). And its EXT4_INODE_PROJINHERIT flag is not set either.
When this flag is set on a directory, following rules will be kept:
1) The newly created inode under that directory will inherit both
the EXT4_INODE_PROJINHERIT flag and the project ID from its parent
directory.
2) Hard-linking a inode with different project ID into that directory
will fail with errno EXDEV.
3) Renaming a inode with different project ID into that directory
will fail with errno EXDEV. However, 'mv' command will detect this
failure and copy the renamed inode to a new inode in the directory.
Thus, this new inode will inherit both the project ID and
EXT4_INODE_PROJINHERIT flag.
4) If the project quota of that ID is being enforced, statfs() on
that directory will take the quotas as another upper limits along
with the capacity of the file system, i.e. the total block/inode
number will be the minimum of the quota limits and file system
capacity.
Changelog:
* v4 <- v3:
- Do not check project feature when set/get project ID;
- Use EXT4_MAXQUOTAS instead of MAXQUOTAS in ext4 patches;
- Remove unnecessary change of fs/quota/dquot.c;
- Remove CONFIG_QUOTA_PROJECT.
* v3 <- v2:
- Add EXT4_INODE_PROJINHERIT semantics.
* v2 <- v1:
- Add ioctl interface for setting/getting project;
- Add EXT4_FEATURE_RO_COMPAT_PROJECT;
- Add get_projid() method in struct dquot_operations;
- Add error check of ext4_inode_projid_set/get().
v3: http://www.spinics.net/lists/linux-ext4/msg45184.html
v2: http://www.spinics.net/lists/linux-ext4/msg44695.html
v1: http://article.gmane.org/gmane.comp.file-systems.ext4/45153
Any comments or feedbacks are appreciated.
Regards,
- Li Xi
Li Xi(4):
quota: Adds general codes to enforces project quota limits
ext4: Adds project ID support for ext4
ext4: Adds project quota support for ext4
ext4: Adds ioctl interface support for ext4 project
Documentation/filesystems/ext4.txt | 4 +
fs/ext4/ext4.h | 31 +++++++--
fs/ext4/ialloc.c | 6 ++
fs/ext4/inode.c | 29 ++++++++-
fs/ext4/ioctl.c | 85 ++++++++++++++++++++++++
fs/ext4/namei.c | 10 +++
fs/ext4/super.c | 124 ++++++++++++++++++++++++++++++++---
fs/quota/dquot.c | 16 ++++-
fs/quota/quota.c | 5 +-
fs/quota/quotaio_v2.h | 6 +-
include/linux/quota.h | 2 +
include/uapi/linux/quota.h | 6 +-
12 files changed, 299 insertions(+), 25 deletions(-)
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v4 0/4] quota: add project quota support
[not found] <CAPTn0cDFCj7AWjQpOF0brD82XJSSeem5_1aQCE=zQKiaLaeL1g@mail.gmail.com>
@ 2014-09-24 12:52 ` Jan Kara
[not found] ` <20140924125206.GA26916-+0h/O2h83AeN3ZZ/Hiejyg@public.gmane.org>
0 siblings, 1 reply; 6+ messages in thread
From: Jan Kara @ 2014-09-24 12:52 UTC (permalink / raw)
To: Li Xi
Cc: linux-fsdevel@vger.kernel.org, Ext4 Developers List, linux-api,
Theodore Ts'o, Andreas Dilger, Jan Kara,
viro@zeniv.linux.org.uk, hch@infradead.org, Dmitry Monakhov
On Wed 24-09-14 20:14:35, Li Xi wrote:
> The following patches propose an implementation of project quota
> support for ext4. A project is an aggregate of unrelated inodes
> which might scatter in different directories. Inodes belongs to a
> project possesses a same identification i.e. 'project ID', just
> like every inode has its user/group identification. The following
> patches adds project quota as supplement to the former uer/group
> quota types.
>
> The semantics of ext4 project quota is consistent with XFS. Each
> directory can have EXT4_INODE_PROJINHERIT flag set. When the
> EXT4_INODE_PROJINHERIT flag of a parent directory is not set, a
> newly created inode under that directory will have a default project
> ID (i.e. 0). And its EXT4_INODE_PROJINHERIT flag is not set either.
> When this flag is set on a directory, following rules will be kept:
>
> 1) The newly created inode under that directory will inherit both
> the EXT4_INODE_PROJINHERIT flag and the project ID from its parent
> directory.
>
> 2) Hard-linking a inode with different project ID into that directory
> will fail with errno EXDEV.
>
> 3) Renaming a inode with different project ID into that directory
> will fail with errno EXDEV. However, 'mv' command will detect this
> failure and copy the renamed inode to a new inode in the directory.
> Thus, this new inode will inherit both the project ID and
> EXT4_INODE_PROJINHERIT flag.
>
> 4) If the project quota of that ID is being enforced, statfs() on
> that directory will take the quotas as another upper limits along
> with the capacity of the file system, i.e. the total block/inode
> number will be the minimum of the quota limits and file system
> capacity.
>
> Changelog:
> * v4 <- v3:
> - Do not check project feature when set/get project ID;
> - Use EXT4_MAXQUOTAS instead of MAXQUOTAS in ext4 patches;
> - Remove unnecessary change of fs/quota/dquot.c;
> - Remove CONFIG_QUOTA_PROJECT.
> * v3 <- v2:
> - Add EXT4_INODE_PROJINHERIT semantics.
> * v2 <- v1:
> - Add ioctl interface for setting/getting project;
> - Add EXT4_FEATURE_RO_COMPAT_PROJECT;
> - Add get_projid() method in struct dquot_operations;
> - Add error check of ext4_inode_projid_set/get().
>
> v3: http://www.spinics.net/lists/linux-ext4/msg45184.html
> v2: http://www.spinics.net/lists/linux-ext4/msg44695.html
> v1: http://article.gmane.org/gmane.comp.file-systems.ext4/45153
>
> Any comments or feedbacks are appreciated.
Whitespace got mangled in your patches so much they are hardly readable.
Please resend them so that it is properly preserved. I'm not sure how other
guys using gmail do this so you might need to ask them... Thanks!
Honza
--
Jan Kara <jack@suse.cz>
SUSE Labs, CR
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v4 0/4] quota: add project quota support
[not found] ` <20140924125206.GA26916-+0h/O2h83AeN3ZZ/Hiejyg@public.gmane.org>
@ 2014-09-24 15:42 ` Theodore Ts'o
[not found] ` <20140924154239.GA11342-AKGzg7BKzIDYtjvyW6yDsg@public.gmane.org>
0 siblings, 1 reply; 6+ messages in thread
From: Theodore Ts'o @ 2014-09-24 15:42 UTC (permalink / raw)
To: Jan Kara
Cc: Li Xi, linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Ext4 Developers List, linux-api-u79uwXL29TY76Z2rM5mHXA,
Andreas Dilger,
viro-RmSDqhL/yNMiFSDQTTA3OLVCufUGDwFn@public.gmane.org,
hch-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org, Dmitry Monakhov
On Wed, Sep 24, 2014 at 02:52:06PM +0200, Jan Kara wrote:
> Whitespace got mangled in your patches so much they are hardly readable.
> Please resend them so that it is properly preserved. I'm not sure how other
> guys using gmail do this so you might need to ask them... Thanks!
And it would be nice if they are chained together so that people with
proper mail-threading readers can easily find all of your patches.
Probably the best way to do this is to configure your a local mail
transfer agent on your Linux desktop/laptop, and configure it to use
smart mail-router with authenticated SMTP to:
Host: smtp.gmail.com
Port: 465
Authentication: Yes
Username: #YOU#@gmail.com
Password: #YOUR_PASSWORD#
Security: SSL
Then use "git send-email" to post your patches, and it should all be
good.
(I'm guessing your cutting and pasting your patches into the mail send
window, and that unfortunately tends not to work well.)
Cheers,
- Ted
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v4 0/4] quota: add project quota support
[not found] ` <20140924154239.GA11342-AKGzg7BKzIDYtjvyW6yDsg@public.gmane.org>
@ 2014-09-24 22:27 ` Nikitas Angelinas
[not found] ` <20140924222752.GA23810-xH2D3wQCr9zOfED8G0uUrv5vdDvN9gHfAL8bYrjMMd8@public.gmane.org>
2014-09-24 23:41 ` Li Xi
1 sibling, 1 reply; 6+ messages in thread
From: Nikitas Angelinas @ 2014-09-24 22:27 UTC (permalink / raw)
To: Li Xi
Cc: Jan Kara, linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Ext4 Developers List, linux-api-u79uwXL29TY76Z2rM5mHXA,
Andreas Dilger,
viro-RmSDqhL/yNMiFSDQTTA3OLVCufUGDwFn@public.gmane.org,
hch-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org, Dmitry Monakhov
On Wed, Sep 24, 2014 at 11:42:39AM -0400, Theodore Ts'o wrote:
> On Wed, Sep 24, 2014 at 02:52:06PM +0200, Jan Kara wrote:
> > Whitespace got mangled in your patches so much they are hardly readable.
> > Please resend them so that it is properly preserved. I'm not sure how other
> > guys using gmail do this so you might need to ask them... Thanks!
>
> And it would be nice if they are chained together so that people with
> proper mail-threading readers can easily find all of your patches.
>
> Probably the best way to do this is to configure your a local mail
> transfer agent on your Linux desktop/laptop, and configure it to use
> smart mail-router with authenticated SMTP to:
>
> Host: smtp.gmail.com
> Port: 465
> Authentication: Yes
> Username: #YOU#@gmail.com
> Password: #YOUR_PASSWORD#
> Security: SSL
>
> Then use "git send-email" to post your patches, and it should all be
> good.
>
> (I'm guessing your cutting and pasting your patches into the mail send
> window, and that unfortunately tends not to work well.)
>
> Cheers,
>
> - Ted
> --
> To unsubscribe from this list: send the line "unsubscribe linux-api" in
> the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
Li Xi,
You can set up Mutt (likely Alpine, maybe others) to work with GMail, if
you want to; I believe it handles whitespace and patch series well by
default. There are relevant resources online to assist with the
configuration, if you need them. It also includes an SMTP feature, if you
want to make use of it.
Cheers,
Nikitas
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v4 0/4] quota: add project quota support
[not found] ` <20140924154239.GA11342-AKGzg7BKzIDYtjvyW6yDsg@public.gmane.org>
2014-09-24 22:27 ` Nikitas Angelinas
@ 2014-09-24 23:41 ` Li Xi
1 sibling, 0 replies; 6+ messages in thread
From: Li Xi @ 2014-09-24 23:41 UTC (permalink / raw)
To: Theodore Ts'o
Cc: Jan Kara, linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Ext4 Developers List, linux-api-u79uwXL29TY76Z2rM5mHXA,
Andreas Dilger,
viro-RmSDqhL/yNMiFSDQTTA3OLVCufUGDwFn@public.gmane.org,
hch-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org, Dmitry Monakhov
On Wed, Sep 24, 2014 at 11:42 PM, Theodore Ts'o <tytso-3s7WtUTddSA@public.gmane.org> wrote:
> On Wed, Sep 24, 2014 at 02:52:06PM +0200, Jan Kara wrote:
>> Whitespace got mangled in your patches so much they are hardly readable.
>> Please resend them so that it is properly preserved. I'm not sure how other
>> guys using gmail do this so you might need to ask them... Thanks!
>
> And it would be nice if they are chained together so that people with
> proper mail-threading readers can easily find all of your patches.
>
> Probably the best way to do this is to configure your a local mail
> transfer agent on your Linux desktop/laptop, and configure it to use
> smart mail-router with authenticated SMTP to:
>
> Host: smtp.gmail.com
> Port: 465
> Authentication: Yes
> Username: #YOU#@gmail.com
> Password: #YOUR_PASSWORD#
> Security: SSL
>
> Then use "git send-email" to post your patches, and it should all be
> good.
>
> (I'm guessing your cutting and pasting your patches into the mail send
> window, and that unfortunately tends not to work well.)
Thank you very much for the help. And sorry for the mistakes I've made.
That is too many times even for a newbie. Hopefully, I won't make any
mistake with 'git send-email' in the next version. :)
Regards,
Li Xi
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v4 0/4] quota: add project quota support
[not found] ` <20140924222752.GA23810-xH2D3wQCr9zOfED8G0uUrv5vdDvN9gHfAL8bYrjMMd8@public.gmane.org>
@ 2014-09-24 23:42 ` Li Xi
0 siblings, 0 replies; 6+ messages in thread
From: Li Xi @ 2014-09-24 23:42 UTC (permalink / raw)
To: Nikitas Angelinas
Cc: Jan Kara, linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Ext4 Developers List, linux-api-u79uwXL29TY76Z2rM5mHXA,
Andreas Dilger,
viro-RmSDqhL/yNMiFSDQTTA3OLVCufUGDwFn@public.gmane.org,
hch-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org, Dmitry Monakhov
On Thu, Sep 25, 2014 at 6:27 AM, Nikitas Angelinas
<nikitasangelinas-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> On Wed, Sep 24, 2014 at 11:42:39AM -0400, Theodore Ts'o wrote:
>> On Wed, Sep 24, 2014 at 02:52:06PM +0200, Jan Kara wrote:
>> > Whitespace got mangled in your patches so much they are hardly readable.
>> > Please resend them so that it is properly preserved. I'm not sure how other
>> > guys using gmail do this so you might need to ask them... Thanks!
>>
>> And it would be nice if they are chained together so that people with
>> proper mail-threading readers can easily find all of your patches.
>>
>> Probably the best way to do this is to configure your a local mail
>> transfer agent on your Linux desktop/laptop, and configure it to use
>> smart mail-router with authenticated SMTP to:
>>
>> Host: smtp.gmail.com
>> Port: 465
>> Authentication: Yes
>> Username: #YOU#@gmail.com
>> Password: #YOUR_PASSWORD#
>> Security: SSL
>>
>> Then use "git send-email" to post your patches, and it should all be
>> good.
>>
>> (I'm guessing your cutting and pasting your patches into the mail send
>> window, and that unfortunately tends not to work well.)
>>
>> Cheers,
>>
>> - Ted
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-api" in
>> the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
>> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Li Xi,
>
>
> You can set up Mutt (likely Alpine, maybe others) to work with GMail, if
> you want to; I believe it handles whitespace and patch series well by
> default. There are relevant resources online to assist with the
> configuration, if you need them. It also includes an SMTP feature, if you
> want to make use of it.
Hi Nikitas,
Thank you! I will try that too.
Regards,
Li Xi
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2014-09-24 23:42 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <CAPTn0cDFCj7AWjQpOF0brD82XJSSeem5_1aQCE=zQKiaLaeL1g@mail.gmail.com>
2014-09-24 12:52 ` [PATCH v4 0/4] quota: add project quota support Jan Kara
[not found] ` <20140924125206.GA26916-+0h/O2h83AeN3ZZ/Hiejyg@public.gmane.org>
2014-09-24 15:42 ` Theodore Ts'o
[not found] ` <20140924154239.GA11342-AKGzg7BKzIDYtjvyW6yDsg@public.gmane.org>
2014-09-24 22:27 ` Nikitas Angelinas
[not found] ` <20140924222752.GA23810-xH2D3wQCr9zOfED8G0uUrv5vdDvN9gHfAL8bYrjMMd8@public.gmane.org>
2014-09-24 23:42 ` Li Xi
2014-09-24 23:41 ` Li Xi
2014-09-24 12:23 Li Xi
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).