mirror of
https://github.com/torvalds/linux.git
synced 2024-11-18 10:01:43 +00:00
nvmet-fc: add LS failure messages
Add LS reception failure messages Signed-off-by: James Smart <jsmart2021@gmail.com> Reviewed-by: Hannes Reinecke <hare@suse.de> Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
parent
14fd1e98af
commit
a5c2b4f633
@ -1598,15 +1598,31 @@ nvmet_fc_rcv_ls_req(struct nvmet_fc_target_port *target_port,
|
||||
{
|
||||
struct nvmet_fc_tgtport *tgtport = targetport_to_tgtport(target_port);
|
||||
struct nvmet_fc_ls_iod *iod;
|
||||
struct fcnvme_ls_rqst_w0 *w0 = (struct fcnvme_ls_rqst_w0 *)lsreqbuf;
|
||||
|
||||
if (lsreqbuf_len > sizeof(union nvmefc_ls_requests))
|
||||
if (lsreqbuf_len > sizeof(union nvmefc_ls_requests)) {
|
||||
dev_info(tgtport->dev,
|
||||
"RCV %s LS failed: payload too large (%d)\n",
|
||||
(w0->ls_cmd <= NVME_FC_LAST_LS_CMD_VALUE) ?
|
||||
nvmefc_ls_names[w0->ls_cmd] : "",
|
||||
lsreqbuf_len);
|
||||
return -E2BIG;
|
||||
}
|
||||
|
||||
if (!nvmet_fc_tgtport_get(tgtport))
|
||||
if (!nvmet_fc_tgtport_get(tgtport)) {
|
||||
dev_info(tgtport->dev,
|
||||
"RCV %s LS failed: target deleting\n",
|
||||
(w0->ls_cmd <= NVME_FC_LAST_LS_CMD_VALUE) ?
|
||||
nvmefc_ls_names[w0->ls_cmd] : "");
|
||||
return -ESHUTDOWN;
|
||||
}
|
||||
|
||||
iod = nvmet_fc_alloc_ls_iod(tgtport);
|
||||
if (!iod) {
|
||||
dev_info(tgtport->dev,
|
||||
"RCV %s LS failed: context allocation failed\n",
|
||||
(w0->ls_cmd <= NVME_FC_LAST_LS_CMD_VALUE) ?
|
||||
nvmefc_ls_names[w0->ls_cmd] : "");
|
||||
nvmet_fc_tgtport_put(tgtport);
|
||||
return -ENOENT;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user