aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/bcache/request.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/md/bcache/request.c')
-rw-r--r--drivers/md/bcache/request.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/drivers/md/bcache/request.c b/drivers/md/bcache/request.c
index 47a9bbc75124..4c0a422fd49f 100644
--- a/drivers/md/bcache/request.c
+++ b/drivers/md/bcache/request.c
@@ -198,14 +198,14 @@ static bool verify(struct cached_dev *dc, struct bio *bio)
198 198
199static void bio_csum(struct bio *bio, struct bkey *k) 199static void bio_csum(struct bio *bio, struct bkey *k)
200{ 200{
201 struct bio_vec *bv; 201 struct bio_vec bv;
202 struct bvec_iter iter;
202 uint64_t csum = 0; 203 uint64_t csum = 0;
203 int i;
204 204
205 bio_for_each_segment(bv, bio, i) { 205 bio_for_each_segment(bv, bio, iter) {
206 void *d = kmap(bv->bv_page) + bv->bv_offset; 206 void *d = kmap(bv.bv_page) + bv.bv_offset;
207 csum = bch_crc64_update(csum, d, bv->bv_len); 207 csum = bch_crc64_update(csum, d, bv.bv_len);
208 kunmap(bv->bv_page); 208 kunmap(bv.bv_page);
209 } 209 }
210 210
211 k->ptr[KEY_PTRS(k)] = csum & (~0ULL >> 1); 211 k->ptr[KEY_PTRS(k)] = csum & (~0ULL >> 1);
@@ -1182,17 +1182,17 @@ void bch_cached_dev_request_init(struct cached_dev *dc)
1182static int flash_dev_cache_miss(struct btree *b, struct search *s, 1182static int flash_dev_cache_miss(struct btree *b, struct search *s,
1183 struct bio *bio, unsigned sectors) 1183 struct bio *bio, unsigned sectors)
1184{ 1184{
1185 struct bio_vec *bv; 1185 struct bio_vec bv;
1186 int i; 1186 struct bvec_iter iter;
1187 1187
1188 /* Zero fill bio */ 1188 /* Zero fill bio */
1189 1189
1190 bio_for_each_segment(bv, bio, i) { 1190 bio_for_each_segment(bv, bio, iter) {
1191 unsigned j = min(bv->bv_len >> 9, sectors); 1191 unsigned j = min(bv.bv_len >> 9, sectors);
1192 1192
1193 void *p = kmap(bv->bv_page); 1193 void *p = kmap(bv.bv_page);
1194 memset(p + bv->bv_offset, 0, j << 9); 1194 memset(p + bv.bv_offset, 0, j << 9);
1195 kunmap(bv->bv_page); 1195 kunmap(bv.bv_page);
1196 1196
1197 sectors -= j; 1197 sectors -= j;
1198 } 1198 }