linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dave Chinner <david-FqsqvQoI3Ljby3iVrkZq2A@public.gmane.org>
To: "Eric W. Biederman" <ebiederm-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org>
Cc: Alex Elder <elder-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	Linux Containers
	<containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org>,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Ben Myers <bpm-sJ/iWh9BUns@public.gmane.org>,
	linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH review 10/16] xfs: Push struct kqid into xfs_qm_scall_qmlim and xfs_qm_scall_getquota
Date: Tue, 19 Feb 2013 13:27:07 +1100	[thread overview]
Message-ID: <20130219022707.GL26694@dastard> (raw)
In-Reply-To: <1361149870-27732-10-git-send-email-ebiederm-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org>

On Sun, Feb 17, 2013 at 05:11:03PM -0800, Eric W. Biederman wrote:
> From: "Eric W. Biederman" <ebiederm-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org>
> 
> - In xfs_qm_scall_getquota map the quota id into the callers
>   user namespace in the returned struct fs_disk_quota
> 
> - Add a helper is_superquota and use it in xfs_qm_scall_setqlimi
>   to see if we are setting the superusers quota limit.  Setting
>   the superuses quota limit on xfs sets the default quota limits
>   for all users.

These seem fine.

> - Move xfs_quota_type into xfs_qm_syscalls.c where it is now used.

Now that I've seen the code, I really don't see any advantage to
driving the kqid into XFS quota subsystem. (i.e the rest of this
patch and the subsequent follow up patches that drive it further
inward).

I did say previously:

>> From there, targetted patches can drive the kernel structures
>> inward from the entry points where it makes sense to do so (e.g.
>> common places that the quota entry points call that take a
>> type/id pair).  The last thing that should happen is internal
>> structures be converted from type/id pairs to the kernel types if
>> it makes sense to do so and it makes the code simpler and easier
>> to read....

But seeing the result, IMO, it doesn't actually improve the code
(it's neither simpler nor easier to read), and it doesn't actually
add any functionality. It makes the code strange and different and
somewhat inconsistent and litters id/namespace conversions all over
the place, so i don't think these cahgnes are necessary.

Hence I'd say just do absolute minimum needed for the
is_superquota() checks to work and leave all the kqid ->
xfs_dqid_t+type conversion at the boundary of the quota subsystem
where it already is....

Cheers,

Dave.
-- 
Dave Chinner
david-FqsqvQoI3Ljby3iVrkZq2A@public.gmane.org

  parent reply	other threads:[~2013-02-19  2:27 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-18  1:04 [PATCH review 00/16] userns: Completion of kuid/kgid/kprojid pushdown Eric W. Biederman
     [not found] ` <87txpaph4n.fsf-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org>
2013-02-18  1:10   ` [PATCH review 01/16] xfs: Convert uids and gids in xfs acls to/from kuids and kgids Eric W. Biederman
     [not found]     ` <1361149870-27732-1-git-send-email-ebiederm-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org>
2013-02-18  1:10       ` [PATCH review 02/16] xfs: Store projectid as a single variable Eric W. Biederman
2013-02-19  0:36         ` Dave Chinner
2013-02-18  1:10       ` [PATCH review 03/16] xfs: Always read uids and gids from the vfs inode Eric W. Biederman
     [not found]         ` <1361149870-27732-3-git-send-email-ebiederm-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org>
2013-02-19  1:14           ` Dave Chinner
2013-02-18  1:10       ` [PATCH review 04/16] xfs: Update inode uids, gids, and projids to be kuids, kgids, and kprojids Eric W. Biederman
2013-02-18  1:10       ` [PATCH review 05/16] xfs: Update xfs_ioctl_setattr to handle projids in any user namespace Eric W. Biederman
     [not found]         ` <1361149870-27732-5-git-send-email-ebiederm-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org>
2013-02-19  1:55           ` Dave Chinner
2013-07-29  7:17             ` Gao feng
2013-07-29  7:51               ` Dave Chinner
2013-07-30  3:15                 ` Gao feng
     [not found]                   ` <51F72FE6.4080202-BthXqXjhjHXQFUHtdCDX3A@public.gmane.org>
2013-07-30  3:57                     ` Dave Chinner
2013-07-30  4:04                       ` Gao feng
2013-02-18  1:10       ` [PATCH review 06/16] xfs: Use kuids and kgids in xfs_setattr_nonsize Eric W. Biederman
2013-02-18  1:11       ` [PATCH review 07/16] xfs: Update ioctl(XFS_IOC_FREE_EOFBLOCKS) to handle callers in any userspace Eric W. Biederman
     [not found]         ` <1361149870-27732-7-git-send-email-ebiederm-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org>
2013-02-19  1:48           ` Dave Chinner
2013-02-18  1:11       ` [PATCH review 11/16] xfs: Modify xfs_qm_dqget to take a struct kqid Eric W. Biederman
2013-02-18  1:11       ` [PATCH review 13/16] xfs: Use q_id instead of q_core.d_id Eric W. Biederman
2013-02-18  1:11       ` [PATCH review 14/16] xfs: Enable building with user namespaces enabled Eric W. Biederman
2013-02-18  1:11     ` [PATCH review 08/16] xfs: Use kprojids when allocating inodes Eric W. Biederman
     [not found]       ` <1361149870-27732-8-git-send-email-ebiederm-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org>
2013-02-19  1:31         ` Dave Chinner
2013-02-18  1:11     ` [PATCH review 09/16] xfs: Modify xfs_qm_vop_dqalloc to take kuids, kgids, and kprojids Eric W. Biederman
     [not found]       ` <1361149870-27732-9-git-send-email-ebiederm-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org>
2013-02-19  1:57         ` Dave Chinner
2013-02-18  1:11     ` [PATCH review 10/16] xfs: Push struct kqid into xfs_qm_scall_qmlim and xfs_qm_scall_getquota Eric W. Biederman
     [not found]       ` <1361149870-27732-10-git-send-email-ebiederm-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org>
2013-02-19  2:27         ` Dave Chinner [this message]
2013-02-18  1:11     ` [PATCH review 12/16] xfs: Remember the kqid for a quota Eric W. Biederman
2013-02-18  1:11     ` [PATCH review 15/16] userns: Now that everything has been converted remove the unnecessary infrastructure Eric W. Biederman
2013-02-18  1:11     ` [PATCH review 16/16] userns: Remove the EXPERMINTAL kconfig tag Eric W. Biederman

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=20130219022707.GL26694@dastard \
    --to=david-fqsqvqoi3ljby3ivrkzq2a@public.gmane.org \
    --cc=bpm-sJ/iWh9BUns@public.gmane.org \
    --cc=containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \
    --cc=ebiederm-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org \
    --cc=elder-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=linux-fsdevel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.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).