aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block
diff options
context:
space:
mode:
authorTejun Heo <htejun@gmail.com>2005-06-23 03:08:51 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-06-23 12:45:15 -0400
commit040c928c47b591d1cd9977cd6431cae213528b45 (patch)
treeee19f099782d02ba929f57a8dc0e5f0989e99932 /drivers/block
parentf7d37d028dfba90b1b747f8ac685bf0959aeda8b (diff)
[PATCH] blk: cleanup generic tag support error messages
Add KERN_ERR and __FUNCTION__ to generic tag error messages, and add a comment in blk_queue_end_tag() which explains the silent failure path. Signed-off-by: Tejun Heo <htejun@gmail.com> Acked-by: Jens Axboe <axboe@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/block')
-rw-r--r--drivers/block/ll_rw_blk.c18
1 files changed, 13 insertions, 5 deletions
diff --git a/drivers/block/ll_rw_blk.c b/drivers/block/ll_rw_blk.c
index 99afeec1031f..c581f9138c47 100644
--- a/drivers/block/ll_rw_blk.c
+++ b/drivers/block/ll_rw_blk.c
@@ -912,10 +912,15 @@ void blk_queue_end_tag(request_queue_t *q, struct request *rq)
912 BUG_ON(tag == -1); 912 BUG_ON(tag == -1);
913 913
914 if (unlikely(tag >= bqt->max_depth)) 914 if (unlikely(tag >= bqt->max_depth))
915 /*
916 * This can happen after tag depth has been reduced.
917 * FIXME: how about a warning or info message here?
918 */
915 return; 919 return;
916 920
917 if (unlikely(!__test_and_clear_bit(tag, bqt->tag_map))) { 921 if (unlikely(!__test_and_clear_bit(tag, bqt->tag_map))) {
918 printk("attempt to clear non-busy tag (%d)\n", tag); 922 printk(KERN_ERR "%s: attempt to clear non-busy tag (%d)\n",
923 __FUNCTION__, tag);
919 return; 924 return;
920 } 925 }
921 926
@@ -924,7 +929,8 @@ void blk_queue_end_tag(request_queue_t *q, struct request *rq)
924 rq->tag = -1; 929 rq->tag = -1;
925 930
926 if (unlikely(bqt->tag_index[tag] == NULL)) 931 if (unlikely(bqt->tag_index[tag] == NULL))
927 printk("tag %d is missing\n", tag); 932 printk(KERN_ERR "%s: tag %d is missing\n",
933 __FUNCTION__, tag);
928 934
929 bqt->tag_index[tag] = NULL; 935 bqt->tag_index[tag] = NULL;
930 bqt->busy--; 936 bqt->busy--;
@@ -957,8 +963,9 @@ int blk_queue_start_tag(request_queue_t *q, struct request *rq)
957 963
958 if (unlikely((rq->flags & REQ_QUEUED))) { 964 if (unlikely((rq->flags & REQ_QUEUED))) {
959 printk(KERN_ERR 965 printk(KERN_ERR
960 "request %p for device [%s] already tagged %d", 966 "%s: request %p for device [%s] already tagged %d",
961 rq, rq->rq_disk ? rq->rq_disk->disk_name : "?", rq->tag); 967 __FUNCTION__, rq,
968 rq->rq_disk ? rq->rq_disk->disk_name : "?", rq->tag);
962 BUG(); 969 BUG();
963 } 970 }
964 971
@@ -1001,7 +1008,8 @@ void blk_queue_invalidate_tags(request_queue_t *q)
1001 rq = list_entry_rq(tmp); 1008 rq = list_entry_rq(tmp);
1002 1009
1003 if (rq->tag == -1) { 1010 if (rq->tag == -1) {
1004 printk("bad tag found on list\n"); 1011 printk(KERN_ERR
1012 "%s: bad tag found on list\n", __FUNCTION__);
1005 list_del_init(&rq->queuelist); 1013 list_del_init(&rq->queuelist);
1006 rq->flags &= ~REQ_QUEUED; 1014 rq->flags &= ~REQ_QUEUED;
1007 } else 1015 } else