Commit 12881ad9 authored by Shuhei Matsumoto's avatar Shuhei Matsumoto Committed by Jim Harris
Browse files

bdev/raid: Remove duplicated and not enough state check in RPC



When check_and_remove_raid_bdev(raid_cfg) is called, raid_bdev
must be in configuring state. However, offline state will be
probable as well. Besides similar and more comprehensive state
check is done in raid_bdev_cleanup(). Hence remove this check.

Change-Id: I8526da51828f18a8393afbd3d81c0a52f2d33261
Signed-off-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-on: https://review.gerrithub.io/423620


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
Reviewed-by: default avatarKunal Sablok <kunal.sablok@intel.com>
parent a295285b
Loading
Loading
Loading
Loading
+0 −5
Original line number Diff line number Diff line
@@ -234,11 +234,6 @@ check_and_remove_raid_bdev(struct raid_bdev_config *raid_cfg)
		return;
	}

	/*
	 * raid should be in configuring state as this function is used to cleanup
	 * the raid during unsuccessful construction of raid
	 */
	assert(raid_bdev->state == RAID_BDEV_STATE_CONFIGURING);
	for (uint32_t i = 0; i < raid_bdev->num_base_bdevs; i++) {
		assert(raid_bdev->base_bdev_info != NULL);
		if (raid_bdev->base_bdev_info[i].bdev) {