Re: [PATCH] Re: Bio device too big | kernel BUG atmm/filemap.c:537!

From: J.A. MagallÃn
Date: Mon Feb 12 2007 - 03:51:46 EST


On Wed, 7 Feb 2007 10:26:56 +1100, Neil Brown <neilb@xxxxxxx> wrote:

> On Tuesday February 6, neilb@xxxxxxx wrote:
> >
> > This patch should fix the worst of the offences, but I'd like to
> > experiment and think a bit more before I submit it to stable.
> > And probably test it too - as yet I have only compile and brain
> > tested.
>
> Ok, I've experimented and tested and now I know what was causing the
> double-unlock.
>
> The following patch is suitable for 2.6.20.1 and mainline. There is
> room for a bit more improvement, but only for performance, not
> correctness. I'll look into that later.
>

> + blk_recount_segments(q, bi);

I needed to export blk_recount_segments() to build raid as a module:

--- linux/block/ll_rw_blk.c.orig 2007-02-12 09:46:55.000000000 +0100
+++ linux/block/ll_rw_blk.c 2007-02-12 09:45:57.000000000 +0100
@@ -1258,6 +1258,8 @@
bio->bi_flags |= (1 << BIO_SEG_VALID);
}

+EXPORT_SYMBOL(blk_recount_segments);
+
static int blk_phys_contig_segment(request_queue_t *q, struct bio *bio,
struct bio *nxt)
{

--
J.A. Magallon <jamagallon()ono!com> \ Software is like sex:
\ It's better when it's free
Mandriva Linux release 2007.1 (Cooker) for i586
Linux 2.6.19-jam06 (gcc 4.1.2 20070115 (prerelease) (4.1.2-0.20070115.1mdv2007.1)) #1 SMP PREEMPT
-
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/