Commit 6961b5e
nvme: fix block device naming collision
The issue exists when multipath is enabled and the namespace is
shared, but all the other controller checks at nvme_is_unique_nsid()
are false. The reason for this issue is that nvme_is_unique_nsid()
returns false when is called from nvme_mpath_alloc_disk() due to an
uninitialized value of head->shared. The patch fixes it by setting
head->shared before nvme_mpath_alloc_disk() is called.
Fixes: 5974ea7 ("nvme: allow duplicate NSIDs for private namespaces")
Signed-off-by: Israel Rukshin <israelr@nvidia.com>
Reviewed-by: Keith Busch <kbusch@kernel.org>
Reviewed-by: Max Gurtovoy <mgurtovoy@nvidia.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>1 parent 081f5e7 commit 6961b5e
1 file changed
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3786 | 3786 | | |
3787 | 3787 | | |
3788 | 3788 | | |
3789 | | - | |
| 3789 | + | |
3790 | 3790 | | |
3791 | 3791 | | |
3792 | 3792 | | |
| |||
3810 | 3810 | | |
3811 | 3811 | | |
3812 | 3812 | | |
| 3813 | + | |
3813 | 3814 | | |
3814 | 3815 | | |
3815 | 3816 | | |
| |||
3891 | 3892 | | |
3892 | 3893 | | |
3893 | 3894 | | |
3894 | | - | |
| 3895 | + | |
3895 | 3896 | | |
3896 | 3897 | | |
3897 | 3898 | | |
3898 | 3899 | | |
3899 | | - | |
3900 | 3900 | | |
3901 | 3901 | | |
3902 | 3902 | | |
| |||
0 commit comments