Linux RAID subsystem development
 help / color / mirror / Atom feed
From: Mariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>
To: Xiao Ni <xni@redhat.com>
Cc: song@kernel.org, yukuai3@huawei.com, linux-raid@vger.kernel.org
Subject: Re: [PATCH RFC 1/1] md: Use pers->quiesce in mddev_suspend
Date: Tue, 5 Nov 2024 09:16:01 +0100	[thread overview]
Message-ID: <20241105091601.00001267@linux.intel.com> (raw)
In-Reply-To: <20241105075733.66101-1-xni@redhat.com>

On Tue,  5 Nov 2024 15:57:33 +0800
Xiao Ni <xni@redhat.com> wrote:

> One customer reports a bug: raid5 is hung when changing thread cnt
> while resync is running. The stripes are all in conf->handle_list
> and new threads can't handle them.

Is issue fixed with this patch? Is is missing here :)
> 
> Commit b39f35ebe86d ("md: don't quiesce in mddev_suspend()") removes
> pers->quiesce from mddev_suspend/resume, then we can't guarantee sync
> requests finish in suspend operation. One personality knows itself the
> best. So pers->quiesce is a proper way to let personality quiesce.

> 
> Fixes: b39f35ebe86d ("md: don't quiesce in mddev_suspend()")
> Signed-off-by: Xiao Ni <xni@redhat.com>
> ---
>  drivers/md/md.c | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/drivers/md/md.c b/drivers/md/md.c
> index 67108c397c5a..7409ecb2df68 100644
> --- a/drivers/md/md.c
> +++ b/drivers/md/md.c
> @@ -482,6 +482,9 @@ int mddev_suspend(struct mddev *mddev, bool interruptible)
>  		return err;
>  	}
>  
> +	if (mddev->pers)
> +		mddev->pers->quiesce(mddev, 1);
> +

Shouldn't it be implemented as below? According to b39f35ebe86d, some levels are
not implementing this?

+	if (mddev->pers && mddev->pers->quiesce)
+		mddev->pers->quiesce(mddev, 1);

Is it reproducible with upstream kernel?

Thanks,
Mariusz

  parent reply	other threads:[~2024-11-05  8:16 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-05  7:57 [PATCH RFC 1/1] md: Use pers->quiesce in mddev_suspend Xiao Ni
2024-11-05  8:14 ` Yu Kuai
2024-11-05  8:48   ` Xiao Ni
2024-11-05  8:16 ` Mariusz Tkaczyk [this message]
2024-11-05  8:29   ` Yu Kuai
2024-11-05  9:01     ` Xiao Ni
2024-11-05  9:22       ` Yu Kuai
2024-11-05 10:35         ` Xiao Ni

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=20241105091601.00001267@linux.intel.com \
    --to=mariusz.tkaczyk@linux.intel.com \
    --cc=linux-raid@vger.kernel.org \
    --cc=song@kernel.org \
    --cc=xni@redhat.com \
    --cc=yukuai3@huawei.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