diff options
author | Christoph Hellwig <hch@lst.de> | 2019-10-25 16:38:58 +0300 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2019-11-04 20:56:42 +0300 |
commit | d84dd8cde6742054a2c802df841fa5aab5b99122 (patch) | |
tree | 05ff4535acacf1ae2e53d4fd8fe7b37b7b2924a8 /drivers/nvme/target/core.c | |
parent | 05d3046ff755474557e885f38f85e9b2a032cec0 (diff) | |
download | linux-d84dd8cde6742054a2c802df841fa5aab5b99122.tar.xz |
nvmet: clean up command parsing a bit
Move the special cases for fabrics commands and the discovery controller
to nvmet_parse_admin_cmd in preparation for adding passthrough support.
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Keith Busch <kbusch@kernel.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/nvme/target/core.c')
-rw-r--r-- | drivers/nvme/target/core.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/nvme/target/core.c b/drivers/nvme/target/core.c index cde58c001b23..28438b833c1b 100644 --- a/drivers/nvme/target/core.c +++ b/drivers/nvme/target/core.c @@ -892,14 +892,10 @@ bool nvmet_req_init(struct nvmet_req *req, struct nvmet_cq *cq, } if (unlikely(!req->sq->ctrl)) - /* will return an error for any Non-connect command: */ + /* will return an error for any non-connect command: */ status = nvmet_parse_connect_cmd(req); else if (likely(req->sq->qid != 0)) status = nvmet_parse_io_cmd(req); - else if (nvme_is_fabrics(req->cmd)) - status = nvmet_parse_fabrics_cmd(req); - else if (req->sq->ctrl->subsys->type == NVME_NQN_DISC) - status = nvmet_parse_discovery_cmd(req); else status = nvmet_parse_admin_cmd(req); |