tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: the bouyer-quota2 branch

On Mon, Mar 07, 2011 at 09:37:43AM +0000, David Holland wrote:
> On Sat, Feb 19, 2011 at 11:21:35PM +0100, Manuel Bouyer wrote:
>  > I think the code in the bouyer-quota2 branch is stable now, and
>  > ready to be merged to HEAD. Unless objections, I'll merge it in
>  > about 2 weeks.
>  > [...]
> So, I thought one of the points of this was to make the quota
> interface fs-independent, but as it seems to have come out all the
> pieces and definitions are still in sys/ufs/ufs, and so far at least I
> really do not see where to slice to have quota support in a non-ufs
> filesystem.
> Can you explain how this is supposed to be done? And can we move the
> fs-independent and vfs-level declarations to sys/quota.h and add
> kern/vfs_quota.c for the fs-independent code?

This is one of the things I'm not completely happy with, but it's only
a matter of where struct definitions lives, and how to avoid duplicate
structures and utility functions.

struct quota2_entry (and so struct quota2_val) is used for both on-disk
storage, and in-memory representation in tools and kernel.
I agree this should be split; with an extra level of conversion
(between in-memory and on-disk representation). The issue is struct quota2_val:
I don't see any reason to have a different structure for on-disk and
in-memory represenation at this level. It seems wrong to me to have
2 identical structures with different names in 2 headers, and a convertion
function which would just be a memcpy(). on the other hand, using
a structure from sys/quota.h for on-disk metadata format also looks wrong,
because it's then not obvious it is part of some on-disk format.
This is where I was stuck. If anyone has an idea on how to cleanly fix this
issue, please speack up !

Manuel Bouyer <>
     NetBSD: 26 ans d'experience feront toujours la difference

Home | Main Index | Thread Index | Old Index