aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-01-30 14:19:05 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2014-01-30 14:19:05 -0500
commitf568849edac8611d603e00bd6cbbcfea09395ae6 (patch)
treeb9472d640fe5d87426d38c9d81d946cf197ad3fb /arch
parentd9894c228b11273e720bb63ba120d1d326fe9d94 (diff)
parent675675ada486dde5bf9aa51665e90706bff11a35 (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')
-rw-r--r--arch/m68k/emu/nfblock.c13
-rw-r--r--arch/powerpc/sysdev/axonram.c21
-rw-r--r--arch/xtensa/platforms/iss/simdisk.c14
3 files changed, 25 insertions, 23 deletions
diff --git a/arch/m68k/emu/nfblock.c b/arch/m68k/emu/nfblock.c
index 0721858fbd1e..2d75ae246167 100644
--- a/arch/m68k/emu/nfblock.c
+++ b/arch/m68k/emu/nfblock.c
@@ -62,17 +62,18 @@ struct nfhd_device {
62static void nfhd_make_request(struct request_queue *queue, struct bio *bio) 62static void nfhd_make_request(struct request_queue *queue, struct bio *bio)
63{ 63{
64 struct nfhd_device *dev = queue->queuedata; 64 struct nfhd_device *dev = queue->queuedata;
65 struct bio_vec *bvec; 65 struct bio_vec bvec;
66 int i, dir, len, shift; 66 struct bvec_iter iter;
67 sector_t sec = bio->bi_sector; 67 int dir, len, shift;
68 sector_t sec = bio->bi_iter.bi_sector;
68 69
69 dir = bio_data_dir(bio); 70 dir = bio_data_dir(bio);
70 shift = dev->bshift; 71 shift = dev->bshift;
71 bio_for_each_segment(bvec, bio, i) { 72 bio_for_each_segment(bvec, bio, iter) {
72 len = bvec->bv_len; 73 len = bvec.bv_len;
73 len >>= 9; 74 len >>= 9;
74 nfhd_read_write(dev->id, 0, dir, sec >> shift, len >> shift, 75 nfhd_read_write(dev->id, 0, dir, sec >> shift, len >> shift,
75 bvec_to_phys(bvec)); 76 bvec_to_phys(&bvec));
76 sec += len; 77 sec += len;
77 } 78 }
78 bio_endio(bio, 0); 79 bio_endio(bio, 0);
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}
diff --git a/arch/xtensa/platforms/iss/simdisk.c b/arch/xtensa/platforms/iss/simdisk.c
index 8c6e819cd8ed..48eebacdf5fe 100644
--- a/arch/xtensa/platforms/iss/simdisk.c
+++ b/arch/xtensa/platforms/iss/simdisk.c
@@ -103,18 +103,18 @@ static void simdisk_transfer(struct simdisk *dev, unsigned long sector,
103 103
104static int simdisk_xfer_bio(struct simdisk *dev, struct bio *bio) 104static int simdisk_xfer_bio(struct simdisk *dev, struct bio *bio)
105{ 105{
106 int i; 106 struct bio_vec bvec;
107 struct bio_vec *bvec; 107 struct bvec_iter iter;
108 sector_t sector = bio->bi_sector; 108 sector_t sector = bio->bi_iter.bi_sector;
109 109
110 bio_for_each_segment(bvec, bio, i) { 110 bio_for_each_segment(bvec, bio, iter) {
111 char *buffer = __bio_kmap_atomic(bio, i); 111 char *buffer = __bio_kmap_atomic(bio, iter);
112 unsigned len = bvec->bv_len >> SECTOR_SHIFT; 112 unsigned len = bvec.bv_len >> SECTOR_SHIFT;
113 113
114 simdisk_transfer(dev, sector, len, buffer, 114 simdisk_transfer(dev, sector, len, buffer,
115 bio_data_dir(bio) == WRITE); 115 bio_data_dir(bio) == WRITE);
116 sector += len; 116 sector += len;
117 __bio_kunmap_atomic(bio); 117 __bio_kunmap_atomic(buffer);
118 } 118 }
119 return 0; 119 return 0;
120} 120}