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/s390 | |
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/s390')
-rw-r--r-- | drivers/s390/block/dcssblk.c | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/drivers/s390/block/dcssblk.c b/drivers/s390/block/dcssblk.c index 7f900229404d..96128cb009f3 100644 --- a/drivers/s390/block/dcssblk.c +++ b/drivers/s390/block/dcssblk.c | |||
@@ -28,8 +28,8 @@ | |||
28 | static int dcssblk_open(struct block_device *bdev, fmode_t mode); | 28 | static int dcssblk_open(struct block_device *bdev, fmode_t mode); |
29 | static void dcssblk_release(struct gendisk *disk, fmode_t mode); | 29 | static void dcssblk_release(struct gendisk *disk, fmode_t mode); |
30 | static void dcssblk_make_request(struct request_queue *q, struct bio *bio); | 30 | static void dcssblk_make_request(struct request_queue *q, struct bio *bio); |
31 | static int dcssblk_direct_access(struct block_device *bdev, sector_t secnum, | 31 | static long dcssblk_direct_access(struct block_device *bdev, sector_t secnum, |
32 | void **kaddr, unsigned long *pfn); | 32 | void **kaddr, unsigned long *pfn, long size); |
33 | 33 | ||
34 | static char dcssblk_segments[DCSSBLK_PARM_LEN] = "\0"; | 34 | static char dcssblk_segments[DCSSBLK_PARM_LEN] = "\0"; |
35 | 35 | ||
@@ -877,25 +877,22 @@ fail: | |||
877 | bio_io_error(bio); | 877 | bio_io_error(bio); |
878 | } | 878 | } |
879 | 879 | ||
880 | static int | 880 | static long |
881 | dcssblk_direct_access (struct block_device *bdev, sector_t secnum, | 881 | dcssblk_direct_access (struct block_device *bdev, sector_t secnum, |
882 | void **kaddr, unsigned long *pfn) | 882 | void **kaddr, unsigned long *pfn, long size) |
883 | { | 883 | { |
884 | struct dcssblk_dev_info *dev_info; | 884 | struct dcssblk_dev_info *dev_info; |
885 | unsigned long pgoff; | 885 | unsigned long offset, dev_sz; |
886 | 886 | ||
887 | dev_info = bdev->bd_disk->private_data; | 887 | dev_info = bdev->bd_disk->private_data; |
888 | if (!dev_info) | 888 | if (!dev_info) |
889 | return -ENODEV; | 889 | return -ENODEV; |
890 | if (secnum % (PAGE_SIZE/512)) | 890 | dev_sz = dev_info->end - dev_info->start; |
891 | return -EINVAL; | 891 | offset = secnum * 512; |
892 | pgoff = secnum / (PAGE_SIZE / 512); | 892 | *kaddr = (void *) (dev_info->start + offset); |
893 | if ((pgoff+1)*PAGE_SIZE-1 > dev_info->end - dev_info->start) | ||
894 | return -ERANGE; | ||
895 | *kaddr = (void *) (dev_info->start+pgoff*PAGE_SIZE); | ||
896 | *pfn = virt_to_phys(*kaddr) >> PAGE_SHIFT; | 893 | *pfn = virt_to_phys(*kaddr) >> PAGE_SHIFT; |
897 | 894 | ||
898 | return 0; | 895 | return dev_sz - offset; |
899 | } | 896 | } |
900 | 897 | ||
901 | static void | 898 | static void |