Re: [PATCH] userns: Add basic quota support v2

2012-08-28 Thread Jan Kara
On Tue 28-08-12 10:34:04, Eric W. Biederman wrote: > Jan Kara writes: > >> + return -EINVAL; > >> + ret = sb->s_qcop->get_dqblk(sb, qown, &fdq); > >>if (ret) > >>return ret; > >>copy_to_if_dqblk(&idq, &fdq); > > ... > >> +static inline u32 from_qown(struct user_namesp

Re: [PATCH] userns: Add basic quota support v2

2012-08-28 Thread Eric W. Biederman
Jan Kara writes: > On Mon 27-08-12 17:12:16, Eric W. Biederman wrote: >> Add the data type struct qown which holds the owning identifier of a >> quota. struct qown is a replacement for the implicit union of uid, >> gid and project stored in an unsigned int and the quota type field >> that is wa

Re: [PATCH] userns: Add basic quota support v2

2012-08-28 Thread Boaz Harrosh
On 08/28/2012 12:05 PM, Jan Kara wrote: >> +static inline u32 from_qown(struct user_namespace *user_ns, struct qown >> qown) >> +{ >> +switch (qown.type) { >> +case USRQUOTA: >> +return from_kuid(user_ns, qown.uid); >> +case GRPQUOTA: >> +return from_kgid(user_

Re: [PATCH] userns: Add basic quota support v2

2012-08-28 Thread Jan Kara
On Mon 27-08-12 17:12:16, Eric W. Biederman wrote: > Add the data type struct qown which holds the owning identifier of a > quota. struct qown is a replacement for the implicit union of uid, > gid and project stored in an unsigned int and the quota type field > that is was used in the quota data

[PATCH] userns: Add basic quota support v2

2012-08-27 Thread Eric W. Biederman
Add the data type struct qown which holds the owning identifier of a quota. struct qown is a replacement for the implicit union of uid, gid and project stored in an unsigned int and the quota type field that is was used in the quota data structures. Making the data type explicit allows the kuid_