On Wed, 07 May 2008 17:40:26 -0500 James Bottomley <James.Bottomley@HansenPartnership.com> wrote:The patch is fine from the perspective of the SCSI mid-layer. But it would be not from the perspective of the block layer. For example, blk_queue_init_tags is expected to be called with holding the queue lock (since it could call blk_queue_resize_tags internally) though only the SCSI mid-layer uses those APIs for now. Jens, what do you think? For your convenience, here's the same patch with a proper description and my signed-off. == From: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Subject: [PATCH] block: fix the queue locking test on tag APIs The commit 75ad23bc0fcb4f992a5d06982bf0857ab1738e9e expects that __blk_queue_free_tags, blk_queue_free_tags and blk_queue_init_tags are called with holding the queue lock but the SCSI mid-layer has not (and only the SCSI mid-layer uses them). This changes them to use queue_flag_set/clear_unlocked. It should work as before. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Cc: James Bottomley <James.Bottomley@HansenPartnership.com> Cc: Jens Axboe <jens.axboe@oracle.com> --- block/blk-tag.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/block/blk-tag.c b/block/blk-tag.c index de64e04..d4e21cd 100644 --- a/block/blk-tag.c +++ b/block/blk-tag.c @@ -70,7 +70,7 @@ void __blk_queue_free_tags(struct request_queue *q) __blk_free_tags(bqt); q->queue_tags = NULL; - queue_flag_clear(QUEUE_FLAG_QUEUED, q); + queue_flag_clear_unlocked(QUEUE_FLAG_QUEUED, q); } /** @@ -98,7 +98,7 @@ EXPORT_SYMBOL(blk_free_tags); **/ void blk_queue_free_tags(struct request_queue *q) { - queue_flag_clear(QUEUE_FLAG_QUEUED, q); + queue_flag_clear_unlocked(QUEUE_FLAG_QUEUED, q); } EXPORT_SYMBOL(blk_queue_free_tags); @@ -197,7 +197,7 @@ int blk_queue_init_tags(struct request_queue *q, int depth, * assign it, all done */ q->queue_tags = tags; - queue_flag_set(QUEUE_FLAG_QUEUED, q); + queue_flag_set_unlocked(QUEUE_FLAG_QUEUED, q); INIT_LIST_HEAD(&q->tag_busy_list); return 0; fail: -- 1.5.3.6 --
| Linus Torvalds | Re: O_DIRECT question |
| Greg KH | [GIT PATCH] driver core patches against 2.6.24 |
| Dave Airlie | Re: [2.6.25-rc6] possible regression: X server dying |
| Florian Schmidt | blacklist kernel boot option |
git: | |
| Petr Baudis | repo.or.cz wishes? |
| Jon Smirl | ! [rejected] master -> master (non-fast forward) |
| Matthieu Moy | [BUG] git-svn dcommit fails (connection closed unexpectedly) |
| Jakub Narebski | Git User's Survey 2007 partial summary |
| Ondřej Surý | openbgp not exporing ipv6 to routing tables |
| Nick Guenther | Re: Real men don't attack straw men |
| Christophe Rioux | OpenBSD as host for VMWare Server |
| Bambero | two wan interfaces |
| Warner Losh | Re: SMP re-eetrancy in "bottom half" drivers |
| Martin Husemann | Re: Prototype kernel continuation-passing for NetBSD |
| Martin Husemann | Dynamic registry of ehternet frame types |
| der Mouse | Re: file id alignment |
