summaryrefslogtreecommitdiffstats
path: root/drivers/md/dm-raid1.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/md/dm-raid1.c')
-rw-r--r--drivers/md/dm-raid1.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/drivers/md/dm-raid1.c b/drivers/md/dm-raid1.c
index 77bcf50ce75f..0822e4a6f67d 100644
--- a/drivers/md/dm-raid1.c
+++ b/drivers/md/dm-raid1.c
@@ -490,9 +490,9 @@ static void hold_bio(struct mirror_set *ms, struct bio *bio)
490 * If device is suspended, complete the bio. 490 * If device is suspended, complete the bio.
491 */ 491 */
492 if (dm_noflush_suspending(ms->ti)) 492 if (dm_noflush_suspending(ms->ti))
493 bio->bi_error = DM_ENDIO_REQUEUE; 493 bio->bi_status = BLK_STS_DM_REQUEUE;
494 else 494 else
495 bio->bi_error = -EIO; 495 bio->bi_status = BLK_STS_IOERR;
496 496
497 bio_endio(bio); 497 bio_endio(bio);
498 return; 498 return;
@@ -626,7 +626,7 @@ static void write_callback(unsigned long error, void *context)
626 * degrade the array. 626 * degrade the array.
627 */ 627 */
628 if (bio_op(bio) == REQ_OP_DISCARD) { 628 if (bio_op(bio) == REQ_OP_DISCARD) {
629 bio->bi_error = -EOPNOTSUPP; 629 bio->bi_status = BLK_STS_NOTSUPP;
630 bio_endio(bio); 630 bio_endio(bio);
631 return; 631 return;
632 } 632 }
@@ -1236,7 +1236,8 @@ static int mirror_map(struct dm_target *ti, struct bio *bio)
1236 return DM_MAPIO_REMAPPED; 1236 return DM_MAPIO_REMAPPED;
1237} 1237}
1238 1238
1239static int mirror_end_io(struct dm_target *ti, struct bio *bio, int *error) 1239static int mirror_end_io(struct dm_target *ti, struct bio *bio,
1240 blk_status_t *error)
1240{ 1241{
1241 int rw = bio_data_dir(bio); 1242 int rw = bio_data_dir(bio);
1242 struct mirror_set *ms = (struct mirror_set *) ti->private; 1243 struct mirror_set *ms = (struct mirror_set *) ti->private;
@@ -1255,7 +1256,7 @@ static int mirror_end_io(struct dm_target *ti, struct bio *bio, int *error)
1255 return DM_ENDIO_DONE; 1256 return DM_ENDIO_DONE;
1256 } 1257 }
1257 1258
1258 if (*error == -EOPNOTSUPP) 1259 if (*error == BLK_STS_NOTSUPP)
1259 return DM_ENDIO_DONE; 1260 return DM_ENDIO_DONE;
1260 1261
1261 if (bio->bi_opf & REQ_RAHEAD) 1262 if (bio->bi_opf & REQ_RAHEAD)
@@ -1277,7 +1278,7 @@ static int mirror_end_io(struct dm_target *ti, struct bio *bio, int *error)
1277 bd = &bio_record->details; 1278 bd = &bio_record->details;
1278 1279
1279 dm_bio_restore(bd, bio); 1280 dm_bio_restore(bd, bio);
1280 bio->bi_error = 0; 1281 bio->bi_status = 0;
1281 1282
1282 queue_bio(ms, bio, rw); 1283 queue_bio(ms, bio, rw);
1283 return DM_ENDIO_INCOMPLETE; 1284 return DM_ENDIO_INCOMPLETE;