Skip to content

Commit

Permalink
nvmet: use invalid cmd opcode helper
Browse files Browse the repository at this point in the history
In the NVMeOF block device backend, file backend, and passthru backend
we reject and report the commands if opcode is not handled.

Use the previously introduced helper in the passthru backend to make the
error message uniform.

Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
  • Loading branch information
Chaitanya Kulkarni authored and Christoph Hellwig committed Feb 10, 2021
1 parent 1c2c761 commit 07116ea
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/nvme/target/passthru.c
Original file line number Diff line number Diff line change
Expand Up @@ -494,7 +494,7 @@ u16 nvmet_parse_passthru_admin_cmd(struct nvmet_req *req)
return nvmet_setup_passthru_command(req);
default:
/* Reject commands not in the allowlist above */
return NVME_SC_INVALID_OPCODE | NVME_SC_DNR;
return nvmet_report_invalid_opcode(req);
}
}

Expand Down

0 comments on commit 07116ea

Please sign in to comment.