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: NMax Gurtovoy <maxg@mellanox.com> Reviewed-by: NSagi Grimberg <sagi@grimberg.me> Signed-off-by: NRoy Shterman <roys@lightbitslabs.com> Reviewed-by: NJohannes Thumshirn <jthumshirn@suse.de> [hch: slight refactor] Signed-off-by: NChristoph Hellwig <hch@lst.de>
Showing
想要评论请 注册 或 登录