aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2014-09-13 19:40:10 -0400
committerJens Axboe <axboe@fb.com>2014-09-22 14:00:07 -0400
commitc8a446ad695ada43a885ec12b38411dbd190a11b (patch)
tree8d9569b272e633c24b613938d09a29ff16dd994b
parente2490073cd7c3d6f6ef6e029a208edd4d38efac4 (diff)
blk-mq: rename blk_mq_end_io to blk_mq_end_request
Now that we've changed the driver API on the submission side use the opportunity to fix up the name on the completion side to fit into the general scheme. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jens Axboe <axboe@fb.com>
-rw-r--r--block/blk-flush.c4
-rw-r--r--block/blk-mq.c16
-rw-r--r--drivers/block/mtip32xx/mtip32xx.c4
-rw-r--r--drivers/block/null_blk.c2
-rw-r--r--drivers/block/virtio_blk.c2
-rw-r--r--drivers/scsi/scsi_lib.c4
-rw-r--r--include/linux/blk-mq.h4
7 files changed, 18 insertions, 18 deletions
diff --git a/block/blk-flush.c b/block/blk-flush.c
index 3cb5e9e7108a..698e6926388c 100644
--- a/block/blk-flush.c
+++ b/block/blk-flush.c
@@ -202,7 +202,7 @@ static bool blk_flush_complete_seq(struct request *rq, unsigned int seq,
202 list_del_init(&rq->flush.list); 202 list_del_init(&rq->flush.list);
203 blk_flush_restore_request(rq); 203 blk_flush_restore_request(rq);
204 if (q->mq_ops) 204 if (q->mq_ops)
205 blk_mq_end_io(rq, error); 205 blk_mq_end_request(rq, error);
206 else 206 else
207 __blk_end_request_all(rq, error); 207 __blk_end_request_all(rq, error);
208 break; 208 break;
@@ -378,7 +378,7 @@ void blk_insert_flush(struct request *rq)
378 */ 378 */
379 if (!policy) { 379 if (!policy) {
380 if (q->mq_ops) 380 if (q->mq_ops)
381 blk_mq_end_io(rq, 0); 381 blk_mq_end_request(rq, 0);
382 else 382 else
383 __blk_end_bidi_request(rq, 0, 0, 0); 383 __blk_end_bidi_request(rq, 0, 0, 0);
384 return; 384 return;
diff --git a/block/blk-mq.c b/block/blk-mq.c
index 141f2e06803a..1713686f5c2f 100644
--- a/block/blk-mq.c
+++ b/block/blk-mq.c
@@ -300,7 +300,7 @@ void blk_mq_clone_flush_request(struct request *flush_rq,
300 hctx->cmd_size); 300 hctx->cmd_size);
301} 301}
302 302
303inline void __blk_mq_end_io(struct request *rq, int error) 303inline void __blk_mq_end_request(struct request *rq, int error)
304{ 304{
305 blk_account_io_done(rq); 305 blk_account_io_done(rq);
306 306
@@ -312,15 +312,15 @@ inline void __blk_mq_end_io(struct request *rq, int error)
312 blk_mq_free_request(rq); 312 blk_mq_free_request(rq);
313 } 313 }
314} 314}
315EXPORT_SYMBOL(__blk_mq_end_io); 315EXPORT_SYMBOL(__blk_mq_end_request);
316 316
317void blk_mq_end_io(struct request *rq, int error) 317void blk_mq_end_request(struct request *rq, int error)
318{ 318{
319 if (blk_update_request(rq, error, blk_rq_bytes(rq))) 319 if (blk_update_request(rq, error, blk_rq_bytes(rq)))
320 BUG(); 320 BUG();
321 __blk_mq_end_io(rq, error); 321 __blk_mq_end_request(rq, error);
322} 322}
323EXPORT_SYMBOL(blk_mq_end_io); 323EXPORT_SYMBOL(blk_mq_end_request);
324 324
325static void __blk_mq_complete_request_remote(void *data) 325static void __blk_mq_complete_request_remote(void *data)
326{ 326{
@@ -360,7 +360,7 @@ void __blk_mq_complete_request(struct request *rq)
360 struct request_queue *q = rq->q; 360 struct request_queue *q = rq->q;
361 361
362 if (!q->softirq_done_fn) 362 if (!q->softirq_done_fn)
363 blk_mq_end_io(rq, rq->errors); 363 blk_mq_end_request(rq, rq->errors);
364 else 364 else
365 blk_mq_ipi_complete_request(rq); 365 blk_mq_ipi_complete_request(rq);
366} 366}
@@ -758,7 +758,7 @@ static void __blk_mq_run_hw_queue(struct blk_mq_hw_ctx *hctx)
758 pr_err("blk-mq: bad return on queue: %d\n", ret); 758 pr_err("blk-mq: bad return on queue: %d\n", ret);
759 case BLK_MQ_RQ_QUEUE_ERROR: 759 case BLK_MQ_RQ_QUEUE_ERROR:
760 rq->errors = -EIO; 760 rq->errors = -EIO;
761 blk_mq_end_io(rq, rq->errors); 761 blk_mq_end_request(rq, rq->errors);
762 break; 762 break;
763 } 763 }
764 764
@@ -1200,7 +1200,7 @@ static void blk_mq_make_request(struct request_queue *q, struct bio *bio)
1200 1200
1201 if (ret == BLK_MQ_RQ_QUEUE_ERROR) { 1201 if (ret == BLK_MQ_RQ_QUEUE_ERROR) {
1202 rq->errors = -EIO; 1202 rq->errors = -EIO;
1203 blk_mq_end_io(rq, rq->errors); 1203 blk_mq_end_request(rq, rq->errors);
1204 goto done; 1204 goto done;
1205 } 1205 }
1206 } 1206 }
diff --git a/drivers/block/mtip32xx/mtip32xx.c b/drivers/block/mtip32xx/mtip32xx.c
index 4042440a0470..6b7e8d0fba99 100644
--- a/drivers/block/mtip32xx/mtip32xx.c
+++ b/drivers/block/mtip32xx/mtip32xx.c
@@ -247,7 +247,7 @@ static void mtip_async_complete(struct mtip_port *port,
247 if (unlikely(cmd->unaligned)) 247 if (unlikely(cmd->unaligned))
248 up(&port->cmd_slot_unal); 248 up(&port->cmd_slot_unal);
249 249
250 blk_mq_end_io(rq, status ? -EIO : 0); 250 blk_mq_end_request(rq, status ? -EIO : 0);
251} 251}
252 252
253/* 253/*
@@ -3739,7 +3739,7 @@ static int mtip_submit_request(struct blk_mq_hw_ctx *hctx, struct request *rq)
3739 int err; 3739 int err;
3740 3740
3741 err = mtip_send_trim(dd, blk_rq_pos(rq), blk_rq_sectors(rq)); 3741 err = mtip_send_trim(dd, blk_rq_pos(rq), blk_rq_sectors(rq));
3742 blk_mq_end_io(rq, err); 3742 blk_mq_end_request(rq, err);
3743 return 0; 3743 return 0;
3744 } 3744 }
3745 3745
diff --git a/drivers/block/null_blk.c b/drivers/block/null_blk.c
index 332ce20d45da..ac50a2931044 100644
--- a/drivers/block/null_blk.c
+++ b/drivers/block/null_blk.c
@@ -177,7 +177,7 @@ static void end_cmd(struct nullb_cmd *cmd)
177{ 177{
178 switch (queue_mode) { 178 switch (queue_mode) {
179 case NULL_Q_MQ: 179 case NULL_Q_MQ:
180 blk_mq_end_io(cmd->rq, 0); 180 blk_mq_end_request(cmd->rq, 0);
181 return; 181 return;
182 case NULL_Q_RQ: 182 case NULL_Q_RQ:
183 INIT_LIST_HEAD(&cmd->rq->queuelist); 183 INIT_LIST_HEAD(&cmd->rq->queuelist);
diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c
index 83816bf6882f..f751fc392ba9 100644
--- a/drivers/block/virtio_blk.c
+++ b/drivers/block/virtio_blk.c
@@ -135,7 +135,7 @@ static inline void virtblk_request_done(struct request *req)
135 req->errors = (error != 0); 135 req->errors = (error != 0);
136 } 136 }
137 137
138 blk_mq_end_io(req, error); 138 blk_mq_end_request(req, error);
139} 139}
140 140
141static void virtblk_done(struct virtqueue *vq) 141static void virtblk_done(struct virtqueue *vq)
diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c
index 2dcd9078de48..73ce7d27f5c8 100644
--- a/drivers/scsi/scsi_lib.c
+++ b/drivers/scsi/scsi_lib.c
@@ -713,7 +713,7 @@ static bool scsi_end_request(struct request *req, int error,
713 713
714 if (req->mq_ctx) { 714 if (req->mq_ctx) {
715 /* 715 /*
716 * In the MQ case the command gets freed by __blk_mq_end_io, 716 * In the MQ case the command gets freed by __blk_mq_end_request,
717 * so we have to do all cleanup that depends on it earlier. 717 * so we have to do all cleanup that depends on it earlier.
718 * 718 *
719 * We also can't kick the queues from irq context, so we 719 * We also can't kick the queues from irq context, so we
@@ -721,7 +721,7 @@ static bool scsi_end_request(struct request *req, int error,
721 */ 721 */
722 scsi_mq_uninit_cmd(cmd); 722 scsi_mq_uninit_cmd(cmd);
723 723
724 __blk_mq_end_io(req, error); 724 __blk_mq_end_request(req, error);
725 725
726 if (scsi_target(sdev)->single_lun || 726 if (scsi_target(sdev)->single_lun ||
727 !list_empty(&sdev->host->starved_list)) 727 !list_empty(&sdev->host->starved_list))
diff --git a/include/linux/blk-mq.h b/include/linux/blk-mq.h
index 878b6f71da48..cb217c16990d 100644
--- a/include/linux/blk-mq.h
+++ b/include/linux/blk-mq.h
@@ -160,8 +160,8 @@ struct blk_mq_hw_ctx *blk_mq_map_queue(struct request_queue *, const int ctx_ind
160struct blk_mq_hw_ctx *blk_mq_alloc_single_hw_queue(struct blk_mq_tag_set *, unsigned int, int); 160struct blk_mq_hw_ctx *blk_mq_alloc_single_hw_queue(struct blk_mq_tag_set *, unsigned int, int);
161 161
162void blk_mq_start_request(struct request *rq); 162void blk_mq_start_request(struct request *rq);
163void blk_mq_end_io(struct request *rq, int error); 163void blk_mq_end_request(struct request *rq, int error);
164void __blk_mq_end_io(struct request *rq, int error); 164void __blk_mq_end_request(struct request *rq, int error);
165 165
166void blk_mq_requeue_request(struct request *rq); 166void blk_mq_requeue_request(struct request *rq);
167void blk_mq_add_to_requeue_list(struct request *rq, bool at_head); 167void blk_mq_add_to_requeue_list(struct request *rq, bool at_head);