Skip to content
Commit ce11bdf9 authored by Md Haris Iqbal's avatar Md Haris Iqbal Committed by Jens Axboe
Browse files

block/rnbd-srv: Replace sess_dev_list with index_idr



The structure rnbd_srv_session maintains a list and an xarray of
rnbd_srv_dev. There is no need to keep both as one of them can serve the
purpose.

Since one of the places where the lookup of rnbd_srv_dev using
rnbd_srv_session is IO path, an xarray would serve us better than a list
traversal. Hence remove sess_dev_list from rnbd_srv_session, and replace
its uses from xarray.

Signed-off-by: default avatarMd Haris Iqbal <haris.iqbal@ionos.com>
Reviewed-by: default avatarAleksei Marov <aleksei.marov@ionos.com>
Signed-off-by: default avatarJack Wang <jinpu.wang@ionos.com>
Link: https://lore.kernel.org/r/20220707143122.460362-3-haris.iqbal@ionos.com


Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 4bc14f31
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment