summaryrefslogtreecommitdiff
path: root/drivers/lightnvm
diff options
context:
space:
mode:
authorMatias Bjørling <m@bjorling.me>2016-01-12 09:49:29 +0300
committerJens Axboe <axboe@fb.com>2016-01-12 18:21:17 +0300
commit72d256ecc5d0c8cbcc0bd5c6d983b434df556cb4 (patch)
treeb33f8b9f1df32f633f75688d0f89417a3e220296 /drivers/lightnvm
parent81e681d3f7424fc2f03b6269e15c63131473c98f (diff)
downloadlinux-72d256ecc5d0c8cbcc0bd5c6d983b434df556cb4.tar.xz
lightnvm: move rq->error to nvm_rq->error
Instead of passing request error into the LightNVM modules, incorporate it into the nvm_rq. Signed-off-by: Matias Bjørling <m@bjorling.me> Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'drivers/lightnvm')
-rw-r--r--drivers/lightnvm/core.c3
-rw-r--r--drivers/lightnvm/gennvm.c6
-rw-r--r--drivers/lightnvm/rrpc.c2
3 files changed, 6 insertions, 5 deletions
diff --git a/drivers/lightnvm/core.c b/drivers/lightnvm/core.c
index cd674af3d17d..dad84ddbefb4 100644
--- a/drivers/lightnvm/core.c
+++ b/drivers/lightnvm/core.c
@@ -291,7 +291,8 @@ EXPORT_SYMBOL(nvm_erase_ppa);
void nvm_end_io(struct nvm_rq *rqd, int error)
{
- rqd->end_io(rqd, error);
+ rqd->error = error;
+ rqd->end_io(rqd);
}
EXPORT_SYMBOL(nvm_end_io);
diff --git a/drivers/lightnvm/gennvm.c b/drivers/lightnvm/gennvm.c
index 262da6dd9056..4c15846b327f 100644
--- a/drivers/lightnvm/gennvm.c
+++ b/drivers/lightnvm/gennvm.c
@@ -363,11 +363,11 @@ static void gennvm_mark_blk_bad(struct nvm_dev *dev, struct nvm_rq *rqd)
gennvm_blk_set_type(dev, &rqd->ppa_addr, 2);
}
-static void gennvm_end_io(struct nvm_rq *rqd, int error)
+static void gennvm_end_io(struct nvm_rq *rqd)
{
struct nvm_tgt_instance *ins = rqd->ins;
- switch (error) {
+ switch (rqd->error) {
case NVM_RSP_SUCCESS:
case NVM_RSP_ERR_EMPTYPAGE:
break;
@@ -375,7 +375,7 @@ static void gennvm_end_io(struct nvm_rq *rqd, int error)
gennvm_mark_blk_bad(rqd->dev, rqd);
}
- ins->tt->end_io(rqd, error);
+ ins->tt->end_io(rqd);
}
static int gennvm_submit_io(struct nvm_dev *dev, struct nvm_rq *rqd)
diff --git a/drivers/lightnvm/rrpc.c b/drivers/lightnvm/rrpc.c
index ec7aacf78f2f..9a5d94007ec0 100644
--- a/drivers/lightnvm/rrpc.c
+++ b/drivers/lightnvm/rrpc.c
@@ -658,7 +658,7 @@ static void rrpc_end_io_write(struct rrpc *rrpc, struct rrpc_rq *rrqd,
}
}
-static void rrpc_end_io(struct nvm_rq *rqd, int error)
+static void rrpc_end_io(struct nvm_rq *rqd)
{
struct rrpc *rrpc = container_of(rqd->ins, struct rrpc, instance);
struct rrpc_rq *rrqd = nvm_rq_to_pdu(rqd);