From: Nick Piggin This adjusts the nr_requests to match a large TCQ window. drivers/block/ll_rw_blk.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff -puN drivers/block/ll_rw_blk.c~large-TCQ-fix drivers/block/ll_rw_blk.c --- 25/drivers/block/ll_rw_blk.c~large-TCQ-fix 2003-08-06 19:59:38.000000000 -0700 +++ 25-akpm/drivers/block/ll_rw_blk.c 2003-08-06 20:10:25.000000000 -0700 @@ -470,10 +470,10 @@ init_tag_map(request_queue_t *q, struct { int bits, i; - if (depth > q->nr_requests * 2) { - depth = q->nr_requests * 2; - printk(KERN_ERR "%s: adjusted depth to %d\n", - __FUNCTION__, depth); + if (depth*2 > q->nr_requests) { + q->nr_requests = depth * 2; + printk(KERN_ERR "%s: adjusted nr_requests to %ld\n", + __FUNCTION__, q->nr_requests); } tags->tag_index = kmalloc(depth * sizeof(struct request *), GFP_ATOMIC); _