Subject: Re: Ufs quota update
To: None <tech-kern@netbsd.org>
From: Bill Stouder-Studenmund <wrstuden@netbsd.org>
List: tech-kern
Date: 07/05/2007 10:53:00
--rS8CxjVDS/+yyDmU
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Thu, Jul 05, 2007 at 12:37:18PM +0200, Juergen Hannken-Illjes wrote:
> The attached diff is my first shot on migrating `struct dquot' and its
> supporting functions from `sys/ufs/ufs/quota.h' to `sys/ufs/ufs/ufs_quota=
.c'.
>=20
> 1) Move `struct dquot' with supporting defines.
>=20
> 2) Make all internal functions `static'.
>=20
> 3) Clean up declarations in `quota.h' and `ufs_extern.h'.  `quota.h' now
>    has the description of quota criterions, on-disk structure, user-kernel
>    interface and declaration of init/done functions.
>    All ufs quota related function prototypes go to ``ufs_extern.h'.
>=20
> 4) Init/done of the quota fields of `struct inode' go to two new functions
>    ufsquota_init() and ufsquota_free().
>=20
> There is no functional change from 1) - 4).
>=20
> 5) Function ufs_chown() was manipulating the quota fields of `struct inod=
e'
>    in a strange way.  I changed it to work more like Solaris does by
>    trying to change the uid/gid and restore quota on error.  Instead
>    of explicitly releasing quota fields for changed ids I changed
>    chkdq() and chkiq() to reload the quota fields for changed ids.  While
>    there I removed the explicit getinoquota() and made it implicit to
>    chkdq() and chkiq().
>=20
> Comments?

In general, great!

My one concern is that you seem to have removed quota handling from=20
ufs_access. I'm not fully sure what it was doing, and thus I'm not fully=20
sure if it's safe to remove.

Take care,

Bill

--rS8CxjVDS/+yyDmU
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (NetBSD)

iD8DBQFGjS/8Wz+3JHUci9cRAqiIAJ9u2QWHvBP+FxTBW06JV8likzZAfwCeKiKs
hWHyehj7/1W8UCyqiHBnEro=
=ovi7
-----END PGP SIGNATURE-----

--rS8CxjVDS/+yyDmU--