+2
−17
+2
−0
+27
−0
Loading
Move the poll group subsystem update of ns reservation state to an
interneal function in subsystem.c.
This better locates the logic with the rest of the ns reservation logic
and makes unit testing the poll group update code possible in
subsystem.c without duplicating the logic into the unit test.
This makes two minor changes to the logic:
1) memset holder_id if there is no reservation as a safety mechanism
in case some code reads it instead of rtype/crkey first
2) Use TAILQ_FOREACH. The _SAFE verion is not needed since we are not
removing from the list.
Update reservation request unit tests in subsystem_ut.c that fully
exercise the reservation request handling to validate the pg ns updates.
Change-Id: I04136d637850dc81b5f6d9eadcbedbaae290e4ab
Signed-off-by:
Joel Cunningham <joel.cunningham@oracle.com>
Reviewed-on: https://review.spdk.io/c/spdk/spdk/+/26469
Tested-by:
SPDK Automated Test System <spdkbot@gmail.com>
Reviewed-by:
Jim Harris <jim.harris@nvidia.com>
Community-CI: Mellanox Build Bot
Reviewed-by:
Changpeng Liu <changpeliu@tencent.com>