lkml.org 
[lkml]   [2004]   [Aug]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH 1/2] blk_resize_tags_fix
From
Date

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: Brian King <brking@us.ibm.com>
---

linux-2.6.8-rc3-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/drivers/block/ll_rw_blk.c~blk_resize_tags_fix 2004-08-09 10:20:23.000000000 -0500
+++ linux-2.6.8-rc3-bjking1/drivers/block/ll_rw_blk.c 2004-08-09 10:22:56.000000000 -0500
@@ -559,9 +559,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);
@@ -587,6 +584,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@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2005-03-22 14:05    [W:0.028 / U:24.592 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site