[PATCH v3 0/4] block/scsi/nvme: Add error codes for PR ops

Mike Christie michael.christie at oracle.com
Mon Nov 21 19:25:59 PST 2022


The following patches were made over Linus's tree and allow the PR/pr_ops
users to handle errors without having to know the device type and also
for SCSI handle devices that require the sense code. Currently, we return
a -Exyz type of error code if the PR call fails before the drivers can
send the command and a device specific error code if it's queued. The
problem is that the callers don't always know the device type so they
can't check for specific errors like reservation conflicts, or transport
errors or invalid operations.

These patches add common error codes which callers can check for.

v3:
- Rework nvme_sc_to_pr_err so it returns directly instead of using a
local variable. Also do the same for scsi's converter.

v2:
- Drop PR_STS_OP_NOT_SUPP and PR_STS_OP_INVALID.
- Drop dependence on scsi_exeucte patchset and include status_byte
patch in this patchset.
- Check for all nvme path errors with nvme_is_path_error.





More information about the Linux-nvme mailing list