diff options
Diffstat (limited to 'drivers/md/faulty.c')
-rw-r--r-- | drivers/md/faulty.c | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/drivers/md/faulty.c b/drivers/md/faulty.c index 3193aefe982b..e8b4574956c7 100644 --- a/drivers/md/faulty.c +++ b/drivers/md/faulty.c | |||
@@ -74,8 +74,8 @@ static void faulty_fail(struct bio *bio, int error) | |||
74 | { | 74 | { |
75 | struct bio *b = bio->bi_private; | 75 | struct bio *b = bio->bi_private; |
76 | 76 | ||
77 | b->bi_size = bio->bi_size; | 77 | b->bi_iter.bi_size = bio->bi_iter.bi_size; |
78 | b->bi_sector = bio->bi_sector; | 78 | b->bi_iter.bi_sector = bio->bi_iter.bi_sector; |
79 | 79 | ||
80 | bio_put(bio); | 80 | bio_put(bio); |
81 | 81 | ||
@@ -185,26 +185,31 @@ static void make_request(struct mddev *mddev, struct bio *bio) | |||
185 | return; | 185 | return; |
186 | } | 186 | } |
187 | 187 | ||
188 | if (check_sector(conf, bio->bi_sector, bio_end_sector(bio), WRITE)) | 188 | if (check_sector(conf, bio->bi_iter.bi_sector, |
189 | bio_end_sector(bio), WRITE)) | ||
189 | failit = 1; | 190 | failit = 1; |
190 | if (check_mode(conf, WritePersistent)) { | 191 | if (check_mode(conf, WritePersistent)) { |
191 | add_sector(conf, bio->bi_sector, WritePersistent); | 192 | add_sector(conf, bio->bi_iter.bi_sector, |
193 | WritePersistent); | ||
192 | failit = 1; | 194 | failit = 1; |
193 | } | 195 | } |
194 | if (check_mode(conf, WriteTransient)) | 196 | if (check_mode(conf, WriteTransient)) |
195 | failit = 1; | 197 | failit = 1; |
196 | } else { | 198 | } else { |
197 | /* read request */ | 199 | /* read request */ |
198 | if (check_sector(conf, bio->bi_sector, bio_end_sector(bio), READ)) | 200 | if (check_sector(conf, bio->bi_iter.bi_sector, |
201 | bio_end_sector(bio), READ)) | ||
199 | failit = 1; | 202 | failit = 1; |
200 | if (check_mode(conf, ReadTransient)) | 203 | if (check_mode(conf, ReadTransient)) |
201 | failit = 1; | 204 | failit = 1; |
202 | if (check_mode(conf, ReadPersistent)) { | 205 | if (check_mode(conf, ReadPersistent)) { |
203 | add_sector(conf, bio->bi_sector, ReadPersistent); | 206 | add_sector(conf, bio->bi_iter.bi_sector, |
207 | ReadPersistent); | ||
204 | failit = 1; | 208 | failit = 1; |
205 | } | 209 | } |
206 | if (check_mode(conf, ReadFixable)) { | 210 | if (check_mode(conf, ReadFixable)) { |
207 | add_sector(conf, bio->bi_sector, ReadFixable); | 211 | add_sector(conf, bio->bi_iter.bi_sector, |
212 | ReadFixable); | ||
208 | failit = 1; | 213 | failit = 1; |
209 | } | 214 | } |
210 | } | 215 | } |