mirror of
https://github.com/torvalds/linux.git
synced 2024-12-05 18:41:23 +00:00
lightnvm: pblk: return NVM_ error on failed submission
Return a meaningful error when the sanity vector I/O check fails. Signed-off-by: Javier González <javier@cnexlabs.com> Signed-off-by: Matias Bjørling <mb@lightnvm.io> Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
parent
e37d07983a
commit
b6730dd4a9
@ -467,16 +467,13 @@ int pblk_submit_io(struct pblk *pblk, struct nvm_rq *rqd)
|
||||
{
|
||||
struct nvm_tgt_dev *dev = pblk->dev;
|
||||
|
||||
#ifdef CONFIG_NVM_DEBUG
|
||||
int ret;
|
||||
|
||||
ret = pblk_check_io(pblk, rqd);
|
||||
if (ret)
|
||||
return ret;
|
||||
#endif
|
||||
|
||||
atomic_inc(&pblk->inflight_io);
|
||||
|
||||
#ifdef CONFIG_NVM_DEBUG
|
||||
if (pblk_check_io(pblk, rqd))
|
||||
return NVM_IO_ERR;
|
||||
#endif
|
||||
|
||||
return nvm_submit_io(dev, rqd);
|
||||
}
|
||||
|
||||
@ -484,16 +481,13 @@ int pblk_submit_io_sync(struct pblk *pblk, struct nvm_rq *rqd)
|
||||
{
|
||||
struct nvm_tgt_dev *dev = pblk->dev;
|
||||
|
||||
#ifdef CONFIG_NVM_DEBUG
|
||||
int ret;
|
||||
|
||||
ret = pblk_check_io(pblk, rqd);
|
||||
if (ret)
|
||||
return ret;
|
||||
#endif
|
||||
|
||||
atomic_inc(&pblk->inflight_io);
|
||||
|
||||
#ifdef CONFIG_NVM_DEBUG
|
||||
if (pblk_check_io(pblk, rqd))
|
||||
return NVM_IO_ERR;
|
||||
#endif
|
||||
|
||||
return nvm_submit_io_sync(dev, rqd);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user