diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-01-30 14:19:05 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-01-30 14:19:05 -0500 |
commit | f568849edac8611d603e00bd6cbbcfea09395ae6 (patch) | |
tree | b9472d640fe5d87426d38c9d81d946cf197ad3fb /arch/powerpc/sysdev | |
parent | d9894c228b11273e720bb63ba120d1d326fe9d94 (diff) | |
parent | 675675ada486dde5bf9aa51665e90706bff11a35 (diff) |
Merge branch 'for-3.14/core' of git://git.kernel.dk/linux-block
Pull core block IO changes from Jens Axboe:
"The major piece in here is the immutable bio_ve series from Kent, the
rest is fairly minor. It was supposed to go in last round, but
various issues pushed it to this release instead. The pull request
contains:
- Various smaller blk-mq fixes from different folks. Nothing major
here, just minor fixes and cleanups.
- Fix for a memory leak in the error path in the block ioctl code
from Christian Engelmayer.
- Header export fix from CaiZhiyong.
- Finally the immutable biovec changes from Kent Overstreet. This
enables some nice future work on making arbitrarily sized bios
possible, and splitting more efficient. Related fixes to immutable
bio_vecs:
- dm-cache immutable fixup from Mike Snitzer.
- btrfs immutable fixup from Muthu Kumar.
- bio-integrity fix from Nic Bellinger, which is also going to stable"
* 'for-3.14/core' of git://git.kernel.dk/linux-block: (44 commits)
xtensa: fixup simdisk driver to work with immutable bio_vecs
block/blk-mq-cpu.c: use hotcpu_notifier()
blk-mq: for_each_* macro correctness
block: Fix memory leak in rw_copy_check_uvector() handling
bio-integrity: Fix bio_integrity_verify segment start bug
block: remove unrelated header files and export symbol
blk-mq: uses page->list incorrectly
blk-mq: use __smp_call_function_single directly
btrfs: fix missing increment of bi_remaining
Revert "block: Warn and free bio if bi_end_io is not set"
block: Warn and free bio if bi_end_io is not set
blk-mq: fix initializing request's start time
block: blk-mq: don't export blk_mq_free_queue()
block: blk-mq: make blk_sync_queue support mq
block: blk-mq: support draining mq queue
dm cache: increment bi_remaining when bi_end_io is restored
block: fixup for generic bio chaining
block: Really silence spurious compiler warnings
block: Silence spurious compiler warnings
block: Kill bio_pair_split()
...
Diffstat (limited to 'arch/powerpc/sysdev')
-rw-r--r-- | arch/powerpc/sysdev/axonram.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/arch/powerpc/sysdev/axonram.c b/arch/powerpc/sysdev/axonram.c index 1c16141c031c..47b6b9f81d43 100644 --- a/arch/powerpc/sysdev/axonram.c +++ b/arch/powerpc/sysdev/axonram.c | |||
@@ -109,27 +109,28 @@ axon_ram_make_request(struct request_queue *queue, struct bio *bio) | |||
109 | struct axon_ram_bank *bank = bio->bi_bdev->bd_disk->private_data; | 109 | struct axon_ram_bank *bank = bio->bi_bdev->bd_disk->private_data; |
110 | unsigned long phys_mem, phys_end; | 110 | unsigned long phys_mem, phys_end; |
111 | void *user_mem; | 111 | void *user_mem; |
112 | struct bio_vec *vec; | 112 | struct bio_vec vec; |
113 | unsigned int transfered; | 113 | unsigned int transfered; |
114 | unsigned short idx; | 114 | struct bvec_iter iter; |
115 | 115 | ||
116 | phys_mem = bank->io_addr + (bio->bi_sector << AXON_RAM_SECTOR_SHIFT); | 116 | phys_mem = bank->io_addr + (bio->bi_iter.bi_sector << |
117 | AXON_RAM_SECTOR_SHIFT); | ||
117 | phys_end = bank->io_addr + bank->size; | 118 | phys_end = bank->io_addr + bank->size; |
118 | transfered = 0; | 119 | transfered = 0; |
119 | bio_for_each_segment(vec, bio, idx) { | 120 | bio_for_each_segment(vec, bio, iter) { |
120 | if (unlikely(phys_mem + vec->bv_len > phys_end)) { | 121 | if (unlikely(phys_mem + vec.bv_len > phys_end)) { |
121 | bio_io_error(bio); | 122 | bio_io_error(bio); |
122 | return; | 123 | return; |
123 | } | 124 | } |
124 | 125 | ||
125 | user_mem = page_address(vec->bv_page) + vec->bv_offset; | 126 | user_mem = page_address(vec.bv_page) + vec.bv_offset; |
126 | if (bio_data_dir(bio) == READ) | 127 | if (bio_data_dir(bio) == READ) |
127 | memcpy(user_mem, (void *) phys_mem, vec->bv_len); | 128 | memcpy(user_mem, (void *) phys_mem, vec.bv_len); |
128 | else | 129 | else |
129 | memcpy((void *) phys_mem, user_mem, vec->bv_len); | 130 | memcpy((void *) phys_mem, user_mem, vec.bv_len); |
130 | 131 | ||
131 | phys_mem += vec->bv_len; | 132 | phys_mem += vec.bv_len; |
132 | transfered += vec->bv_len; | 133 | transfered += vec.bv_len; |
133 | } | 134 | } |
134 | bio_endio(bio, 0); | 135 | bio_endio(bio, 0); |
135 | } | 136 | } |