Re: no luck with max_sectors_kb (Re: voluntary-preempt-2.6.8-rc2-J4)

Ingo Molnar
2004-07-26T21:23:32Z

* Rudo Thomas <rudo@matfyz.cz> wrote:

> After setting it to 32 (the hw max is 128), userland programs fail
> with I/O errors. Setting it back to 128 gets it back to working, sort
> of. The errors probably get bufferred somewhere.
>
> During the "bad" setting (32), messages like this one show up in kernel log.
>
> bio too big device hda3 (104 > 64)

does the patch below, ontop of -J7, help?

Ingo

--- drivers/block/ll_rw_blk.c.orig
+++ drivers/block/ll_rw_blk.c
@@ -2447,11 +2447,11 @@ end_io:
break;
}

- if (unlikely(bio_sectors(bio) > q->max_sectors)) {
+ if (unlikely(bio_sectors(bio) > q->max_hw_sectors)) {
printk("bio too big device %s (%u > %u)\n",
bdevname(bio->bi_bdev, b),
bio_sectors(bio),
- q->max_sectors);
+ q->max_hw_sectors);
goto end_io;
}