linux-xfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Darrick J. Wong" <darrick.wong@oracle.com>
To: "dbyin(尹烨)" <dbyin@tencent.com>
Cc: "linux-xfs@vger.kernel.org" <linux-xfs@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] fs/xfs: fix f_ffree value for statfs when project quota is set
Date: Thu, 22 Nov 2018 09:58:01 -0800	[thread overview]
Message-ID: <20181122175801.GV6792@magnolia> (raw)
In-Reply-To: <6EC51EE77FA0264BB8DAD779E0C341C9014BD77C91@EXMBX-SZMAIL003.tencent.com>

On Thu, Nov 22, 2018 at 01:28:04PM +0000, dbyin(尹烨) wrote:
> When project is set, we should use inode limit minus the used count
> 
> Signed-off-by: Ye Yin <dbyin@tencent.com>

This makes sense to me, but ... it's been broken like this since 2006.
Is there a reason why (someone named Glen) wrote it this way?

Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>

--D

> ---
>  fs/xfs/xfs_qm_bhv.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fs/xfs/xfs_qm_bhv.c b/fs/xfs/xfs_qm_bhv.c
> index 73a1d77ec187..3091e4bc04ef 100644
> --- a/fs/xfs/xfs_qm_bhv.c
> +++ b/fs/xfs/xfs_qm_bhv.c
> @@ -40,7 +40,7 @@ xfs_fill_statvfs_from_dquot(
>                 statp->f_files = limit;
>                 statp->f_ffree =
>                         (statp->f_files > dqp->q_res_icount) ?
> -                        (statp->f_ffree - dqp->q_res_icount) : 0;
> +                        (statp->f_files - dqp->q_res_icount) : 0;
>         }
>  }
>  
> -- 
> 2.16.2

  reply	other threads:[~2018-11-23  4:39 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-22 13:28 [PATCH] fs/xfs: fix f_ffree value for statfs when project quota is set dbyin(尹烨)
2018-11-22 17:58 ` Darrick J. Wong [this message]
2018-11-23  2:10   ` 答复: [PATCH] fs/xfs: fix f_ffree value for statfs when project quota is set(Internet mail) dbyin(尹烨)

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=20181122175801.GV6792@magnolia \
    --to=darrick.wong@oracle.com \
    --cc=dbyin@tencent.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-xfs@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).