All of lore.kernel.org
 help / color / mirror / Atom feed
From: Guoqing Jiang <guoqing.jiang@linux.dev>
To: Xiao Ni <xni@redhat.com>
Cc: Logan Gunthorpe <logang@deltatee.com>, Song Liu <song@kernel.org>,
	linux-raid <linux-raid@vger.kernel.org>,
	Donald Buczek <buczek@molgen.mpg.de>
Subject: Re: [PATCH] md: only unlock mddev from action_store
Date: Mon, 6 Jun 2022 17:55:06 +0800	[thread overview]
Message-ID: <a709dffa-84b4-281f-45c5-a52634c632a6@linux.dev> (raw)
In-Reply-To: <CALTww2-GtH7g5Z1-e73TOE_xDGvDF___LcUq-FO53yeHqoGYUQ@mail.gmail.com>



On 6/6/22 5:36 PM, Xiao Ni wrote:
>>> @@ -4827,12 +4827,14 @@ action_store(struct mddev *mddev, const char
>>> *page, size_t len)
>>>                           clear_bit(MD_RECOVERY_FROZEN, &mddev->recovery);
>>>                   if (test_bit(MD_RECOVERY_RUNNING, &mddev->recovery) &&
>>>                       mddev_lock(mddev) == 0) {
>>> +                       mddev_suspend(mddev);
>>>                           if (work_pending(&mddev->del_work))
>>>                                   flush_workqueue(md_misc_wq);
>>>                           if (mddev->sync_thread) {
>>>                                   set_bit(MD_RECOVERY_INTR, &mddev->recovery);
>>>                                   md_reap_sync_thread(mddev);
>>>                           }
>>> +                       mddev_resume(mddev);
>>>                           mddev_unlock(mddev);
>>>                   }
>>>           } else if (test_bit(MD_RECOVERY_RUNNING, &mddev->recovery))
>> The action actually means sync action which are for internal IO instead
>> of external IO, I suppose the semantic is different with above change.
> The original problem should be i/o happen when interrupting the sync thread?
> So the external i/o calls md_write_start and sets MD_SB_CHANGE_PENDING.
> Then raid5d->md_check_recovery can't update superblock and handle internal
> stripes. So the `echo idle` action is stuck.

My point is action_store shouldn't disturb external IO, it should only 
deal with
sync IO and relevant stuffs as the function is for sync_action node, no?

Thanks,
Guoqing

  reply	other threads:[~2022-06-06  9:55 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-02 13:45 [PATCH] md: only unlock mddev from action_store Guoqing Jiang
2022-06-02 18:03 ` Logan Gunthorpe
2022-06-06  3:08   ` Guoqing Jiang
2022-06-06  8:39     ` Xiao Ni
2022-06-06  9:00       ` Guoqing Jiang
2022-06-06  9:36         ` Xiao Ni
2022-06-06  9:55           ` Guoqing Jiang [this message]
2022-06-06 11:54             ` Xiao Ni
2022-06-06  3:29   ` Guoqing Jiang
2022-06-06 15:48     ` Logan Gunthorpe
2022-06-07  1:20       ` Guoqing Jiang
2022-06-03  6:24 ` Donald Buczek

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=a709dffa-84b4-281f-45c5-a52634c632a6@linux.dev \
    --to=guoqing.jiang@linux.dev \
    --cc=buczek@molgen.mpg.de \
    --cc=linux-raid@vger.kernel.org \
    --cc=logang@deltatee.com \
    --cc=song@kernel.org \
    --cc=xni@redhat.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 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.