block: Rename BLK_STS_NEXUS to BLK_STS_RESV_CONFLICT
BLK_STS_NEXUS is used for NVMe/SCSI reservation conflicts and DASD's locking feature which works similar to NVMe/SCSI reservations where a host can get a lock on a device and when the lock is taken it will get failures. This patch renames BLK_STS_NEXUS so it better reflects this type of use. Signed-off-by: Mike Christie <michael.christie@oracle.com> Link: https://lore.kernel.org/r/20230407200551.12660-3-michael.christie@oracle.com Acked-by: Stefan Haberland <sth@linux.ibm.com> Reviewed-by: Bart Van Assche <bvanassche@acm.org> Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Hannes Reinecke <hare@suse.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
parent
c787f1baa5
commit
7ba150834b
|
@ -155,7 +155,7 @@ static const struct {
|
|||
[BLK_STS_NOSPC] = { -ENOSPC, "critical space allocation" },
|
||||
[BLK_STS_TRANSPORT] = { -ENOLINK, "recoverable transport" },
|
||||
[BLK_STS_TARGET] = { -EREMOTEIO, "critical target" },
|
||||
[BLK_STS_NEXUS] = { -EBADE, "critical nexus" },
|
||||
[BLK_STS_RESV_CONFLICT] = { -EBADE, "reservation conflict" },
|
||||
[BLK_STS_MEDIUM] = { -ENODATA, "critical medium" },
|
||||
[BLK_STS_PROTECTION] = { -EILSEQ, "protection" },
|
||||
[BLK_STS_RESOURCE] = { -ENOMEM, "kernel resource" },
|
||||
|
|
|
@ -279,7 +279,7 @@ static blk_status_t nvme_error_status(u16 status)
|
|||
case NVME_SC_INVALID_PI:
|
||||
return BLK_STS_PROTECTION;
|
||||
case NVME_SC_RESERVATION_CONFLICT:
|
||||
return BLK_STS_NEXUS;
|
||||
return BLK_STS_RESV_CONFLICT;
|
||||
case NVME_SC_HOST_PATH_ERROR:
|
||||
return BLK_STS_TRANSPORT;
|
||||
case NVME_SC_ZONE_TOO_MANY_ACTIVE:
|
||||
|
|
|
@ -2723,7 +2723,12 @@ static void __dasd_cleanup_cqr(struct dasd_ccw_req *cqr)
|
|||
else if (status == 0) {
|
||||
switch (cqr->intrc) {
|
||||
case -EPERM:
|
||||
error = BLK_STS_NEXUS;
|
||||
/*
|
||||
* DASD doesn't implement SCSI/NVMe reservations, but it
|
||||
* implements a locking scheme similar to them. We
|
||||
* return this error when we no longer have the lock.
|
||||
*/
|
||||
error = BLK_STS_RESV_CONFLICT;
|
||||
break;
|
||||
case -ENOLINK:
|
||||
error = BLK_STS_TRANSPORT;
|
||||
|
|
|
@ -599,7 +599,7 @@ static blk_status_t scsi_result_to_blk_status(int result)
|
|||
case SCSIML_STAT_OK:
|
||||
break;
|
||||
case SCSIML_STAT_RESV_CONFLICT:
|
||||
return BLK_STS_NEXUS;
|
||||
return BLK_STS_RESV_CONFLICT;
|
||||
case SCSIML_STAT_NOSPC:
|
||||
return BLK_STS_NOSPC;
|
||||
case SCSIML_STAT_MED_ERROR:
|
||||
|
|
|
@ -96,7 +96,7 @@ typedef u16 blk_short_t;
|
|||
#define BLK_STS_NOSPC ((__force blk_status_t)3)
|
||||
#define BLK_STS_TRANSPORT ((__force blk_status_t)4)
|
||||
#define BLK_STS_TARGET ((__force blk_status_t)5)
|
||||
#define BLK_STS_NEXUS ((__force blk_status_t)6)
|
||||
#define BLK_STS_RESV_CONFLICT ((__force blk_status_t)6)
|
||||
#define BLK_STS_MEDIUM ((__force blk_status_t)7)
|
||||
#define BLK_STS_PROTECTION ((__force blk_status_t)8)
|
||||
#define BLK_STS_RESOURCE ((__force blk_status_t)9)
|
||||
|
@ -184,7 +184,7 @@ static inline bool blk_path_error(blk_status_t error)
|
|||
case BLK_STS_NOTSUPP:
|
||||
case BLK_STS_NOSPC:
|
||||
case BLK_STS_TARGET:
|
||||
case BLK_STS_NEXUS:
|
||||
case BLK_STS_RESV_CONFLICT:
|
||||
case BLK_STS_MEDIUM:
|
||||
case BLK_STS_PROTECTION:
|
||||
return false;
|
||||
|
|
Loading…
Reference in New Issue