Skip to content
Commit ba2dec35 authored by Roy Shterman's avatar Roy Shterman Committed by Christoph Hellwig
Browse files

nvmet: Change max_nsid in subsystem due to ns_disable if needed



In case we disable namespaces which has the nsid like
subsystem max_nsid we need to search for the next largest nsid
in this subsystem. If the subsystem don't has more namespaces
we set it to 0, else we take nsid from the last namespace in
namespaces list because the list is sorted while inserting.

Reviewed-by: default avatarMax Gurtovoy <maxg@mellanox.com>
Reviewed-by: default avatarSagi Grimberg <sagi@grimberg.me>
Signed-off-by: default avatarRoy Shterman <roys@lightbitslabs.com>
Reviewed-by: default avatarJohannes Thumshirn <jthumshirn@suse.de>
[hch: slight refactor]
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
parent 86f36b9c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment