From: Tejun Heo <htejun@gmail.com>
To: axboe@suse.de
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH Linux 2.6.12-rc2 03/04] blk: remove BLK_TAGS_{PER_LONG|MASK}
Date: Wed, 20 Apr 2005 20:41:47 +0900 (KST) [thread overview]
Message-ID: <20050420114041.DB148521@htj.dyndns.org> (raw)
In-Reply-To: <20050420114041.F2FA00DB@htj.dyndns.org>
03_blk_tag_map_remove_BLK_TAGS_PER_LONG.patch
Replace BLK_TAGS_PER_LONG with BITS_PER_LONG and remove unused
BLK_TAGS_MASK.
Signed-off-by: Tejun Heo <htejun@gmail.com>
drivers/block/ll_rw_blk.c | 4 ++--
include/linux/blkdev.h | 3 ---
2 files changed, 2 insertions(+), 5 deletions(-)
Index: blk-fixes/drivers/block/ll_rw_blk.c
===================================================================
--- blk-fixes.orig/drivers/block/ll_rw_blk.c 2005-04-20 20:36:37.000000000 +0900
+++ blk-fixes/drivers/block/ll_rw_blk.c 2005-04-20 20:36:38.000000000 +0900
@@ -788,7 +788,7 @@ init_tag_map(request_queue_t *q, struct
if (!tag_index)
goto fail;
- nr_ulongs = ALIGN(depth, BLK_TAGS_PER_LONG) / BLK_TAGS_PER_LONG;
+ nr_ulongs = ALIGN(depth, BITS_PER_LONG) / BITS_PER_LONG;
tag_map = kmalloc(nr_ulongs * sizeof(unsigned long), GFP_ATOMIC);
if (!tag_map)
goto fail;
@@ -879,7 +879,7 @@ int blk_queue_resize_tags(request_queue_
return -ENOMEM;
memcpy(bqt->tag_index, tag_index, max_depth * sizeof(struct request *));
- nr_ulongs = ALIGN(max_depth, BLK_TAGS_PER_LONG) / BLK_TAGS_PER_LONG;
+ nr_ulongs = ALIGN(max_depth, BITS_PER_LONG) / BITS_PER_LONG;
memcpy(bqt->tag_map, tag_map, nr_ulongs * sizeof(unsigned long));
kfree(tag_index);
Index: blk-fixes/include/linux/blkdev.h
===================================================================
--- blk-fixes.orig/include/linux/blkdev.h 2005-04-20 20:36:37.000000000 +0900
+++ blk-fixes/include/linux/blkdev.h 2005-04-20 20:36:38.000000000 +0900
@@ -285,9 +285,6 @@ enum blk_queue_state {
Queue_up,
};
-#define BLK_TAGS_PER_LONG (sizeof(unsigned long) * 8)
-#define BLK_TAGS_MASK (BLK_TAGS_PER_LONG - 1)
-
struct blk_queue_tag {
struct request **tag_index; /* map of busy tags */
unsigned long *tag_map; /* bit map of free/busy tags */
next prev parent reply other threads:[~2005-04-20 11:44 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-04-20 11:41 [PATCH Linux 2.6.12-rc2 00/04] blk: generic tag support fixes Tejun Heo
2005-04-20 11:41 ` [PATCH Linux 2.6.12-rc2 01/04] blk: use find_first_zero_bit() in blk_queue_start_tag() Tejun Heo
2005-04-20 11:41 ` [PATCH Linux 2.6.12-rc2 02/04] blk: remove blk_queue_tag->real_max_depth optimization Tejun Heo
2005-04-20 11:41 ` Tejun Heo [this message]
2005-04-20 11:41 ` [PATCH Linux 2.6.12-rc2 04/04] blk: cleanup generic tag support error messages Tejun Heo
2005-04-20 11:55 ` [PATCH Linux 2.6.12-rc2 00/04] blk: generic tag support fixes Jens Axboe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20050420114041.DB148521@htj.dyndns.org \
--to=htejun@gmail.com \
--cc=axboe@suse.de \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®