From: Donald Douwsma <donaldd@sgi.com>
To: Utako Kusaka <utako@tnes.nec.co.jp>
Cc: xfs@oss.sgi.com
Subject: Re: [PATCH] repquota does't report correct space usage
Date: Fri, 02 Mar 2007 10:26:48 +1100 [thread overview]
Message-ID: <45E76138.2020202@sgi.com> (raw)
In-Reply-To: <200702280733.AA05017@TNESG9305.tnes.nec.co.jp>
Utako Kusaka wrote:
> Hi,
>
> repquota may report incorrect space usage when the filesystem is mounted
> repeatedly with different quota options.
> The cause of the problem is that xfs_qm_quotacheck() is not called because
> the `CHKD' flag in mp->m_qflags is not cleared until it is mounted with
> no quota option. This patch fixes it.
Good find, I've heard of some problems with quota 'corruption' that may
actually be caused by this.
> --- linux-2.6.20-orgn/fs/xfs/quota/xfs_qm.c.orgn 2007-02-22 17:30:07.000000000 +0900
> +++ linux-2.6.20/fs/xfs/xfs_qm.c 2007-02-22 17:30:58.000000000 +0900
> @@ -1175,8 +1175,6 @@ 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);
> -
> /*
> * We try to get the limits from the superuser's limits fields.
> * This is quite hacky, but it is standard quota practice.
This disables the optimization that skips the quota check for the normal case where mount
options have not been changed.
I don't have any quota check performance figures handy but I don't think we can loose this
optimization for people with large filesystems/machines.
I think instead we need to clear the individual quota bit when a filesystem is mounted
without a particular quota type. This will force a quota check but only when the filesystem
is again mounted with that quota type.
Donald
next prev parent reply other threads:[~2007-03-01 23:27 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 [this message]
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
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=45E76138.2020202@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox