]> git.baikalelectronics.ru Git - kernel.git/commit
nvme-rdma: Fix device removal handling
authorSagi Grimberg <sagi@grimberg.me>
Thu, 14 Jul 2016 14:39:47 +0000 (17:39 +0300)
committerSagi Grimberg <sagi@grimberg.me>
Wed, 3 Aug 2016 13:25:07 +0000 (16:25 +0300)
commit6de61d60b0f9fa2382461a94019d52fd89bbcffa
tree698913355a30c7e313c1347064c565dbf55516b5
parent01716fe5f8f37a48350ac5d9e76b8e2f33bc601a
nvme-rdma: Fix device removal handling

Device removal sequence may have crashed because the
controller (and admin queue space) was freed before
we destroyed the admin queue resources. Thus we
want to destroy the admin queue and only then queue
controller deletion and wait for it to complete.

More specifically we:
1. own the controller deletion (make sure we are not
   competing with another deletion).
2. get rid of inflight reconnects if exists (which
   also destroy and create queues).
3. destroy the queue.
4. safely queue controller deletion (and wait for it
   to complete).

Reported-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
Reviewed-by: Christoph Hellwig <hch@lst.de>
drivers/nvme/host/rdma.c