Re: 2.6.15-mm2

From: Jens Axboe
Date: Wed Jan 11 2006 - 14:51:05 EST


On Wed, Jan 11 2006, Jens Axboe wrote:
> On Thu, Jan 12 2006, Reuben Farrelly wrote:
> >
> >
> > On 12/01/2006 3:55 a.m., Jens Axboe wrote:
> > >On Wed, Jan 11 2006, Jens Axboe wrote:
> > >>It's not too tricky, you just need to correct that function prototype.
> > >>Could you do that? Would be nice to know _exactly_ which libata
> > >>changeset caused this malfunction. But it does of course point at the
> > >>barrier changes for scsi/libata...
> > >
> > >You can also try something quicker - use a newer kernel known to exhibit
> > >the problem, and apply this patch on top of that:
> > >
> > >diff --git a/drivers/md/md.c b/drivers/md/md.c
> > >index 0302723..720ace4 100644
> > >--- a/drivers/md/md.c
> > >+++ b/drivers/md/md.c
> > >@@ -436,6 +436,7 @@ void md_super_write(mddev_t *mddev, mdk_
> > > bio->bi_rw = rw;
> > >
> > > atomic_inc(&mddev->pending_writes);
> > >+#if 0
> > > if (!test_bit(BarriersNotsupp, &rdev->flags)) {
> > > struct bio *rbio;
> > > rw |= (1<<BIO_RW_BARRIER);
> > >@@ -444,6 +445,7 @@ void md_super_write(mddev_t *mddev, mdk_
> > > rbio->bi_end_io = super_written_barrier;
> > > submit_bio(rw, rbio);
> > > } else
> > >+#endif
> > > submit_bio(rw, bio);
> > > }
> >
> > ...and with that patch, I can now boot up 2.6.15-mm3 (repeated twice). So
> > yes, looks like that's where the problem lies.
>
> At least it shows that the problem is indeed barrier related. I don't
> have the start of this thread, so can you please send me the output from
> dmesg from this kernel boot? I'm curious whether the fallback triggers,
> or if it's the barrier that fails instead.

Or even better, please boot with this patch applied on top of the kernel
you just booted (the new one, with the md patch applied).

diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c
index 4c5127e..07aee66 100644
--- a/drivers/scsi/sd.c
+++ b/drivers/scsi/sd.c
@@ -1492,6 +1492,7 @@ static int sd_revalidate_disk(struct gen
ordered = QUEUE_ORDERED_DRAIN;

blk_queue_ordered(sdkp->disk->queue, ordered, sd_prepare_flush);
+ printk("%s: ordered set to %d\n", disk->disk_name, ordered);

set_capacity(disk, sdkp->capacity);
kfree(buffer);

--
Jens Axboe

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/