From: Donald Douwsma <donaldd@sgi.com>
To: Utako Kusaka <utako@tnes.nec.co.jp>
Cc: xfs@oss.sgi.com
Subject: Re: [PATCH] repquota doesn't report correct space usage #2
Date: Mon, 05 Mar 2007 17:17:55 +1100 [thread overview]
Message-ID: <45EBB613.5040803@sgi.com> (raw)
In-Reply-To: <200703020634.AA05027@TNESG9305.tnes.nec.co.jp>
Hi Utako,
That's closer to what I was thinking of but I'd prefer to do the
manipulation separate to init. Putting it in xfs_qm_mount_quotas()
minimizes the number of places changes are made to the superblock.
We dont need to worry about group/project differences as a
quotacheck is forced by XFS_QM_NEED_QUOTACHECK() if there are
incompatibilities.
Signed-off-by: Donald Douwsma <donaldd@sgi.com>
--- a/fs/xfs/quota/xfs_qm.c 2007-03-05 16:50:11.000000000 +1100
+++ b/fs/xfs/quota/xfs_qm.c 2007-03-05 15:36:12.000000000 +1100
@@ -388,6 +388,17 @@ xfs_qm_mount_quotas(
return XFS_ERROR(error);
}
}
+ /*
+ * If one type of quotas is off, then it will lose its
+ * quotachecked status, since we won't be doing accounting for
+ * that type anymore.
+ */
+ if (!XFS_IS_UQUOTA_ON(mp)) {
+ mp->m_qflags &= ~XFS_UQUOTA_CHKD;
+ }
+ if (!(XFS_IS_GQUOTA_ON(mp) || XFS_IS_PQUOTA_ON(mp))) {
+ mp->m_qflags &= ~XFS_OQUOTA_CHKD;
+ }
write_changes:
/*
Utako Kusaka wrote:
> Hi,
>
> This new patch skips the quota check when the filesystem is mounted
> with the same quota option.
>
> Signed-off-by: Utako Kusaka <utako@tnes.nec.co.jp>
> ---
>
> --- fs/xfs/quota/xfs_qm.c.orgn 2007-02-22 17:30:07.000000000 +0900
> +++ fs/xfs/quota/xfs_qm.c 2007-03-02 15:01:44.000000000 +0900
> @@ -1175,7 +1175,12 @@ xfs_qm_init_quotainfo(
> qinf->qi_dqperchunk = BBTOB(qinf->qi_dqchunklen);
> do_div(qinf->qi_dqperchunk, sizeof(xfs_dqblk_t));
>
> - mp->m_qflags |= (mp->m_sb.sb_qflags & XFS_ALL_QUOTA_CHKD);
> + if (XFS_IS_UQUOTA_ON(mp) && (mp->m_sb.sb_qflags & XFS_UQUOTA_ACCT))
> + mp->m_qflags |= (mp->m_sb.sb_qflags & XFS_UQUOTA_CHKD);
> + if (XFS_IS_GQUOTA_ON(mp) && (mp->m_sb.sb_qflags & XFS_GQUOTA_ACCT))
> + mp->m_qflags |= (mp->m_sb.sb_qflags & XFS_OQUOTA_CHKD);
> + if (XFS_IS_PQUOTA_ON(mp) && (mp->m_sb.sb_qflags & XFS_PQUOTA_ACCT))
> + mp->m_qflags |= (mp->m_sb.sb_qflags & XFS_OQUOTA_CHKD);
>
> /*
> * We try to get the limits from the superuser's limits fields.
next prev parent reply other threads:[~2007-03-05 6:18 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-02-28 7:33 [PATCH] repquota does't report correct space usage Utako Kusaka
2007-03-01 23:26 ` Donald Douwsma
2007-03-02 2:59 ` Utako Kusaka
2007-03-02 6:34 ` [PATCH] repquota doesn't report correct space usage #2 Utako Kusaka
2007-03-05 6:17 ` Donald Douwsma [this message]
2007-03-05 8:36 ` Utako Kusaka
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=45EBB613.5040803@sgi.com \
--to=donaldd@sgi.com \
--cc=utako@tnes.nec.co.jp \
--cc=xfs@oss.sgi.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.