nvme-mpath: fix last path removal during traffic
authorSagi Grimberg <sagi@grimberg.me>
Thu, 21 Dec 2017 13:07:27 +0000 (15:07 +0200)
committerChristoph Hellwig <hch@lst.de>
Fri, 29 Dec 2017 09:32:58 +0000 (10:32 +0100)
commit479a322fb729d657d34706ccf8dd12916f36628f
treed048b15739f2cffd4ab5487c0fb348378692793d
parentd5bf4b7f437c250821d40c3e32158729e6b484ce
nvme-mpath: fix last path removal during traffic

In case our last path is removed during traffic, we can end up requeueing
the bio(s) but never schedule the actual requeue work as upper layers
still have open handles on the mpath device node.

Fix this by scheduling requeue work if the namespace being removed is
the last path in the ns_head path list.

Fixes: 32acab3181c7 ("nvme: implement multipath access to nvme subsystems")
Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Christoph Hellwig <hch@lst.de>
drivers/nvme/host/core.c
drivers/nvme/host/nvme.h