[PATCH v2] nvme-core: initialize status to NVME_SC_HOST_PATH_ERROR
Yuanyuan Zhong
yzhong at purestorage.com
Thu Apr 15 23:11:13 BST 2021
> > It doesn't look like these types of errors are unique to nvme. Could we
> > not just have blk_execute_rq() return an error instead?
Looking at history of commit b7819b925918 ("block: remove the blk_execute_rq
return value") and commit be549d491154 ("scsi: core: set result when the
command cannot be dispatched"), it seems scsi code no longer have issue.
> -extern void blk_execute_rq(struct gendisk *, struct request *, int);
> +extern int blk_execute_rq(struct gendisk *, struct request *, int);
Changing blk_execute_rq() prototype needs tree-wide callers update.
While it could be a fix, I'd wait for maintainers to chime in.
I don't quite like initializing the status for every nvme command. However for
such a long standing bug across multiple stable releases, I think it will be an
easy backport for stable-tree.
--
Regards,
Yuanyuan Zhong
More information about the Linux-nvme
mailing list