On Wed, Mar 14, 2012 at 03:26:36PM -0500, Chandra Seetharaman wrote:
> >From 0ed09750a12c6265861415bdb431c14f8eb02437 Mon Sep 17 00:00:00 2001
> From: Chandra Seetharaman <sekharan@xxxxxxxxxx>
> Date: Wed, 14 Mar 2012 14:17:47 -0500
> Subject: [PATCH 2/4] Add project quota changes to all the places where group
> quota field
> is used.
>
> No externally visible changed and no superblock changes, yet.
Looks like this patch does a few things:
* add separate project quota members into various structures
* split project quota and group quotas so that instead of overriding
the group quota members incore, the new project quota members are
used instead
* get rid of usage of the OQUOTA flag incore, in favor of separate group
and project quota flags.
* add a project dquot argument to various functions.
> Signed-off-by: Chandra Seetharaman <sekharan@xxxxxxxxxx>
...
> @@ -1593,9 +1662,23 @@ xfs_qm_init_quotainos(
> return XFS_ERROR(error);
> }
> }
> + if (XFS_IS_PQUOTA_ON(mp) && pip == NULL) {
> + error = xfs_qm_qino_alloc(mp, &pip,
> + sbflags | XFS_SB_GQUOTINO,
^^^^
So... you're still using the group quota inode at this point.
> + flags | XFS_QMOPT_PQUOTA);
> + if (error) {
> + if (uip)
> + IRELE(uip);
> + if (gip)
> + IRELE(gip);
> +
> + return XFS_ERROR(error);
> + }
> + }
...
> @@ -342,9 +354,12 @@ xfs_trans_apply_dquot_deltas(
>
> ASSERT(tp->t_dqinfo);
> qa = tp->t_dqinfo->dqa_usrdquots;
> - for (j = 0; j < 2; j++) {
> + for (j = 0; j < 3; j++) { /* 0 - usr, 1 - grp, 2 - prj */
> if (qa[0].qt_dquot == NULL) {
^^^^^^^^^^^^^^^^^^^^^^
That really looks weird to me. Can you explain what is going on there?
> - qa = tp->t_dqinfo->dqa_grpdquots;
> + if (qa == tp->t_dqinfo->dqa_usrdquots)
> + qa = tp->t_dqinfo->dqa_grpdquots;
> + else
> + qa = tp->t_dqinfo->dqa_prjdquots;
> continue;
|