@@ -790,7 +790,7 @@ static void cached_dev_read_error(struct closure *cl)
/* Retry from the backing device: */
trace_bcache_read_retry(s->orig_bio);
- s->iop.status = 0;
+ s->iop.status = BLK_STS_OK;
do_bio_hook(s, s->orig_bio, backing_request_endio);
/* XXX: invalidate cache */
@@ -684,7 +684,7 @@ static void hydration_init(struct dm_clone_region_hydration *hd, unsigned long r
hd->region_nr = region_nr;
hd->overwrite_bio = NULL;
bio_list_init(&hd->deferred_bios);
- hd->status = 0;
+ hd->status = BLK_STS_OK;
INIT_LIST_HEAD(&hd->list);
INIT_HLIST_NODE(&hd->h);
@@ -1848,7 +1848,7 @@ static int dm_integrity_map(struct dm_target *ti, struct bio *bio)
sector_t area, offset;
dio->ic = ic;
- dio->bi_status = 0;
+ dio->bi_status = BLK_STS_OK;
dio->op = bio_op(bio);
if (unlikely(dio->op == REQ_OP_DISCARD)) {
@@ -648,7 +648,7 @@ static int __multipath_map_bio(struct multipath *m, struct bio *bio,
mpio->pgpath = pgpath;
- bio->bi_status = 0;
+ bio->bi_status = BLK_STS_OK;
bio_set_dev(bio, pgpath->path.dev->bdev);
bio->bi_opf |= REQ_FAILFAST_TRANSPORT;
@@ -1283,7 +1283,7 @@ static int mirror_end_io(struct dm_target *ti, struct bio *bio,
dm_bio_restore(bd, bio);
bio_record->details.bi_bdev = NULL;
- bio->bi_status = 0;
+ bio->bi_status = BLK_STS_OK;
queue_bio(ms, bio, rw);
return DM_ENDIO_INCOMPLETE;
@@ -649,7 +649,7 @@ static struct dm_io *alloc_io(struct mapped_device *md, struct bio *bio)
io = container_of(tio, struct dm_io, tio);
io->magic = DM_IO_MAGIC;
- io->status = 0;
+ io->status = BLK_STS_OK;
atomic_set(&io->io_count, 1);
io->orig_bio = bio;
io->md = md;
@@ -2081,7 +2081,7 @@ static int fix_sync_read_error(struct r1bio *r1_bio)
idx ++;
}
set_bit(R1BIO_Uptodate, &r1_bio->state);
- bio->bi_status = 0;
+ bio->bi_status = BLK_STS_OK;
return 1;
}
@@ -2144,7 +2144,7 @@ static void process_checks(struct r1bio *r1_bio)
if (sbio->bi_end_io != end_sync_read)
continue;
/* Now we can 'fixup' the error value */
- sbio->bi_status = 0;
+ sbio->bi_status = BLK_STS_OK;
bio_for_each_segment_all(bi, sbio, iter_all)
page_len[j++] = bi->bv_len;
@@ -3797,7 +3797,7 @@ static sector_t raid10_sync_request(struct mddev *mddev, sector_t sector_nr,
if (bio->bi_end_io == end_sync_read) {
md_sync_acct_bio(bio, nr_sectors);
- bio->bi_status = 0;
+ bio->bi_status = BLK_STS_OK;
submit_bio_noacct(bio);
}
}
When setting io status, sometimes it uses BLK_STS_*, sometimes, it uses hardcode 0. Use the macro to replace hardcode in multiple places. Signed-off-by: Xianting Tian <xianting.tian@linux.alibaba.com> --- drivers/md/bcache/request.c | 2 +- drivers/md/dm-clone-target.c | 2 +- drivers/md/dm-integrity.c | 2 +- drivers/md/dm-mpath.c | 2 +- drivers/md/dm-raid1.c | 2 +- drivers/md/dm.c | 2 +- drivers/md/raid1.c | 4 ++-- drivers/md/raid10.c | 2 +- 8 files changed, 9 insertions(+), 9 deletions(-)