Linux kernel -stable discussions
 help / color / mirror / Atom feed
From: David Laight <david.laight.linux@gmail.com>
To: Alexander Aring <aahringo@redhat.com>
Cc: agruenba@redhat.com, stable@vger.kernel.org, gfs2@lists.linux.dev
Subject: Re: [PATCH gfs2/for-next] gfs2: use delay during spinlock area
Date: Mon, 31 Mar 2025 22:31:54 +0100	[thread overview]
Message-ID: <20250331223154.1fd4b0dc@pumpkin> (raw)
In-Reply-To: <20250331193656.1134507-1-aahringo@redhat.com>

On Mon, 31 Mar 2025 15:36:56 -0400
Alexander Aring <aahringo@redhat.com> wrote:

> In a rare case of gfs2 spectator mount the ls->ls_recover_spin is being
> held. In this case we cannot call msleep_interruptible() as we a in a
> non-sleepable context. Replace it with mdelay() to busy wait for 1
> second.

You can't busy wait like that.
You've just stopped any RT process that last ran on the cpu you are
on from running, as well as all any interrupts tied to the cpu.
Also consider a single cpu system.

	David

> 
> Cc: stable@vger.kernel.org
> Fixes: 4a7727725dc7 ("GFS2: Fix recovery issues for spectators")
> Signed-off-by: Alexander Aring <aahringo@redhat.com>
> ---
>  fs/gfs2/lock_dlm.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fs/gfs2/lock_dlm.c b/fs/gfs2/lock_dlm.c
> index 58aeeae7ed8c..ac0afedff49b 100644
> --- a/fs/gfs2/lock_dlm.c
> +++ b/fs/gfs2/lock_dlm.c
> @@ -996,7 +996,7 @@ static int control_mount(struct gfs2_sbd *sdp)
>  		if (sdp->sd_args.ar_spectator) {
>  			fs_info(sdp, "Recovery is required. Waiting for a "
>  				"non-spectator to mount.\n");
> -			msleep_interruptible(1000);
> +			mdelay(1000);
>  		} else {
>  			fs_info(sdp, "control_mount wait1 block %u start %u "
>  				"mount %u lvb %u flags %lx\n", block_gen,


  reply	other threads:[~2025-03-31 21:31 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-31 19:36 [PATCH gfs2/for-next] gfs2: use delay during spinlock area Alexander Aring
2025-03-31 21:31 ` David Laight [this message]
2025-03-31 22:47   ` Andreas Gruenbacher

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=20250331223154.1fd4b0dc@pumpkin \
    --to=david.laight.linux@gmail.com \
    --cc=aahringo@redhat.com \
    --cc=agruenba@redhat.com \
    --cc=gfs2@lists.linux.dev \
    --cc=stable@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