Re: Hang in md-raid1 with 3.7-rcX

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, 2 Dec 2012 13:10:33 +0100 Torsten Kaiser
<just.for.lkml@xxxxxxxxxxxxxx> wrote:

> On Tue, Nov 27, 2012 at 8:08 AM, Torsten Kaiser
> <just.for.lkml@xxxxxxxxxxxxxx> wrote:
> > On Tue, Nov 27, 2012 at 2:05 AM, NeilBrown <neilb@xxxxxxx> 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!

And thanks for testing!
Linus doesn't seem to have pulled in the fix yet, but hopefully it will be in
3.7.

NeilBrown

> 
> 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;
> >>

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux