Commit a5c2b4f6 authored by James Smart's avatar James Smart Committed by Jens Axboe

nvmet-fc: add LS failure messages

Add LS reception failure messages
Signed-off-by: default avatarJames Smart <jsmart2021@gmail.com>
Reviewed-by: default avatarHannes Reinecke <hare@suse.de>
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 14fd1e98
...@@ -1598,15 +1598,31 @@ nvmet_fc_rcv_ls_req(struct nvmet_fc_target_port *target_port, ...@@ -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_tgtport *tgtport = targetport_to_tgtport(target_port);
struct nvmet_fc_ls_iod *iod; 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; 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; return -ESHUTDOWN;
}
iod = nvmet_fc_alloc_ls_iod(tgtport); iod = nvmet_fc_alloc_ls_iod(tgtport);
if (!iod) { 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); nvmet_fc_tgtport_put(tgtport);
return -ENOENT; return -ENOENT;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment