struct request *rq = cmd->request;
switch (req_op(rq)) {
+ case REQ_OP_ZONE_RESET:
+
+ if (result &&
+ sshdr->sense_key == ILLEGAL_REQUEST &&
+ sshdr->asc == 0x24)
+ /*
+ * INVALID FIELD IN CDB error: reset of a conventional
+ * zone was attempted. Nothing to worry about, so be
+ * quiet about the error.
+ */
+ rq->rq_flags |= RQF_QUIET;
+ break;
+
case REQ_OP_WRITE:
+ case REQ_OP_WRITE_ZEROES:
case REQ_OP_WRITE_SAME:
- case REQ_OP_ZONE_RESET:
/* Unlock the zone */
- sd_zbc_unlock_zone(rq);
+ sd_zbc_write_unlock_zone(cmd);
- if (!result ||
- sshdr->sense_key != ILLEGAL_REQUEST)
- break;
-
- switch (sshdr->asc) {
- case 0x24:
- /*
- * INVALID FIELD IN CDB error: For a zone reset,
- * this means that a reset of a conventional
- * zone was attempted. Nothing to worry about in
- * this case, so be quiet about the error.
- */
- if (req_op(rq) == REQ_OP_ZONE_RESET)
- rq->rq_flags |= RQF_QUIET;
- break;
- case 0x21:
+ if (result &&
+ sshdr->sense_key == ILLEGAL_REQUEST &&
+ sshdr->asc == 0x21)
/*
* INVALID ADDRESS FOR WRITE error: It is unlikely that
* retrying write requests failed with any kind of