Skip to content

Commit be7f99c

Browse files
Christoph Hellwigaxboe
authored andcommitted
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 <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
1 parent 95c7c09 commit be7f99c

File tree

3 files changed

+1
-38
lines changed

3 files changed

+1
-38
lines changed

Documentation/block/biodoc.txt

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -752,18 +752,6 @@ completion of the request to the block layer. This means ending tag
752752
operations before calling end_that_request_last()! For an example of a user
753753
of these helpers, see the IDE tagged command queueing support.
754754

755-
Certain hardware conditions may dictate a need to invalidate the block tag
756-
queue. For instance, on IDE any tagged request error needs to clear both
757-
the hardware and software block queue and enable the driver to sanely restart
758-
all 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-
767755
3.2.5.2 Tag info
768756

769757
Some 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:
805793
Most of the above is simple and straight forward, however busy_list may need
806794
a bit of explaining. Normally we don't care too much about request ordering,
807795
but in the event of any barrier requests in the tag queue we need to ensure
808-
that requests are restarted in the order they were queue. This may happen
809-
if the driver needs to use blk_queue_invalidate_tags().
796+
that requests are restarted in the order they were queue.
810797

811798
3.3 I/O Submission
812799

block/blk-tag.c

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,6 @@ int blk_queue_init_tags(struct request_queue *q, int depth,
188188
*/
189189
q->queue_tags = tags;
190190
queue_flag_set_unlocked(QUEUE_FLAG_QUEUED, q);
191-
INIT_LIST_HEAD(&q->tag_busy_list);
192191
return 0;
193192
}
194193
EXPORT_SYMBOL(blk_queue_init_tags);
@@ -374,27 +373,6 @@ int blk_queue_start_tag(struct request_queue *q, struct request *rq)
374373
rq->tag = tag;
375374
bqt->tag_index[tag] = rq;
376375
blk_start_request(rq);
377-
list_add(&rq->queuelist, &q->tag_busy_list);
378376
return 0;
379377
}
380378
EXPORT_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-
**/
391-
void 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-
}
400-
EXPORT_SYMBOL(blk_queue_invalidate_tags);

include/linux/blkdev.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -562,7 +562,6 @@ struct request_queue {
562562
unsigned int dma_alignment;
563563

564564
struct blk_queue_tag *queue_tags;
565-
struct list_head tag_busy_list;
566565

567566
unsigned int nr_sorted;
568567
unsigned int in_flight[2];
@@ -1375,7 +1374,6 @@ extern void blk_queue_end_tag(struct request_queue *, struct request *);
13751374
extern int blk_queue_init_tags(struct request_queue *, int, struct blk_queue_tag *, int);
13761375
extern void blk_queue_free_tags(struct request_queue *);
13771376
extern int blk_queue_resize_tags(struct request_queue *, int);
1378-
extern void blk_queue_invalidate_tags(struct request_queue *);
13791377
extern struct blk_queue_tag *blk_init_tags(int, int);
13801378
extern void blk_free_tags(struct blk_queue_tag *);
13811379

0 commit comments

Comments
 (0)