bdev/raid: Update the comment of raid_bdev_add_base_bdevs()
Implementation was updated by the previous patch series but the comment was not. Hence update the comment in this patch. Change-Id: Ib2097561501984c4ad213652ba716ce195c7bea5 Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-on: https://review.gerrithub.io/424737 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Kunal Sablok <kunal.sablok@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com>
This commit is contained in:
parent
7f78f68ec8
commit
6bc4a314ae
@ -1373,14 +1373,17 @@ raid_bdev_add_base_device(struct raid_bdev_config *raid_cfg, struct spdk_bdev *b
|
||||
|
||||
/*
|
||||
* brief:
|
||||
* iterate the raid bdev config and add base bdevs to the raid bdev that
|
||||
* the config has. Skip nonexistent base bdev but stop iteration and
|
||||
* return failure if adding base bdev fails.
|
||||
* Add base bdevs to the raid bdev one by one. Skip any base bdev which doesn't
|
||||
* exist or fails to add. If all base bdevs are successfully added, the raid bdev
|
||||
* moves to the configured state and becomes available. Otherwise, the raid bdev
|
||||
* stays at the configuring state with added base bdevs.
|
||||
* params:
|
||||
* raid_cfg - pointer to raid bdev config
|
||||
* returns:
|
||||
* 0 - success
|
||||
* non zero - failure
|
||||
* 0 - The raid bdev moves to the configured state or stays at the configuring
|
||||
* state with added base bdevs due to any nonexistent base bdev.
|
||||
* non zero - Failed to add any base bdev and stays at the configuring state with
|
||||
* added base bdevs.
|
||||
*/
|
||||
int
|
||||
raid_bdev_add_base_devices(struct raid_bdev_config *raid_cfg)
|
||||
@ -1390,7 +1393,6 @@ raid_bdev_add_base_devices(struct raid_bdev_config *raid_cfg)
|
||||
int rc = 0, _rc;
|
||||
|
||||
for (i = 0; i < raid_cfg->num_base_bdevs; i++) {
|
||||
/* Check if base_bdev exists already, if not fail the command */
|
||||
base_bdev = spdk_bdev_get_by_name(raid_cfg->base_bdev[i].name);
|
||||
if (base_bdev == NULL) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_BDEV_RAID, "base bdev %s doesn't exist now\n",
|
||||
@ -1398,11 +1400,6 @@ raid_bdev_add_base_devices(struct raid_bdev_config *raid_cfg)
|
||||
continue;
|
||||
}
|
||||
|
||||
/*
|
||||
* Try to add base_bdev to this raid bdev, if not able to add fail the
|
||||
* command. This might be because this base_bdev may already be claimed
|
||||
* by some other module
|
||||
*/
|
||||
_rc = raid_bdev_add_base_device(raid_cfg, base_bdev, i);
|
||||
if (_rc != 0) {
|
||||
SPDK_ERRLOG("Failed to add base bdev %s to RAID bdev %s: %s",
|
||||
|
Loading…
Reference in New Issue
Block a user