Re: [PATCH review 10/16] xfs: Push struct kqid intoxfs_qm_scall_qmlim and xfs_qm_scall_getquota
From: Dave Chinner
Date: Mon Feb 18 2013 - 21:27:29 EST
On Sun, Feb 17, 2013 at 05:11:03PM -0800, Eric W. Biederman wrote:
> From: "Eric W. Biederman" <ebiederm@xxxxxxxxxxxx>
> - 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
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....
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/