public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Brian Foster <bfoster@redhat.com>
To: Namjae Jeon <namjae.jeon@samsung.com>
Cc: xfs@oss.sgi.com
Subject: Re: [PATCH v2] xfs: remove XFS_TRANS_RESERVE in collapse range
Date: Tue, 13 May 2014 07:29:31 -0400	[thread overview]
Message-ID: <20140513112930.GA53546@bfoster.bfoster> (raw)
In-Reply-To: <000f01cf6e3e$d4a0a800$7de1f800$@samsung.com>

On Tue, May 13, 2014 at 09:03:55AM +0900, Namjae Jeon wrote:
> There is no need to dip into reserve pool. Reserve pool is used for much
> more important things. And xfs_trans_reserve will never return ENOSPC
> because punch hole is already done. If we get ENOSPC, collapse range
> will be simply failed.
> 
> Cc: Brian Foster <bfoster@redhat.com>
> Signed-off-by: Namjae Jeon <namjae.jeon@samsung.com>
> Signed-off-by: Ashish Sangwan <a.sangwan@samsung.com>
> ---

Looks good, thanks Namjae!

Reviewed-by: Brian Foster <bfoster@redhat.com>

>  fs/xfs/xfs_bmap_util.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/fs/xfs/xfs_bmap_util.c b/fs/xfs/xfs_bmap_util.c
> index 296160b..057f671 100644
> --- a/fs/xfs/xfs_bmap_util.c
> +++ b/fs/xfs/xfs_bmap_util.c
> @@ -1519,7 +1519,6 @@ xfs_collapse_file_space(
>  
>  	while (!error && !done) {
>  		tp = xfs_trans_alloc(mp, XFS_TRANS_DIOSTRAT);
> -		tp->t_flags |= XFS_TRANS_RESERVE;
>  		/*
>  		 * We would need to reserve permanent block for transaction.
>  		 * This will come into picture when after shifting extent into
> @@ -1529,7 +1528,6 @@ xfs_collapse_file_space(
>  		error = xfs_trans_reserve(tp, &M_RES(mp)->tr_write,
>  				XFS_DIOSTRAT_SPACE_RES(mp, 0), 0);
>  		if (error) {
> -			ASSERT(error == ENOSPC || XFS_FORCED_SHUTDOWN(mp));
>  			xfs_trans_cancel(tp, 0);
>  			break;
>  		}
> -- 
> 1.7.11-rc0
> 
> _______________________________________________
> xfs mailing list
> xfs@oss.sgi.com
> http://oss.sgi.com/mailman/listinfo/xfs

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

      reply	other threads:[~2014-05-13 11:29 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-13  0:03 [PATCH v2] xfs: remove XFS_TRANS_RESERVE in collapse range Namjae Jeon
2014-05-13 11:29 ` Brian Foster [this message]

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=20140513112930.GA53546@bfoster.bfoster \
    --to=bfoster@redhat.com \
    --cc=namjae.jeon@samsung.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox