Linux XFS filesystem development
 help / color / mirror / Atom feed
From: Dave Chinner <david@fromorbit.com>
To: xiakaixu1987@gmail.com
Cc: linux-xfs@vger.kernel.org, darrick.wong@oracle.com,
	Kaixu Xia <kaixuxia@tencent.com>
Subject: Re: [PATCH v2] xfs: check if reserved free disk blocks is needed
Date: Tue, 7 Apr 2020 16:38:58 +1000	[thread overview]
Message-ID: <20200407063858.GB24067@dread.disaster.area> (raw)
In-Reply-To: <1586225124-22430-1-git-send-email-kaixuxia@tencent.com>

On Tue, Apr 07, 2020 at 10:05:24AM +0800, xiakaixu1987@gmail.com wrote:
> From: Kaixu Xia <kaixuxia@tencent.com>
> 
> We share an inode between gquota and pquota with the older
> superblock that doesn't have separate pquotino, and for the
> need_alloc == false case we don't need to call xfs_dir_ialloc()
> function, so add the check if reserved free disk blocks is
> needed.
> 
> Signed-off-by: Kaixu Xia <kaixuxia@tencent.com>
> Reviewed-by: Brian Foster <bfoster@redhat.com>
> ---
> v2:
>  - improve the commit log.
> 
>  fs/xfs/xfs_qm.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/fs/xfs/xfs_qm.c b/fs/xfs/xfs_qm.c
> index 6678baa..b684b04 100644
> --- a/fs/xfs/xfs_qm.c
> +++ b/fs/xfs/xfs_qm.c
> @@ -780,7 +780,8 @@ struct xfs_qm_isolate {
>  	}
>  
>  	error = xfs_trans_alloc(mp, &M_RES(mp)->tr_create,
> -			XFS_QM_QINOCREATE_SPACE_RES(mp), 0, 0, &tp);
> +			need_alloc ? XFS_QM_QINOCREATE_SPACE_RES(mp) : 0,
> +			0, 0, &tp);

looks fine.

Reviewed-by: Dave Chinner <dchinner@redhat.com>
-- 
Dave Chinner
david@fromorbit.com

  reply	other threads:[~2020-04-07  6:39 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-07  2:05 [PATCH v2] xfs: check if reserved free disk blocks is needed xiakaixu1987
2020-04-07  6:38 ` Dave Chinner [this message]
2020-04-08 14:12 ` Eric Sandeen

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=20200407063858.GB24067@dread.disaster.area \
    --to=david@fromorbit.com \
    --cc=darrick.wong@oracle.com \
    --cc=kaixuxia@tencent.com \
    --cc=linux-xfs@vger.kernel.org \
    --cc=xiakaixu1987@gmail.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