From: Mark Tinguely <tinguely@sgi.com>
To: Mitsuo Hayasaka <mitsuo.hayasaka.hu@hitachi.com>
Cc: xfs@oss.sgi.com
Subject: Re: [PATCH -v2 1/3] xfs: change available ranges of softlimit and hardlimit in quota check
Date: Fri, 10 Feb 2012 14:37:03 -0600 [thread overview]
Message-ID: <4F357FEF.5080507@sgi.com> (raw)
In-Reply-To: <20120206125007.12624.58454.stgit@ltc219.sdl.hitachi.co.jp>
On 02/06/12 06:50, Mitsuo Hayasaka wrote:
> In general, quota allows us to use disk blocks and inodes up to each
> limit, that is, they are available if they don't exceed their limitations.
> Current xfs sets their available ranges to lower than them except disk
> inode quota check. So, this patch changes the ranges to not beyond them.
>
> Signed-off-by: Mitsuo Hayasaka<mitsuo.hayasaka.hu@hitachi.com>
> Cc: Ben Myers<bpm@sgi.com>
> Cc: Alex Elder<elder@kernel.org>
> Cc: Christoph Hellwig<hch@lst.de>
> ---
>
> fs/xfs/xfs_dquot.c | 24 ++++++++++++------------
> fs/xfs/xfs_log_recover.c | 6 +++---
> fs/xfs/xfs_qm_syscalls.c | 4 ++--
> fs/xfs/xfs_trans_dquot.c | 4 ++--
> 4 files changed, 19 insertions(+), 19 deletions(-)
>
> diff --git a/fs/xfs/xfs_dquot.c b/fs/xfs/xfs_dquot.c
> diff --git a/fs/xfs/xfs_qm_syscalls.c b/fs/xfs/xfs_qm_syscalls.c
> index eafbcff..711a86e 100644
> --- a/fs/xfs/xfs_qm_syscalls.c
> +++ b/fs/xfs/xfs_qm_syscalls.c
> @@ -813,11 +813,11 @@ xfs_qm_export_dquot(
> (XFS_IS_OQUOTA_ENFORCED(mp)&&
> (dst->d_flags& (FS_PROJ_QUOTA | FS_GROUP_QUOTA))))&&
> dst->d_id != 0) {
> - if (((int) dst->d_bcount>= (int) dst->d_blk_softlimit)&&
> + if (((int) dst->d_bcount> (int) dst->d_blk_softlimit)&&
> (dst->d_blk_softlimit> 0)) {
> ASSERT(dst->d_btimer != 0);
> }
> - if (((int) dst->d_icount>= (int) dst->d_ino_softlimit)&&
> + if (((int) dst->d_icount> (int) dst->d_ino_softlimit)&&
> (dst->d_ino_softlimit> 0)) {
> ASSERT(dst->d_itimer != 0);
> }
Good catch on the off by one page comparisons. I like the patch.
Question: I know this was like this before, but why is the 64 bit counts
and limits being casted into integers for these tests inside the DEBUG?
--Mark Tinguely
tinguely@sgi.com
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
next prev parent reply other threads:[~2012-02-10 20:37 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-06 12:49 [PATCH -v2 0/3] xfs: change available ranges in quota check Mitsuo Hayasaka
2012-02-06 12:49 ` Mitsuo Hayasaka
2012-02-06 12:50 ` [PATCH -v2 1/3] xfs: change available ranges of softlimit and hardlimit " Mitsuo Hayasaka
2012-02-06 12:50 ` Mitsuo Hayasaka
2012-02-10 20:37 ` Mark Tinguely [this message]
2012-02-17 14:01 ` Mark Tinguely
2012-02-15 2:32 ` Christoph Hellwig
2012-02-15 2:32 ` Christoph Hellwig
2012-02-06 12:50 ` [PATCH -v2 2/3] xfs: make inode quota check more general Mitsuo Hayasaka
2012-02-06 12:50 ` Mitsuo Hayasaka
2012-02-10 21:32 ` Mark Tinguely
2012-02-15 2:32 ` Christoph Hellwig
2012-02-15 2:32 ` Christoph Hellwig
2012-02-06 12:51 ` [PATCH -v2 3/3] xfs: cleanup quota check on disk blocks and inodes reservations Mitsuo Hayasaka
2012-02-06 12:51 ` Mitsuo Hayasaka
2012-02-10 22:23 ` Mark Tinguely
2012-02-15 2:33 ` Christoph Hellwig
2012-02-15 2:33 ` Christoph Hellwig
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=4F357FEF.5080507@sgi.com \
--to=tinguely@sgi.com \
--cc=mitsuo.hayasaka.hu@hitachi.com \
--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.