Loading
bdev/nvme: save config for multipath mode
This patch fixes the issue where configuration for controllers in multipath mode was not saved when save_config RPC command was issued. Now there is a flag added to controller options structure that stores the multipath state for the controller. If a controller is added by bdev_nvme_attach_controller RPC call with '-x multipath' parameter, the flag is set to true and when save_config RPC is issued, this flag is used to generate appropriate field in JSON file. This JSON file can be then loaded when a target is starting, to restore saved configuration. Note: the order of creating controllers matters for multipath. The '-x multipath' parameter shall be specified for second (and subsequent controllers) created. If first controller is created by bdev_nvme_attach_controller RPC with '-x multipath' parameter, and then second controller is added with the same controller name and different transport parameters but without '-x multipath' parameter, the controllers will act as if they were created in 'failover' mode. Fixes #3502 Change-Id: I0019a7c8ad13725cca739b752c0817e841c08139 Signed-off-by:Marcin Spiewak <marcin.spiewak@intel.com> Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/24813 Reviewed-by:
Jim Harris <jim.harris@samsung.com> Tested-by:
SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by:
Shuhei Matsumoto <smatsumoto@nvidia.com>