All of lore.kernel.org
 help / color / mirror / Atom feed
From: Brian Foster <bfoster@redhat.com>
To: "Darrick J. Wong" <djwong@kernel.org>
Cc: linux-xfs@vger.kernel.org
Subject: Re: [PATCH 1/2] xfs: fix deadlock retry tracepoint arguments
Date: Thu, 13 May 2021 08:07:09 -0400	[thread overview]
Message-ID: <YJ0WbaNLjQb6opW5@bfoster> (raw)
In-Reply-To: <162086769410.3685697.9016566085994934364.stgit@magnolia>

On Wed, May 12, 2021 at 06:01:34PM -0700, Darrick J. Wong wrote:
> From: Darrick J. Wong <djwong@kernel.org>
> 
> sc->ip is the inode that's being scrubbed, which means that it's not set
> for scrub types that don't involve inodes.  If one of those scrubbers
> (e.g. inode btrees) returns EDEADLOCK, we'll trip over the null pointer.
> Fix that by reporting either the file being examined or the file that
> was used to call scrub.
> 
> Signed-off-by: Darrick J. Wong <djwong@kernel.org>
> ---

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

>  fs/xfs/scrub/common.c |    4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> 
> diff --git a/fs/xfs/scrub/common.c b/fs/xfs/scrub/common.c
> index aa874607618a..be38c960da85 100644
> --- a/fs/xfs/scrub/common.c
> +++ b/fs/xfs/scrub/common.c
> @@ -74,7 +74,9 @@ __xchk_process_error(
>  		return true;
>  	case -EDEADLOCK:
>  		/* Used to restart an op with deadlock avoidance. */
> -		trace_xchk_deadlock_retry(sc->ip, sc->sm, *error);
> +		trace_xchk_deadlock_retry(
> +				sc->ip ? sc->ip : XFS_I(file_inode(sc->file)),
> +				sc->sm, *error);
>  		break;
>  	case -EFSBADCRC:
>  	case -EFSCORRUPTED:
> 


  reply	other threads:[~2021-05-13 12:07 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-13  1:01 [PATCHSET 0/2] xfs: random pending stuff for 5.13 Darrick J. Wong
2021-05-13  1:01 ` [PATCH 1/2] xfs: fix deadlock retry tracepoint arguments Darrick J. Wong
2021-05-13 12:07   ` Brian Foster [this message]
2021-05-19 13:20   ` Christoph Hellwig
2021-05-19 23:35     ` Darrick J. Wong
2021-05-13  1:01 ` [PATCH 2/2] xfs: restore old ioctl definitions Darrick J. Wong
2021-05-13 12:07   ` Brian Foster
2021-05-19 13:22   ` 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=YJ0WbaNLjQb6opW5@bfoster \
    --to=bfoster@redhat.com \
    --cc=djwong@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 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.