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);
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;
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)
}
}
-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);
};
struct nvm_rq;
-typedef void (nvm_end_io_fn)(struct nvm_rq *, int);
+typedef void (nvm_end_io_fn)(struct nvm_rq *);
struct nvm_rq {
struct nvm_tgt_instance *ins;
uint8_t opcode;
uint16_t nr_pages;
uint16_t flags;
+
+ int error;
};
static inline struct nvm_rq *nvm_rq_from_pdu(void *pdu)