]> git.baikalelectronics.ru Git - kernel.git/commit
nvmet: switch loopback target state to connecting when resetting
authorJohannes Thumshirn <jthumshirn@suse.de>
Thu, 3 May 2018 15:00:35 +0000 (17:00 +0200)
committerJens Axboe <axboe@kernel.dk>
Thu, 3 May 2018 15:37:50 +0000 (09:37 -0600)
commit48f81c14644eaa81706bf060d4c0c06c19a972c2
tree0f2bf8c50e46896b0f37efcaa3c3642bc5fed3f7
parent2db763c52cced9b697f61fa6cf9cbf207b3923fc
nvmet: switch loopback target state to connecting when resetting

After commit ccbed1e2b050 ("nvme: expand nvmf_check_if_ready checks")
resetting of the loopback nvme target failed as we forgot to switch
it's state to NVME_CTRL_CONNECTING before we reconnect the admin
queues. Therefore the checks in nvmf_check_if_ready() choose to go to
the reject_io case and thus we couldn't sent out an identify
controller command to reconnect.

Change the controller state to NVME_CTRL_CONNECTING after tearing down
the old connection and before re-establishing the connection.

Fixes: ccbed1e2b050 ("nvme: expand nvmf_check_if_ready checks")
Signed-off-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: Keith Busch <keith.busch@intel.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/nvme/target/loop.c