[PATCH 2/3] blk_resize_tags_fix

From: brking
Date: Mon Aug 09 2004 - 15:08:33 EST



init_tag_map should not initialize the busy_list, refcnt, or busy fields
in the tag map since blk_queue_resize_tags can call it while requests are
active. Patch moves this initialization into blk_queue_init_tags.

Signed-off-by: Jens Axboe <axboe@xxxxxxx>
Signed-off-by: Brian King <brking@xxxxxxxxxx>
---

linux-2.6.8-rc3-mm2-bjking1/drivers/block/ll_rw_blk.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)

diff -puN drivers/block/ll_rw_blk.c~blk_resize_tags_fix drivers/block/ll_rw_blk.c
--- linux-2.6.8-rc3-mm2/drivers/block/ll_rw_blk.c~blk_resize_tags_fix 2004-08-09 14:51:40.000000000 -0500
+++ linux-2.6.8-rc3-mm2-bjking1/drivers/block/ll_rw_blk.c 2004-08-09 14:51:40.000000000 -0500
@@ -598,9 +598,6 @@ init_tag_map(request_queue_t *q, struct
for (i = depth; i < bits * BLK_TAGS_PER_LONG; i++)
__set_bit(i, tags->tag_map);

- INIT_LIST_HEAD(&tags->busy_list);
- tags->busy = 0;
- atomic_set(&tags->refcnt, 1);
return 0;
fail:
kfree(tags->tag_index);
@@ -626,6 +623,10 @@ int blk_queue_init_tags(request_queue_t

if (init_tag_map(q, tags, depth))
goto fail;
+
+ INIT_LIST_HEAD(&tags->busy_list);
+ tags->busy = 0;
+ atomic_set(&tags->refcnt, 1);
} else if (q->queue_tags) {
if ((rc = blk_queue_resize_tags(q, depth)))
return rc;
_
-
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/