aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2014-06-11 07:49:23 -0400
committerJens Axboe <axboe@fb.com>2014-06-11 17:31:21 -0400
commit2940474af79744411da0cb63b041ad52c57bc443 (patch)
tree7e5208e926d2cad50ece458e7363c339cf44eed8
parent2dc24b0d0636349d403ae803bbad0c84f6c2ea57 (diff)
block: remove elv_abort_queue and blk_abort_flushes
elv_abort_queue has no callers, and blk_abort_flushes is only called by elv_abort_queue. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jens Axboe <axboe@fb.com>
-rw-r--r--block/blk-flush.c38
-rw-r--r--block/blk.h1
-rw-r--r--block/elevator.c20
-rw-r--r--include/linux/elevator.h1
4 files changed, 0 insertions, 60 deletions
diff --git a/block/blk-flush.c b/block/blk-flush.c
index 8ffee4b5f93d..3cb5e9e7108a 100644
--- a/block/blk-flush.c
+++ b/block/blk-flush.c
@@ -422,44 +422,6 @@ void blk_insert_flush(struct request *rq)
422} 422}
423 423
424/** 424/**
425 * blk_abort_flushes - @q is being aborted, abort flush requests
426 * @q: request_queue being aborted
427 *
428 * To be called from elv_abort_queue(). @q is being aborted. Prepare all
429 * FLUSH/FUA requests for abortion.
430 *
431 * CONTEXT:
432 * spin_lock_irq(q->queue_lock)
433 */
434void blk_abort_flushes(struct request_queue *q)
435{
436 struct request *rq, *n;
437 int i;
438
439 /*
440 * Requests in flight for data are already owned by the dispatch
441 * queue or the device driver. Just restore for normal completion.
442 */
443 list_for_each_entry_safe(rq, n, &q->flush_data_in_flight, flush.list) {
444 list_del_init(&rq->flush.list);
445 blk_flush_restore_request(rq);
446 }
447
448 /*
449 * We need to give away requests on flush queues. Restore for
450 * normal completion and put them on the dispatch queue.
451 */
452 for (i = 0; i < ARRAY_SIZE(q->flush_queue); i++) {
453 list_for_each_entry_safe(rq, n, &q->flush_queue[i],
454 flush.list) {
455 list_del_init(&rq->flush.list);
456 blk_flush_restore_request(rq);
457 list_add_tail(&rq->queuelist, &q->queue_head);
458 }
459 }
460}
461
462/**
463 * blkdev_issue_flush - queue a flush 425 * blkdev_issue_flush - queue a flush
464 * @bdev: blockdev to issue flush for 426 * @bdev: blockdev to issue flush for
465 * @gfp_mask: memory allocation flags (for bio_alloc) 427 * @gfp_mask: memory allocation flags (for bio_alloc)
diff --git a/block/blk.h b/block/blk.h
index 45385e9abf6f..6748c4f8d7a1 100644
--- a/block/blk.h
+++ b/block/blk.h
@@ -84,7 +84,6 @@ static inline void blk_clear_rq_complete(struct request *rq)
84#define ELV_ON_HASH(rq) ((rq)->cmd_flags & REQ_HASHED) 84#define ELV_ON_HASH(rq) ((rq)->cmd_flags & REQ_HASHED)
85 85
86void blk_insert_flush(struct request *rq); 86void blk_insert_flush(struct request *rq);
87void blk_abort_flushes(struct request_queue *q);
88 87
89static inline struct request *__elv_next_request(struct request_queue *q) 88static inline struct request *__elv_next_request(struct request_queue *q)
90{ 89{
diff --git a/block/elevator.c b/block/elevator.c
index f35edddfe9b5..34bded18910e 100644
--- a/block/elevator.c
+++ b/block/elevator.c
@@ -729,26 +729,6 @@ int elv_may_queue(struct request_queue *q, int rw)
729 return ELV_MQUEUE_MAY; 729 return ELV_MQUEUE_MAY;
730} 730}
731 731
732void elv_abort_queue(struct request_queue *q)
733{
734 struct request *rq;
735
736 blk_abort_flushes(q);
737
738 while (!list_empty(&q->queue_head)) {
739 rq = list_entry_rq(q->queue_head.next);
740 rq->cmd_flags |= REQ_QUIET;
741 trace_block_rq_abort(q, rq);
742 /*
743 * Mark this request as started so we don't trigger
744 * any debug logic in the end I/O path.
745 */
746 blk_start_request(rq);
747 __blk_end_request_all(rq, -EIO);
748 }
749}
750EXPORT_SYMBOL(elv_abort_queue);
751
752void elv_completed_request(struct request_queue *q, struct request *rq) 732void elv_completed_request(struct request_queue *q, struct request *rq)
753{ 733{
754 struct elevator_queue *e = q->elevator; 734 struct elevator_queue *e = q->elevator;
diff --git a/include/linux/elevator.h b/include/linux/elevator.h
index 4ff262e2bf37..e2a6bd7fb133 100644
--- a/include/linux/elevator.h
+++ b/include/linux/elevator.h
@@ -133,7 +133,6 @@ extern struct request *elv_latter_request(struct request_queue *, struct request
133extern int elv_register_queue(struct request_queue *q); 133extern int elv_register_queue(struct request_queue *q);
134extern void elv_unregister_queue(struct request_queue *q); 134extern void elv_unregister_queue(struct request_queue *q);
135extern int elv_may_queue(struct request_queue *, int); 135extern int elv_may_queue(struct request_queue *, int);
136extern void elv_abort_queue(struct request_queue *);
137extern void elv_completed_request(struct request_queue *, struct request *); 136extern void elv_completed_request(struct request_queue *, struct request *);
138extern int elv_set_request(struct request_queue *q, struct request *rq, 137extern int elv_set_request(struct request_queue *q, struct request *rq,
139 struct bio *bio, gfp_t gfp_mask); 138 struct bio *bio, gfp_t gfp_mask);