diff options
Diffstat (limited to 'drivers/md/dm-flakey.c')
-rw-r--r-- | drivers/md/dm-flakey.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/md/dm-flakey.c b/drivers/md/dm-flakey.c index c80a0ec5f126..b257e46876d3 100644 --- a/drivers/md/dm-flakey.c +++ b/drivers/md/dm-flakey.c | |||
@@ -248,7 +248,8 @@ static void flakey_map_bio(struct dm_target *ti, struct bio *bio) | |||
248 | 248 | ||
249 | bio->bi_bdev = fc->dev->bdev; | 249 | bio->bi_bdev = fc->dev->bdev; |
250 | if (bio_sectors(bio)) | 250 | if (bio_sectors(bio)) |
251 | bio->bi_sector = flakey_map_sector(ti, bio->bi_sector); | 251 | bio->bi_iter.bi_sector = |
252 | flakey_map_sector(ti, bio->bi_iter.bi_sector); | ||
252 | } | 253 | } |
253 | 254 | ||
254 | static void corrupt_bio_data(struct bio *bio, struct flakey_c *fc) | 255 | static void corrupt_bio_data(struct bio *bio, struct flakey_c *fc) |
@@ -265,8 +266,8 @@ static void corrupt_bio_data(struct bio *bio, struct flakey_c *fc) | |||
265 | DMDEBUG("Corrupting data bio=%p by writing %u to byte %u " | 266 | DMDEBUG("Corrupting data bio=%p by writing %u to byte %u " |
266 | "(rw=%c bi_rw=%lu bi_sector=%llu cur_bytes=%u)\n", | 267 | "(rw=%c bi_rw=%lu bi_sector=%llu cur_bytes=%u)\n", |
267 | bio, fc->corrupt_bio_value, fc->corrupt_bio_byte, | 268 | bio, fc->corrupt_bio_value, fc->corrupt_bio_byte, |
268 | (bio_data_dir(bio) == WRITE) ? 'w' : 'r', | 269 | (bio_data_dir(bio) == WRITE) ? 'w' : 'r', bio->bi_rw, |
269 | bio->bi_rw, (unsigned long long)bio->bi_sector, bio_bytes); | 270 | (unsigned long long)bio->bi_iter.bi_sector, bio_bytes); |
270 | } | 271 | } |
271 | } | 272 | } |
272 | 273 | ||