From mboxrd@z Thu Jan 1 00:00:00 1970 From: NeilBrown Subject: Re: Hang in md-raid1 with 3.7-rcX Date: Mon, 3 Dec 2012 06:52:45 +1100 Message-ID: <20121203065245.4a95b386@notabene.brown> References: <20121127120528.637099aa@notabene.brown> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=PGP-SHA1; boundary="Sig_/ZwU7=tGDnCJkgs=IZnX1zeW"; protocol="application/pgp-signature" Return-path: In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org To: Torsten Kaiser Cc: linux-raid@vger.kernel.org, linux-kernel@vger.kernel.org List-Id: linux-raid.ids --Sig_/ZwU7=tGDnCJkgs=IZnX1zeW Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Sun, 2 Dec 2012 13:10:33 +0100 Torsten Kaiser wrote: > On Tue, Nov 27, 2012 at 8:08 AM, Torsten Kaiser > wrote: > > On Tue, Nov 27, 2012 at 2:05 AM, NeilBrown 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. >=20 > 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. >=20 > (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.) >=20 > 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 >=20 > Torsten >=20 > >> 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, b= ool from_schedule) > >> struct r1conf *conf =3D 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 +=3D plug->pending_cnt; > >> --Sig_/ZwU7=tGDnCJkgs=IZnX1zeW Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (GNU/Linux) iQIVAwUBULuxjTnsnt1WYoG5AQLnyw/7BhVZpE23b7tYceA4c39Ul1iE3v7UXaKU t922kfxSIugJWSbKzOBjDzzz222CZZT1vbEGn1MGoD/dE47VEMQBMsUJe6GERcM/ /UG9yo5dOtun6C4v1yPL6toE4yebIK0EBkB0DRc8UDCWjyyhtnZdGs1GD8ZC1MNg w18+59I8/KZoNxHbAA8VvWJnxHHxmNn50wLLJl14mGnBKjG4anIKMMAbiDnzmxDA ZeJgMo3Xj/FlBRcXG7r2XWp+pjcY8rdeNLrfcY6By6ATSn4DjOe84skCRUNSAHrB aodVPfKMAOjas529If+Ckzy0/arP1ILmcWafzEy8MO5RYESWr43tvJvhMF8GSjHf vQLg5yt6bYbieXtnNXvYMDcg8erirwaotTG6B55qX3YtEi8PQjYT55JOP1MjsddI nWvq+MVaJL2PK7TNugLNxbCo2+mIp0UaaEoY4dJU+Oo6u8Zet84oqAEC09LHXtQK KUxg3AfXZchmVN+dDiWfruGvRx6o/bfS9Dx1EwtTUjJkba55fQoS63PPf23gsza9 jBiHLBOfTDcIfK46TX2ecBRtVq9FUKRz14NIGDZTcgUAGdAR2l7CkEYbC1TmfPdr 7l6wBs5RsRvJEzOxyrhcLsQY8ztj4pYXb99hF3bWfMbpVRMQmKV7JAoepHoV8by3 naEYrLbDARg= =rb27 -----END PGP SIGNATURE----- --Sig_/ZwU7=tGDnCJkgs=IZnX1zeW--