aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2018-06-15 07:55:07 -0400
committerJens Axboe <axboe@kernel.dk>2018-06-15 10:13:35 -0400
commitbe7f99c536c5aeebad29082b7d8dce32077fea14 (patch)
treea026c665fbda622d498d3ed4616a83910387bf51
parent95c7c09f4cc8ac3cfbcf4382ff3f7ecfd97e8ed6 (diff)
block: remov blk_queue_invalidate_tags
This function is entirely unused, so remove it and the tag_queue_busy member of struct request_queue. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jens Axboe <axboe@kernel.dk>
-rw-r--r--Documentation/block/biodoc.txt15
-rw-r--r--block/blk-tag.c22
-rw-r--r--include/linux/blkdev.h2
3 files changed, 1 insertions, 38 deletions
diff --git a/Documentation/block/biodoc.txt b/Documentation/block/biodoc.txt
index 86927029a52d..207eca58efaa 100644
--- a/Documentation/block/biodoc.txt
+++ b/Documentation/block/biodoc.txt
@@ -752,18 +752,6 @@ completion of the request to the block layer. This means ending tag
752operations before calling end_that_request_last()! For an example of a user 752operations before calling end_that_request_last()! For an example of a user
753of these helpers, see the IDE tagged command queueing support. 753of these helpers, see the IDE tagged command queueing support.
754 754
755Certain hardware conditions may dictate a need to invalidate the block tag
756queue. For instance, on IDE any tagged request error needs to clear both
757the hardware and software block queue and enable the driver to sanely restart
758all the outstanding requests. There's a third helper to do that:
759
760 blk_queue_invalidate_tags(struct request_queue *q)
761
762 Clear the internal block tag queue and re-add all the pending requests
763 to the request queue. The driver will receive them again on the
764 next request_fn run, just like it did the first time it encountered
765 them.
766
7673.2.5.2 Tag info 7553.2.5.2 Tag info
768 756
769Some block functions exist to query current tag status or to go from a 757Some block functions exist to query current tag status or to go from a
@@ -805,8 +793,7 @@ Internally, block manages tags in the blk_queue_tag structure:
805Most of the above is simple and straight forward, however busy_list may need 793Most of the above is simple and straight forward, however busy_list may need
806a bit of explaining. Normally we don't care too much about request ordering, 794a bit of explaining. Normally we don't care too much about request ordering,
807but in the event of any barrier requests in the tag queue we need to ensure 795but in the event of any barrier requests in the tag queue we need to ensure
808that requests are restarted in the order they were queue. This may happen 796that requests are restarted in the order they were queue.
809if the driver needs to use blk_queue_invalidate_tags().
810 797
8113.3 I/O Submission 7983.3 I/O Submission
812 799
diff --git a/block/blk-tag.c b/block/blk-tag.c
index 09f19c6c52ce..ada0d7cff62b 100644
--- a/block/blk-tag.c
+++ b/block/blk-tag.c
@@ -188,7 +188,6 @@ int blk_queue_init_tags(struct request_queue *q, int depth,
188 */ 188 */
189 q->queue_tags = tags; 189 q->queue_tags = tags;
190 queue_flag_set_unlocked(QUEUE_FLAG_QUEUED, q); 190 queue_flag_set_unlocked(QUEUE_FLAG_QUEUED, q);
191 INIT_LIST_HEAD(&q->tag_busy_list);
192 return 0; 191 return 0;
193} 192}
194EXPORT_SYMBOL(blk_queue_init_tags); 193EXPORT_SYMBOL(blk_queue_init_tags);
@@ -374,27 +373,6 @@ int blk_queue_start_tag(struct request_queue *q, struct request *rq)
374 rq->tag = tag; 373 rq->tag = tag;
375 bqt->tag_index[tag] = rq; 374 bqt->tag_index[tag] = rq;
376 blk_start_request(rq); 375 blk_start_request(rq);
377 list_add(&rq->queuelist, &q->tag_busy_list);
378 return 0; 376 return 0;
379} 377}
380EXPORT_SYMBOL(blk_queue_start_tag); 378EXPORT_SYMBOL(blk_queue_start_tag);
381
382/**
383 * blk_queue_invalidate_tags - invalidate all pending tags
384 * @q: the request queue for the device
385 *
386 * Description:
387 * Hardware conditions may dictate a need to stop all pending requests.
388 * In this case, we will safely clear the block side of the tag queue and
389 * readd all requests to the request queue in the right order.
390 **/
391void blk_queue_invalidate_tags(struct request_queue *q)
392{
393 struct list_head *tmp, *n;
394
395 lockdep_assert_held(q->queue_lock);
396
397 list_for_each_safe(tmp, n, &q->tag_busy_list)
398 blk_requeue_request(q, list_entry_rq(tmp));
399}
400EXPORT_SYMBOL(blk_queue_invalidate_tags);
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index fa6f11751430..9154570edf29 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -562,7 +562,6 @@ struct request_queue {
562 unsigned int dma_alignment; 562 unsigned int dma_alignment;
563 563
564 struct blk_queue_tag *queue_tags; 564 struct blk_queue_tag *queue_tags;
565 struct list_head tag_busy_list;
566 565
567 unsigned int nr_sorted; 566 unsigned int nr_sorted;
568 unsigned int in_flight[2]; 567 unsigned int in_flight[2];
@@ -1375,7 +1374,6 @@ extern void blk_queue_end_tag(struct request_queue *, struct request *);
1375extern int blk_queue_init_tags(struct request_queue *, int, struct blk_queue_tag *, int); 1374extern int blk_queue_init_tags(struct request_queue *, int, struct blk_queue_tag *, int);
1376extern void blk_queue_free_tags(struct request_queue *); 1375extern void blk_queue_free_tags(struct request_queue *);
1377extern int blk_queue_resize_tags(struct request_queue *, int); 1376extern int blk_queue_resize_tags(struct request_queue *, int);
1378extern void blk_queue_invalidate_tags(struct request_queue *);
1379extern struct blk_queue_tag *blk_init_tags(int, int); 1377extern struct blk_queue_tag *blk_init_tags(int, int);
1380extern void blk_free_tags(struct blk_queue_tag *); 1378extern void blk_free_tags(struct blk_queue_tag *);
1381 1379