block: switch bios to blk_status_t
Replace bi_error with a new bi_status to allow for a clear conversion. Note that device mapper overloaded bi_error with a private value, which we'll have to keep arround at least for now and thus propagate to a proper blk_status_t value. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jens Axboe <axboe@fb.com>
这个提交包含在:
@@ -296,8 +296,8 @@ void pblk_flush_writer(struct pblk *pblk)
|
||||
pr_err("pblk: tear down bio failed\n");
|
||||
}
|
||||
|
||||
if (bio->bi_error)
|
||||
pr_err("pblk: flush sync write failed (%u)\n", bio->bi_error);
|
||||
if (bio->bi_status)
|
||||
pr_err("pblk: flush sync write failed (%u)\n", bio->bi_status);
|
||||
|
||||
bio_put(bio);
|
||||
}
|
||||
|
@@ -114,7 +114,7 @@ static void pblk_end_io_read(struct nvm_rq *rqd)
|
||||
pblk_log_read_err(pblk, rqd);
|
||||
#ifdef CONFIG_NVM_DEBUG
|
||||
else
|
||||
WARN_ONCE(bio->bi_error, "pblk: corrupted read error\n");
|
||||
WARN_ONCE(bio->bi_status, "pblk: corrupted read error\n");
|
||||
#endif
|
||||
|
||||
if (rqd->nr_ppas > 1)
|
||||
@@ -123,7 +123,7 @@ static void pblk_end_io_read(struct nvm_rq *rqd)
|
||||
bio_put(bio);
|
||||
if (r_ctx->orig_bio) {
|
||||
#ifdef CONFIG_NVM_DEBUG
|
||||
WARN_ONCE(r_ctx->orig_bio->bi_error,
|
||||
WARN_ONCE(r_ctx->orig_bio->bi_status,
|
||||
"pblk: corrupted read bio\n");
|
||||
#endif
|
||||
bio_endio(r_ctx->orig_bio);
|
||||
|
@@ -186,7 +186,7 @@ static void pblk_end_io_write(struct nvm_rq *rqd)
|
||||
}
|
||||
#ifdef CONFIG_NVM_DEBUG
|
||||
else
|
||||
WARN_ONCE(rqd->bio->bi_error, "pblk: corrupted write error\n");
|
||||
WARN_ONCE(rqd->bio->bi_status, "pblk: corrupted write error\n");
|
||||
#endif
|
||||
|
||||
pblk_complete_write(pblk, rqd, c_ctx);
|
||||
|
@@ -279,8 +279,8 @@ static void rrpc_end_sync_bio(struct bio *bio)
|
||||
{
|
||||
struct completion *waiting = bio->bi_private;
|
||||
|
||||
if (bio->bi_error)
|
||||
pr_err("nvm: gc request failed (%u).\n", bio->bi_error);
|
||||
if (bio->bi_status)
|
||||
pr_err("nvm: gc request failed (%u).\n", bio->bi_status);
|
||||
|
||||
complete(waiting);
|
||||
}
|
||||
@@ -359,7 +359,7 @@ try:
|
||||
goto finished;
|
||||
}
|
||||
wait_for_completion_io(&wait);
|
||||
if (bio->bi_error) {
|
||||
if (bio->bi_status) {
|
||||
rrpc_inflight_laddr_release(rrpc, rqd);
|
||||
goto finished;
|
||||
}
|
||||
@@ -385,7 +385,7 @@ try:
|
||||
wait_for_completion_io(&wait);
|
||||
|
||||
rrpc_inflight_laddr_release(rrpc, rqd);
|
||||
if (bio->bi_error)
|
||||
if (bio->bi_status)
|
||||
goto finished;
|
||||
|
||||
bio_reset(bio);
|
||||
|
在新工单中引用
屏蔽一个用户