Skip to content
Commit c51a22e6 authored by Sagi Grimberg's avatar Sagi Grimberg Committed by Keith Busch
Browse files

nvmet-rdma: Avoid o(n^2) loop in delete_ctrl



When deleting a nvmet-rdma ctrl, we essentially loop over all
queues that belong to the controller and schedule a removal of
each. Instead of restarting the loop every time a queue is found,
do a simple safe list traversal.

This addresses an unneeded time spent scheduling queue removal in
cases there a lot of queues.

Signed-off-by: default avatarSagi Grimberg <sagi.grimberg@vastdata.com>
Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarKeith Busch <kbusch@kernel.org>
parent 0e34bd96
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