All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dave Chinner <david@fromorbit.com>
To: "Darrick J. Wong" <djwong@kernel.org>
Cc: linux-xfs@vger.kernel.org, hch@lst.de, dchinner@redhat.com,
	christian.brauner@ubuntu.com
Subject: Re: [PATCH 4/4] xfs: drop freeze protection when running GETFSMAP
Date: Mon, 8 Mar 2021 10:05:55 +1100	[thread overview]
Message-ID: <20210307230555.GZ4662@dread.disaster.area> (raw)
In-Reply-To: <161514876275.698643.12226309352552265069.stgit@magnolia>

On Sun, Mar 07, 2021 at 12:26:02PM -0800, Darrick J. Wong wrote:
> From: Darrick J. Wong <djwong@kernel.org>
> 
> A recent log refactoring patchset from Brian Foster relaxed fsfreeze
> behavior with regards to the buffer cache -- now freeze only waits for
> pending buffer IO to finish, and does not try to drain the buffer cache
> LRU.  As a result, fsfreeze should no longer stall indefinitely while
> fsmap runs.  Drop the sb_start_write calls around fsmap invocations.
> 
> Signed-off-by: Darrick J. Wong <djwong@kernel.org>
> ---
>  fs/xfs/xfs_fsmap.c |   14 +++++---------
>  1 file changed, 5 insertions(+), 9 deletions(-)
> 
> 
> diff --git a/fs/xfs/xfs_fsmap.c b/fs/xfs/xfs_fsmap.c
> index 9ce5e7d5bf8f..34f2b971ce43 100644
> --- a/fs/xfs/xfs_fsmap.c
> +++ b/fs/xfs/xfs_fsmap.c
> @@ -904,14 +904,6 @@ xfs_getfsmap(
>  	info.fsmap_recs = fsmap_recs;
>  	info.head = head;
>  
> -	/*
> -	 * If fsmap runs concurrently with a scrub, the freeze can be delayed
> -	 * indefinitely as we walk the rmapbt and iterate over metadata
> -	 * buffers.  Freeze quiesces the log (which waits for the buffer LRU to
> -	 * be emptied) and that won't happen while we're reading buffers.
> -	 */
> -	sb_start_write(mp->m_super);
> -
>  	/* For each device we support... */
>  	for (i = 0; i < XFS_GETFSMAP_DEVS; i++) {
>  		/* Is this device within the range the user asked for? */
> @@ -934,6 +926,11 @@ xfs_getfsmap(
>  		if (handlers[i].dev > head->fmh_keys[0].fmr_device)
>  			memset(&dkeys[0], 0, sizeof(struct xfs_fsmap));
>  
> +		/*
> +		 * Grab an empty transaction so that we can use its recursive
> +		 * buffer locking abilities to detect cycles in the rmapbt
> +		 * without deadlocking.
> +		 */
>  		error = xfs_trans_alloc_empty(mp, &tp);
>  		if (error)
>  			break;

Took me a moment to work out that this is just adding a comment
because it wasn't mentioned in the commit log. Somewhat unrelated to
the bug fix but it's harmless so I don't see any need for you to
do any extra work to respin this patch to remove it.

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

Cheers,

Dave.
-- 
Dave Chinner
david@fromorbit.com

  reply	other threads:[~2021-03-07 23:07 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-07 20:25 [PATCHSET v2 0/4] xfs: small fixes for 5.12 Darrick J. Wong
2021-03-07 20:25 ` [PATCH 1/4] xfs: fix quota accounting when a mount is idmapped Darrick J. Wong
2021-03-07 22:28   ` Dave Chinner
2021-03-07 20:25 ` [PATCH 2/4] xfs: avoid buffer deadlocks when walking fs inodes Darrick J. Wong
2021-03-07 20:36   ` [PATCH v2.1 " Darrick J. Wong
2021-03-07 22:37     ` Dave Chinner
2021-03-08  3:56       ` Darrick J. Wong
2021-03-08  7:56     ` Christoph Hellwig
2021-03-07 20:25 ` [PATCH 3/4] xfs: force log and push AIL to clear pinned inodes when aborting mount Darrick J. Wong
2021-03-07 23:01   ` Dave Chinner
2021-03-08  4:47     ` Darrick J. Wong
2021-03-08  4:48   ` [PATCH v2.1 " Darrick J. Wong
2021-03-08  9:16     ` Christoph Hellwig
2021-03-08 23:42     ` Dave Chinner
2021-03-08  7:53   ` [PATCH " Christoph Hellwig
2021-03-07 20:26 ` [PATCH 4/4] xfs: drop freeze protection when running GETFSMAP Darrick J. Wong
2021-03-07 23:05   ` Dave Chinner [this message]
2021-03-08  4:45     ` Darrick J. Wong
2021-03-08  7:55   ` 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=20210307230555.GZ4662@dread.disaster.area \
    --to=david@fromorbit.com \
    --cc=christian.brauner@ubuntu.com \
    --cc=dchinner@redhat.com \
    --cc=djwong@kernel.org \
    --cc=hch@lst.de \
    --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 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.