diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2015-11-10 20:23:49 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-11-10 20:23:49 -0500 |
commit | 3419b45039c6b799c974a8019361c045e7ca232c (patch) | |
tree | 36a63602036cc50f34fadcbd5d5d8fca94e44297 /drivers/block | |
parent | 01504f5e9e071f1dde1062e3be15f54d4555308f (diff) | |
parent | c1c534609fe8a859f9c8108a5591e6e8a97e34d1 (diff) |
Merge branch 'for-4.4/io-poll' of git://git.kernel.dk/linux-block
Pull block IO poll support from Jens Axboe:
"Various groups have been doing experimentation around IO polling for
(really) fast devices. The code has been reviewed and has been
sitting on the side for a few releases, but this is now good enough
for coordinated benchmarking and further experimentation.
Currently O_DIRECT sync read/write are supported. A framework is in
the works that allows scalable stats tracking so we can auto-tune
this. And we'll add libaio support as well soon. Fow now, it's an
opt-in feature for test purposes"
* 'for-4.4/io-poll' of git://git.kernel.dk/linux-block:
direct-io: be sure to assign dio->bio_bdev for both paths
directio: add block polling support
NVMe: add blk polling support
block: add block polling support
blk-mq: return tag/queue combo in the make_request_fn handlers
block: change ->make_request_fn() and users to return a queue cookie
Diffstat (limited to 'drivers/block')
-rw-r--r-- | drivers/block/brd.c | 5 | ||||
-rw-r--r-- | drivers/block/drbd/drbd_int.h | 2 | ||||
-rw-r--r-- | drivers/block/drbd/drbd_req.c | 3 | ||||
-rw-r--r-- | drivers/block/null_blk.c | 3 | ||||
-rw-r--r-- | drivers/block/pktcdvd.c | 9 | ||||
-rw-r--r-- | drivers/block/ps3vram.c | 6 | ||||
-rw-r--r-- | drivers/block/rsxx/dev.c | 5 | ||||
-rw-r--r-- | drivers/block/umem.c | 4 | ||||
-rw-r--r-- | drivers/block/zram/zram_drv.c | 5 |
9 files changed, 24 insertions, 18 deletions
diff --git a/drivers/block/brd.c b/drivers/block/brd.c index b9794aeeb878..c9f9c30d6467 100644 --- a/drivers/block/brd.c +++ b/drivers/block/brd.c | |||
@@ -323,7 +323,7 @@ out: | |||
323 | return err; | 323 | return err; |
324 | } | 324 | } |
325 | 325 | ||
326 | static void brd_make_request(struct request_queue *q, struct bio *bio) | 326 | static blk_qc_t brd_make_request(struct request_queue *q, struct bio *bio) |
327 | { | 327 | { |
328 | struct block_device *bdev = bio->bi_bdev; | 328 | struct block_device *bdev = bio->bi_bdev; |
329 | struct brd_device *brd = bdev->bd_disk->private_data; | 329 | struct brd_device *brd = bdev->bd_disk->private_data; |
@@ -358,9 +358,10 @@ static void brd_make_request(struct request_queue *q, struct bio *bio) | |||
358 | 358 | ||
359 | out: | 359 | out: |
360 | bio_endio(bio); | 360 | bio_endio(bio); |
361 | return; | 361 | return BLK_QC_T_NONE; |
362 | io_error: | 362 | io_error: |
363 | bio_io_error(bio); | 363 | bio_io_error(bio); |
364 | return BLK_QC_T_NONE; | ||
364 | } | 365 | } |
365 | 366 | ||
366 | static int brd_rw_page(struct block_device *bdev, sector_t sector, | 367 | static int brd_rw_page(struct block_device *bdev, sector_t sector, |
diff --git a/drivers/block/drbd/drbd_int.h b/drivers/block/drbd/drbd_int.h index 015c6e91b756..e66d453a5f2b 100644 --- a/drivers/block/drbd/drbd_int.h +++ b/drivers/block/drbd/drbd_int.h | |||
@@ -1448,7 +1448,7 @@ extern int proc_details; | |||
1448 | /* drbd_req */ | 1448 | /* drbd_req */ |
1449 | extern void do_submit(struct work_struct *ws); | 1449 | extern void do_submit(struct work_struct *ws); |
1450 | extern void __drbd_make_request(struct drbd_device *, struct bio *, unsigned long); | 1450 | extern void __drbd_make_request(struct drbd_device *, struct bio *, unsigned long); |
1451 | extern void drbd_make_request(struct request_queue *q, struct bio *bio); | 1451 | extern blk_qc_t drbd_make_request(struct request_queue *q, struct bio *bio); |
1452 | extern int drbd_read_remote(struct drbd_device *device, struct drbd_request *req); | 1452 | extern int drbd_read_remote(struct drbd_device *device, struct drbd_request *req); |
1453 | extern int is_valid_ar_handle(struct drbd_request *, sector_t); | 1453 | extern int is_valid_ar_handle(struct drbd_request *, sector_t); |
1454 | 1454 | ||
diff --git a/drivers/block/drbd/drbd_req.c b/drivers/block/drbd/drbd_req.c index 211592682169..3ae2c0086563 100644 --- a/drivers/block/drbd/drbd_req.c +++ b/drivers/block/drbd/drbd_req.c | |||
@@ -1494,7 +1494,7 @@ void do_submit(struct work_struct *ws) | |||
1494 | } | 1494 | } |
1495 | } | 1495 | } |
1496 | 1496 | ||
1497 | void drbd_make_request(struct request_queue *q, struct bio *bio) | 1497 | blk_qc_t drbd_make_request(struct request_queue *q, struct bio *bio) |
1498 | { | 1498 | { |
1499 | struct drbd_device *device = (struct drbd_device *) q->queuedata; | 1499 | struct drbd_device *device = (struct drbd_device *) q->queuedata; |
1500 | unsigned long start_jif; | 1500 | unsigned long start_jif; |
@@ -1510,6 +1510,7 @@ void drbd_make_request(struct request_queue *q, struct bio *bio) | |||
1510 | 1510 | ||
1511 | inc_ap_bio(device); | 1511 | inc_ap_bio(device); |
1512 | __drbd_make_request(device, bio, start_jif); | 1512 | __drbd_make_request(device, bio, start_jif); |
1513 | return BLK_QC_T_NONE; | ||
1513 | } | 1514 | } |
1514 | 1515 | ||
1515 | void request_timer_fn(unsigned long data) | 1516 | void request_timer_fn(unsigned long data) |
diff --git a/drivers/block/null_blk.c b/drivers/block/null_blk.c index 1c9e4fe5aa44..6255d1c4bba4 100644 --- a/drivers/block/null_blk.c +++ b/drivers/block/null_blk.c | |||
@@ -321,7 +321,7 @@ static struct nullb_queue *nullb_to_queue(struct nullb *nullb) | |||
321 | return &nullb->queues[index]; | 321 | return &nullb->queues[index]; |
322 | } | 322 | } |
323 | 323 | ||
324 | static void null_queue_bio(struct request_queue *q, struct bio *bio) | 324 | static blk_qc_t null_queue_bio(struct request_queue *q, struct bio *bio) |
325 | { | 325 | { |
326 | struct nullb *nullb = q->queuedata; | 326 | struct nullb *nullb = q->queuedata; |
327 | struct nullb_queue *nq = nullb_to_queue(nullb); | 327 | struct nullb_queue *nq = nullb_to_queue(nullb); |
@@ -331,6 +331,7 @@ static void null_queue_bio(struct request_queue *q, struct bio *bio) | |||
331 | cmd->bio = bio; | 331 | cmd->bio = bio; |
332 | 332 | ||
333 | null_handle_cmd(cmd); | 333 | null_handle_cmd(cmd); |
334 | return BLK_QC_T_NONE; | ||
334 | } | 335 | } |
335 | 336 | ||
336 | static int null_rq_prep_fn(struct request_queue *q, struct request *req) | 337 | static int null_rq_prep_fn(struct request_queue *q, struct request *req) |
diff --git a/drivers/block/pktcdvd.c b/drivers/block/pktcdvd.c index 2f477d45d6cf..d06c62eccdf0 100644 --- a/drivers/block/pktcdvd.c +++ b/drivers/block/pktcdvd.c | |||
@@ -2441,7 +2441,7 @@ static void pkt_make_request_write(struct request_queue *q, struct bio *bio) | |||
2441 | } | 2441 | } |
2442 | } | 2442 | } |
2443 | 2443 | ||
2444 | static void pkt_make_request(struct request_queue *q, struct bio *bio) | 2444 | static blk_qc_t pkt_make_request(struct request_queue *q, struct bio *bio) |
2445 | { | 2445 | { |
2446 | struct pktcdvd_device *pd; | 2446 | struct pktcdvd_device *pd; |
2447 | char b[BDEVNAME_SIZE]; | 2447 | char b[BDEVNAME_SIZE]; |
@@ -2467,7 +2467,7 @@ static void pkt_make_request(struct request_queue *q, struct bio *bio) | |||
2467 | */ | 2467 | */ |
2468 | if (bio_data_dir(bio) == READ) { | 2468 | if (bio_data_dir(bio) == READ) { |
2469 | pkt_make_request_read(pd, bio); | 2469 | pkt_make_request_read(pd, bio); |
2470 | return; | 2470 | return BLK_QC_T_NONE; |
2471 | } | 2471 | } |
2472 | 2472 | ||
2473 | if (!test_bit(PACKET_WRITABLE, &pd->flags)) { | 2473 | if (!test_bit(PACKET_WRITABLE, &pd->flags)) { |
@@ -2499,13 +2499,12 @@ static void pkt_make_request(struct request_queue *q, struct bio *bio) | |||
2499 | pkt_make_request_write(q, split); | 2499 | pkt_make_request_write(q, split); |
2500 | } while (split != bio); | 2500 | } while (split != bio); |
2501 | 2501 | ||
2502 | return; | 2502 | return BLK_QC_T_NONE; |
2503 | end_io: | 2503 | end_io: |
2504 | bio_io_error(bio); | 2504 | bio_io_error(bio); |
2505 | return BLK_QC_T_NONE; | ||
2505 | } | 2506 | } |
2506 | 2507 | ||
2507 | |||
2508 | |||
2509 | static void pkt_init_queue(struct pktcdvd_device *pd) | 2508 | static void pkt_init_queue(struct pktcdvd_device *pd) |
2510 | { | 2509 | { |
2511 | struct request_queue *q = pd->disk->queue; | 2510 | struct request_queue *q = pd->disk->queue; |
diff --git a/drivers/block/ps3vram.c b/drivers/block/ps3vram.c index d89fcac59515..56847fcda086 100644 --- a/drivers/block/ps3vram.c +++ b/drivers/block/ps3vram.c | |||
@@ -598,7 +598,7 @@ out: | |||
598 | return next; | 598 | return next; |
599 | } | 599 | } |
600 | 600 | ||
601 | static void ps3vram_make_request(struct request_queue *q, struct bio *bio) | 601 | static blk_qc_t ps3vram_make_request(struct request_queue *q, struct bio *bio) |
602 | { | 602 | { |
603 | struct ps3_system_bus_device *dev = q->queuedata; | 603 | struct ps3_system_bus_device *dev = q->queuedata; |
604 | struct ps3vram_priv *priv = ps3_system_bus_get_drvdata(dev); | 604 | struct ps3vram_priv *priv = ps3_system_bus_get_drvdata(dev); |
@@ -614,11 +614,13 @@ static void ps3vram_make_request(struct request_queue *q, struct bio *bio) | |||
614 | spin_unlock_irq(&priv->lock); | 614 | spin_unlock_irq(&priv->lock); |
615 | 615 | ||
616 | if (busy) | 616 | if (busy) |
617 | return; | 617 | return BLK_QC_T_NONE; |
618 | 618 | ||
619 | do { | 619 | do { |
620 | bio = ps3vram_do_bio(dev, bio); | 620 | bio = ps3vram_do_bio(dev, bio); |
621 | } while (bio); | 621 | } while (bio); |
622 | |||
623 | return BLK_QC_T_NONE; | ||
622 | } | 624 | } |
623 | 625 | ||
624 | static int ps3vram_probe(struct ps3_system_bus_device *dev) | 626 | static int ps3vram_probe(struct ps3_system_bus_device *dev) |
diff --git a/drivers/block/rsxx/dev.c b/drivers/block/rsxx/dev.c index 3163e4cdc2cc..e1b8b7061d2f 100644 --- a/drivers/block/rsxx/dev.c +++ b/drivers/block/rsxx/dev.c | |||
@@ -145,7 +145,7 @@ static void bio_dma_done_cb(struct rsxx_cardinfo *card, | |||
145 | } | 145 | } |
146 | } | 146 | } |
147 | 147 | ||
148 | static void rsxx_make_request(struct request_queue *q, struct bio *bio) | 148 | static blk_qc_t rsxx_make_request(struct request_queue *q, struct bio *bio) |
149 | { | 149 | { |
150 | struct rsxx_cardinfo *card = q->queuedata; | 150 | struct rsxx_cardinfo *card = q->queuedata; |
151 | struct rsxx_bio_meta *bio_meta; | 151 | struct rsxx_bio_meta *bio_meta; |
@@ -199,7 +199,7 @@ static void rsxx_make_request(struct request_queue *q, struct bio *bio) | |||
199 | if (st) | 199 | if (st) |
200 | goto queue_err; | 200 | goto queue_err; |
201 | 201 | ||
202 | return; | 202 | return BLK_QC_T_NONE; |
203 | 203 | ||
204 | queue_err: | 204 | queue_err: |
205 | kmem_cache_free(bio_meta_pool, bio_meta); | 205 | kmem_cache_free(bio_meta_pool, bio_meta); |
@@ -207,6 +207,7 @@ req_err: | |||
207 | if (st) | 207 | if (st) |
208 | bio->bi_error = st; | 208 | bio->bi_error = st; |
209 | bio_endio(bio); | 209 | bio_endio(bio); |
210 | return BLK_QC_T_NONE; | ||
210 | } | 211 | } |
211 | 212 | ||
212 | /*----------------- Device Setup -------------------*/ | 213 | /*----------------- Device Setup -------------------*/ |
diff --git a/drivers/block/umem.c b/drivers/block/umem.c index 04d65790a886..7939b9f87441 100644 --- a/drivers/block/umem.c +++ b/drivers/block/umem.c | |||
@@ -524,7 +524,7 @@ static int mm_check_plugged(struct cardinfo *card) | |||
524 | return !!blk_check_plugged(mm_unplug, card, sizeof(struct blk_plug_cb)); | 524 | return !!blk_check_plugged(mm_unplug, card, sizeof(struct blk_plug_cb)); |
525 | } | 525 | } |
526 | 526 | ||
527 | static void mm_make_request(struct request_queue *q, struct bio *bio) | 527 | static blk_qc_t mm_make_request(struct request_queue *q, struct bio *bio) |
528 | { | 528 | { |
529 | struct cardinfo *card = q->queuedata; | 529 | struct cardinfo *card = q->queuedata; |
530 | pr_debug("mm_make_request %llu %u\n", | 530 | pr_debug("mm_make_request %llu %u\n", |
@@ -541,7 +541,7 @@ static void mm_make_request(struct request_queue *q, struct bio *bio) | |||
541 | activate(card); | 541 | activate(card); |
542 | spin_unlock_irq(&card->lock); | 542 | spin_unlock_irq(&card->lock); |
543 | 543 | ||
544 | return; | 544 | return BLK_QC_T_NONE; |
545 | } | 545 | } |
546 | 546 | ||
547 | static irqreturn_t mm_interrupt(int irq, void *__card) | 547 | static irqreturn_t mm_interrupt(int irq, void *__card) |
diff --git a/drivers/block/zram/zram_drv.c b/drivers/block/zram/zram_drv.c index 81a557c33a1f..47915d736f8d 100644 --- a/drivers/block/zram/zram_drv.c +++ b/drivers/block/zram/zram_drv.c | |||
@@ -894,7 +894,7 @@ out: | |||
894 | /* | 894 | /* |
895 | * Handler function for all zram I/O requests. | 895 | * Handler function for all zram I/O requests. |
896 | */ | 896 | */ |
897 | static void zram_make_request(struct request_queue *queue, struct bio *bio) | 897 | static blk_qc_t zram_make_request(struct request_queue *queue, struct bio *bio) |
898 | { | 898 | { |
899 | struct zram *zram = queue->queuedata; | 899 | struct zram *zram = queue->queuedata; |
900 | 900 | ||
@@ -911,11 +911,12 @@ static void zram_make_request(struct request_queue *queue, struct bio *bio) | |||
911 | 911 | ||
912 | __zram_make_request(zram, bio); | 912 | __zram_make_request(zram, bio); |
913 | zram_meta_put(zram); | 913 | zram_meta_put(zram); |
914 | return; | 914 | return BLK_QC_T_NONE; |
915 | put_zram: | 915 | put_zram: |
916 | zram_meta_put(zram); | 916 | zram_meta_put(zram); |
917 | error: | 917 | error: |
918 | bio_io_error(bio); | 918 | bio_io_error(bio); |
919 | return BLK_QC_T_NONE; | ||
919 | } | 920 | } |
920 | 921 | ||
921 | static void zram_slot_free_notify(struct block_device *bdev, | 922 | static void zram_slot_free_notify(struct block_device *bdev, |