public inbox for linux-xfs@vger.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
Subject: Re: [PATCH 1/4] xfs: return EINTR when a fatal signal terminates scrub
Date: Fri, 14 Oct 2022 09:43:17 +1100	[thread overview]
Message-ID: <20221013224317.GE3600936@dread.disaster.area> (raw)
In-Reply-To: <166473479526.1083393.2162985380296325620.stgit@magnolia>

On Sun, Oct 02, 2022 at 11:19:55AM -0700, Darrick J. Wong wrote:
> From: Darrick J. Wong <djwong@kernel.org>
> 
> If the program calling online fsck is terminated with a fatal signal,
> bail out to userspace by returning EINTR, not EAGAIN.  EAGAIN is used by
> scrubbers to indicate that we should try again with more resources
> locked, and not to indicate that the operation was cancelled.  The
> miswiring is mostly harmless, but it shows up in the trace data.
> 
> Signed-off-by: Darrick J. Wong <djwong@kernel.org>
> ---
>  fs/xfs/scrub/common.h |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> 
> diff --git a/fs/xfs/scrub/common.h b/fs/xfs/scrub/common.h
> index 454145db10e7..b73648d81d23 100644
> --- a/fs/xfs/scrub/common.h
> +++ b/fs/xfs/scrub/common.h
> @@ -25,7 +25,7 @@ xchk_should_terminate(
>  
>  	if (fatal_signal_pending(current)) {
>  		if (*error == 0)
> -			*error = -EAGAIN;
> +			*error = -EINTR;
>  		return true;
>  	}
>  	return false;

Makes sense.

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

-- 
Dave Chinner
david@fromorbit.com

  reply	other threads:[~2022-10-13 22:43 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-02 18:19 [PATCHSET v23.1 0/4] xfs: fix incorrect return values in online fsck Darrick J. Wong
2022-10-02 18:19 ` [PATCH 3/4] xfs: don't retry repairs harder when EAGAIN is returned Darrick J. Wong
2022-10-13 22:46   ` Dave Chinner
2022-10-02 18:19 ` [PATCH 2/4] xfs: fix return code when fatal signal encountered during dquot scrub Darrick J. Wong
2022-10-13 22:43   ` Dave Chinner
2022-10-02 18:19 ` [PATCH 1/4] xfs: return EINTR when a fatal signal terminates scrub Darrick J. Wong
2022-10-13 22:43   ` Dave Chinner [this message]
2022-10-02 18:19 ` [PATCH 4/4] xfs: don't return -EFSCORRUPTED from repair when resources cannot be grabbed Darrick J. Wong
2022-10-13 22:49   ` Dave Chinner
2022-10-14 21:44     ` Darrick J. Wong
2022-11-04 20:35   ` [PATCH v23.2 " Darrick J. Wong
2022-11-08  1:27     ` Darrick J. Wong
2022-11-08  1:28   ` [PATCH v23.3 " Darrick J. Wong
2022-11-15  2:54     ` Dave Chinner

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=20221013224317.GE3600936@dread.disaster.area \
    --to=david@fromorbit.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox