linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Torsten Kaiser <just.for.lkml@googlemail.com>
To: NeilBrown <neilb@suse.de>
Cc: linux-raid@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: Hang in md-raid1 with 3.7-rcX
Date: Sun, 2 Dec 2012 13:10:33 +0100	[thread overview]
Message-ID: <CAPVoSvTOQT65zYbz++jbbaT63VbVKchYdhip58R8S6cPxbW2cw@mail.gmail.com> (raw)
In-Reply-To: <CAPVoSvRssJSzjg1wZ8g9-05Y50xVkVcQqsnZ92Ru6mWZgGrfKg@mail.gmail.com>

On Tue, Nov 27, 2012 at 8:08 AM, Torsten Kaiser
<just.for.lkml@googlemail.com> wrote:
> On Tue, Nov 27, 2012 at 2:05 AM, NeilBrown <neilb@suse.de> wrote:
>> Can you test to see if this fixes it?
>
> Patch applied, I will try to get it stuck again.
> I don't have a reliable reproducers, but if the problem persists I
> will definitly report back here.

With this patch I was not able to recreate the hang. Lacking an 100%
way of recreating this, I can't be completely sure of the fix, but as
you understood from the code how this hang could happen, I'm quite
confident that the fix is working.

(As I do not use the raid10 personality only patching raid1.c was
sufficient for me, I didn't test the version that also patched
raid10.c as its not even compiled on my kernel.)

Thanks for the fix!

Torsten

>> diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c
>> index 636bae0..a0f7309 100644
>> --- a/drivers/md/raid1.c
>> +++ b/drivers/md/raid1.c
>> @@ -963,7 +963,7 @@ static void raid1_unplug(struct blk_plug_cb *cb, bool from_schedule)
>>         struct r1conf *conf = mddev->private;
>>         struct bio *bio;
>>
>> -       if (from_schedule) {
>> +       if (from_schedule || current->bio_list) {
>>                 spin_lock_irq(&conf->device_lock);
>>                 bio_list_merge(&conf->pending_bio_list, &plug->pending);
>>                 conf->pending_count += plug->pending_cnt;
>>

  reply	other threads:[~2012-12-02 12:10 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-24  9:18 Hang in md-raid1 with 3.7-rcX Torsten Kaiser
2012-11-27  1:05 ` NeilBrown
2012-11-27  7:08   ` Torsten Kaiser
2012-12-02 12:10     ` Torsten Kaiser [this message]
2012-12-02 19:52       ` NeilBrown
     [not found]   ` <32242311.8QXFMOUYz5@deuteros>
2012-11-28 20:26     ` NeilBrown

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=CAPVoSvTOQT65zYbz++jbbaT63VbVKchYdhip58R8S6cPxbW2cw@mail.gmail.com \
    --to=just.for.lkml@googlemail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-raid@vger.kernel.org \
    --cc=neilb@suse.de \
    /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;
as well as URLs for NNTP newsgroup(s).