OSDN Git Service

nvmet: Introduce common execute function for get_log_page and identify
authorChristoph Hellwig <hch@lst.de>
Wed, 23 Oct 2019 16:35:41 +0000 (10:35 -0600)
committerJens Axboe <axboe@kernel.dk>
Mon, 4 Nov 2019 17:56:41 +0000 (10:56 -0700)
commit2cb6963a16e9e114486decf591af7cb2d69cb154
tree69beb8cc6d3966336dbbc622ce525a679656c98d
parentc73eebc07a0fc8f4ea0f69c65803595d6471bb47
nvmet: Introduce common execute function for get_log_page and identify

Instead of picking the sub-command handler to execute in a nested
switch statement introduce a landing functions that calls out
to the appropriate sub-command handler.

This will allow us to have a common place in the handler to check
the transfer length in a future patch.

Reviewed-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
[split patch, update change log]
Signed-off-by: Logan Gunthorpe <logang@deltatee.com>
Signed-off-by: Keith Busch <kbusch@kernel.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/nvme/target/admin-cmd.c