Linux RAID subsystem development
 help / color / mirror / Atom feed
From: Mateusz Kusiak <mateusz.kusiak@linux.intel.com>
To: Yu Kuai <yukuai1@huaweicloud.com>,
	linux-raid@vger.kernel.org, "yukuai (C)" <yukuai3@huawei.com>,
	"yangerkun@huawei.com" <yangerkun@huawei.com>
Subject: Re: IMSM: Drive removed during I/O is set to faulty but not removed from volume
Date: Fri, 19 Jul 2024 10:02:30 +0200	[thread overview]
Message-ID: <3564b25f-e754-4556-afcc-c6045d38e183@linux.intel.com> (raw)
In-Reply-To: <f3d0f203-f9b9-04c1-e5a0-d61fc5c6c0d2@huaweicloud.com>



On 19.07.2024 09:02, Yu Kuai wrote:
> 
> Hi,
> 
> With some discussion and log collection, looks like this is a deadlock
> introduced by:
> 
> https://lore.kernel.org/r/20230825031622.1530464-8-yukuai1@huaweicloud.com
> 
> Root cause is that:
> 
> 1) New io is blocked because array is suspended;
> 2) md_start_sync suspend the array, and it's waiting for inflight IO to be done;
> 3) inflight IO is waiting for md_start_sync to be done, from
> md_start_write->flush_work().
> 
> Can you give following patch a test?
> 
> Thanks!
> Kuai
> 
> diff --git a/drivers/md/md.c b/drivers/md/md.c
> index 64693913ed18..10c2d816062a 100644
> --- a/drivers/md/md.c
> +++ b/drivers/md/md.c
> @@ -8668,7 +8668,6 @@ void md_write_start(struct mddev *mddev, struct bio *bi)
>          BUG_ON(mddev->ro == MD_RDONLY);
>          if (mddev->ro == MD_AUTO_READ) {
>                  /* need to switch to read/write */
> -               flush_work(&mddev->sync_work);
>                  mddev->ro = MD_RDWR;
>                  set_bit(MD_RECOVERY_NEEDED, &mddev->recovery);
>                  md_wakeup_thread(mddev->thread);
> 

Hi Kuai,
With the patch you provided the issue still reproduces.

Thanks,
Mateusz

  reply	other threads:[~2024-07-19  8:02 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-18 14:57 IMSM: Drive removed during I/O is set to faulty but not removed from volume Mateusz Kusiak
2024-07-18 16:41 ` Paul E Luse
2024-07-19  7:02 ` Yu Kuai
2024-07-19  8:02   ` Mateusz Kusiak [this message]
2024-07-19  8:20     ` Yu Kuai

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=3564b25f-e754-4556-afcc-c6045d38e183@linux.intel.com \
    --to=mateusz.kusiak@linux.intel.com \
    --cc=linux-raid@vger.kernel.org \
    --cc=yangerkun@huawei.com \
    --cc=yukuai1@huaweicloud.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