diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2015-02-12 17:13:23 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-02-12 17:13:23 -0500 |
commit | 3e12cefbe143b4947171ff92dd50024c4841e291 (patch) | |
tree | f58ec23a4092576ed08843cca5f5443a32106bd1 /drivers/block | |
parent | 6bec0035286119eefc32a5b1102127e6a4032cb2 (diff) | |
parent | d427e3c82ef4fc5fbb22c0cef0b040e6767b1028 (diff) |
Merge branch 'for-3.20/core' of git://git.kernel.dk/linux-block
Pull core block IO changes from Jens Axboe:
"This contains:
- A series from Christoph that cleans up and refactors various parts
of the REQ_BLOCK_PC handling. Contributions in that series from
Dongsu Park and Kent Overstreet as well.
- CFQ:
- A bug fix for cfq for realtime IO scheduling from Jeff Moyer.
- A stable patch fixing a potential crash in CFQ in OOM
situations. From Konstantin Khlebnikov.
- blk-mq:
- Add support for tag allocation policies, from Shaohua. This is
a prep patch enabling libata (and other SCSI parts) to use the
blk-mq tagging, instead of rolling their own.
- Various little tweaks from Keith and Mike, in preparation for
DM blk-mq support.
- Minor little fixes or tweaks from me.
- A double free error fix from Tony Battersby.
- The partition 4k issue fixes from Matthew and Boaz.
- Add support for zero+unprovision for blkdev_issue_zeroout() from
Martin"
* 'for-3.20/core' of git://git.kernel.dk/linux-block: (27 commits)
block: remove unused function blk_bio_map_sg
block: handle the null_mapped flag correctly in blk_rq_map_user_iov
blk-mq: fix double-free in error path
block: prevent request-to-request merging with gaps if not allowed
blk-mq: make blk_mq_run_queues() static
dm: fix multipath regression due to initializing wrong request
cfq-iosched: handle failure of cfq group allocation
block: Quiesce zeroout wrapper
block: rewrite and split __bio_copy_iov()
block: merge __bio_map_user_iov into bio_map_user_iov
block: merge __bio_map_kern into bio_map_kern
block: pass iov_iter to the BLOCK_PC mapping functions
block: add a helper to free bio bounce buffer pages
block: use blk_rq_map_user_iov to implement blk_rq_map_user
block: simplify bio_map_kern
block: mark blk-mq devices as stackable
block: keep established cmd_flags when cloning into a blk-mq request
block: add blk-mq support to blk_insert_cloned_request()
block: require blk_rq_prep_clone() be given an initialized clone request
blk-mq: add tag allocation policy
...
Diffstat (limited to 'drivers/block')
-rw-r--r-- | drivers/block/brd.c | 14 | ||||
-rw-r--r-- | drivers/block/drbd/drbd_receiver.c | 2 | ||||
-rw-r--r-- | drivers/block/osdblk.c | 2 |
3 files changed, 9 insertions, 9 deletions
diff --git a/drivers/block/brd.c b/drivers/block/brd.c index 3598110d2cef..89e90ec52f28 100644 --- a/drivers/block/brd.c +++ b/drivers/block/brd.c | |||
@@ -370,25 +370,25 @@ static int brd_rw_page(struct block_device *bdev, sector_t sector, | |||
370 | } | 370 | } |
371 | 371 | ||
372 | #ifdef CONFIG_BLK_DEV_XIP | 372 | #ifdef CONFIG_BLK_DEV_XIP |
373 | static int brd_direct_access(struct block_device *bdev, sector_t sector, | 373 | static long brd_direct_access(struct block_device *bdev, sector_t sector, |
374 | void **kaddr, unsigned long *pfn) | 374 | void **kaddr, unsigned long *pfn, long size) |
375 | { | 375 | { |
376 | struct brd_device *brd = bdev->bd_disk->private_data; | 376 | struct brd_device *brd = bdev->bd_disk->private_data; |
377 | struct page *page; | 377 | struct page *page; |
378 | 378 | ||
379 | if (!brd) | 379 | if (!brd) |
380 | return -ENODEV; | 380 | return -ENODEV; |
381 | if (sector & (PAGE_SECTORS-1)) | ||
382 | return -EINVAL; | ||
383 | if (sector + PAGE_SECTORS > get_capacity(bdev->bd_disk)) | ||
384 | return -ERANGE; | ||
385 | page = brd_insert_page(brd, sector); | 381 | page = brd_insert_page(brd, sector); |
386 | if (!page) | 382 | if (!page) |
387 | return -ENOSPC; | 383 | return -ENOSPC; |
388 | *kaddr = page_address(page); | 384 | *kaddr = page_address(page); |
389 | *pfn = page_to_pfn(page); | 385 | *pfn = page_to_pfn(page); |
390 | 386 | ||
391 | return 0; | 387 | /* |
388 | * TODO: If size > PAGE_SIZE, we could look to see if the next page in | ||
389 | * the file happens to be mapped to the next page of physical RAM. | ||
390 | */ | ||
391 | return PAGE_SIZE; | ||
392 | } | 392 | } |
393 | #endif | 393 | #endif |
394 | 394 | ||
diff --git a/drivers/block/drbd/drbd_receiver.c b/drivers/block/drbd/drbd_receiver.c index d169b4a79267..cee20354ac37 100644 --- a/drivers/block/drbd/drbd_receiver.c +++ b/drivers/block/drbd/drbd_receiver.c | |||
@@ -1388,7 +1388,7 @@ int drbd_submit_peer_request(struct drbd_device *device, | |||
1388 | list_add_tail(&peer_req->w.list, &device->active_ee); | 1388 | list_add_tail(&peer_req->w.list, &device->active_ee); |
1389 | spin_unlock_irq(&device->resource->req_lock); | 1389 | spin_unlock_irq(&device->resource->req_lock); |
1390 | if (blkdev_issue_zeroout(device->ldev->backing_bdev, | 1390 | if (blkdev_issue_zeroout(device->ldev->backing_bdev, |
1391 | sector, data_size >> 9, GFP_NOIO)) | 1391 | sector, data_size >> 9, GFP_NOIO, false)) |
1392 | peer_req->flags |= EE_WAS_ERROR; | 1392 | peer_req->flags |= EE_WAS_ERROR; |
1393 | drbd_endio_write_sec_final(peer_req); | 1393 | drbd_endio_write_sec_final(peer_req); |
1394 | return 0; | 1394 | return 0; |
diff --git a/drivers/block/osdblk.c b/drivers/block/osdblk.c index 79aa179305b5..e22942596207 100644 --- a/drivers/block/osdblk.c +++ b/drivers/block/osdblk.c | |||
@@ -423,7 +423,7 @@ static int osdblk_init_disk(struct osdblk_device *osdev) | |||
423 | } | 423 | } |
424 | 424 | ||
425 | /* switch queue to TCQ mode; allocate tag map */ | 425 | /* switch queue to TCQ mode; allocate tag map */ |
426 | rc = blk_queue_init_tags(q, OSDBLK_MAX_REQ, NULL); | 426 | rc = blk_queue_init_tags(q, OSDBLK_MAX_REQ, NULL, BLK_TAG_ALLOC_FIFO); |
427 | if (rc) { | 427 | if (rc) { |
428 | blk_cleanup_queue(q); | 428 | blk_cleanup_queue(q); |
429 | put_disk(disk); | 429 | put_disk(disk); |