diff options
author | Israel Rukshin <israelr@mellanox.com> | 2018-01-04 17:56:14 +0200 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2018-01-08 16:57:00 +0100 |
commit | b837b28394fb76993c28bb242db7061ee0417da6 (patch) | |
tree | 984a1538859490dbc63e1c8e9fb13a8d3337160c /samples | |
parent | 85088c4a0f65f0be25a98164ec6bca02ac5cad04 (diff) |
nvme: fix subsystem multiple controllers support check
There is a problem when another module (e.g. nvmet) takes a reference on
the nvme block device and the physical nvme drive is removed. In that
case nvme_free_ctrl() will not be called and the controller state will be
"deleting" or "dead" unless nvmet module releases the block device.
Later on, the same nvme drive probes back and nvme_init_subsystem() will
be called and fail due to duplicate subnqn (if the nvme device doesn't
support subsystem with multiple controllers). This will cause a probe
failure. This commit changes the check of multiple controllers support
at nvme_init_subsystem() by not counting all the controllers at "dead" or
"deleting" state (this is safe because controllers at this state will
never be active again).
Fixes: ab9e00cc72fa ("nvme: track subsystems")
Reviewed-by: Max Gurtovoy <maxg@mellanox.com>
Signed-off-by: Israel Rukshin <israelr@mellanox.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'samples')
0 files changed, 0 insertions, 0 deletions