Commit 2ca0786d authored by Max Gurtovoy's avatar Max Gurtovoy Committed by Jens Axboe

nvmet: use symbolic constants for log identifiers

Signed-off-by: default avatarMax Gurtovoy <maxg@mellanox.com>
Reviewed-by: default avatarParav Pandit <parav@mellanox.com>
Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarSagi Grimberg <sagi@grimberg.me>
Signed-off-by: default avatarJens Axboe <axboe@fb.com>
parent 64a0ca88
...@@ -121,7 +121,7 @@ static void nvmet_execute_get_log_page(struct nvmet_req *req) ...@@ -121,7 +121,7 @@ static void nvmet_execute_get_log_page(struct nvmet_req *req)
} }
switch (req->cmd->get_log_page.lid) { switch (req->cmd->get_log_page.lid) {
case 0x01: case NVME_LOG_ERROR:
/* /*
* We currently never set the More bit in the status field, * We currently never set the More bit in the status field,
* so all error log entries are invalid and can be zeroed out. * so all error log entries are invalid and can be zeroed out.
...@@ -129,7 +129,7 @@ static void nvmet_execute_get_log_page(struct nvmet_req *req) ...@@ -129,7 +129,7 @@ static void nvmet_execute_get_log_page(struct nvmet_req *req)
* mandatory log page. * mandatory log page.
*/ */
break; break;
case 0x02: case NVME_LOG_SMART:
/* /*
* XXX: fill out actual smart log * XXX: fill out actual smart log
* *
...@@ -149,7 +149,7 @@ static void nvmet_execute_get_log_page(struct nvmet_req *req) ...@@ -149,7 +149,7 @@ static void nvmet_execute_get_log_page(struct nvmet_req *req)
goto err; goto err;
} }
break; break;
case 0x03: case NVME_LOG_FW_SLOT:
/* /*
* We only support a single firmware slot which always is * We only support a single firmware slot which always is
* active, so we can zero out the whole firmware slot log and * active, so we can zero out the whole firmware slot log and
...@@ -496,9 +496,9 @@ u16 nvmet_parse_admin_cmd(struct nvmet_req *req) ...@@ -496,9 +496,9 @@ u16 nvmet_parse_admin_cmd(struct nvmet_req *req)
req->data_len = nvmet_get_log_page_len(cmd); req->data_len = nvmet_get_log_page_len(cmd);
switch (cmd->get_log_page.lid) { switch (cmd->get_log_page.lid) {
case 0x01: case NVME_LOG_ERROR:
case 0x02: case NVME_LOG_SMART:
case 0x03: case NVME_LOG_FW_SLOT:
req->execute = nvmet_execute_get_log_page; req->execute = nvmet_execute_get_log_page;
return 0; return 0;
} }
......
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