Commit 8aa7730c authored by Artur Paszkiewicz's avatar Artur Paszkiewicz Committed by Jim Harris
Browse files

raid: limit the no superblock examine case



Ignore raid bdevs that are not in CONFIGURING state or were assembled
from superblock.

For raid bdevs without superblock, examine is used only when some base
bdevs were not present at the time of raid bdev creation - the state is
CONFIGURING. When all bdevs are discovered, the raid bdev is activated
(ONLINE state) and any further examine calls on any bdev should have no
effect on this raid bdev.

Signed-off-by: default avatarArtur Paszkiewicz <artur.paszkiewicz@intel.com>
Change-Id: Id7c9941e3877a8694f4ad5aad26d384007a50d4a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/22489


Reviewed-by: default avatarKonrad Sztyber <konrad.sztyber@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: default avatarJim Harris <jim.harris@samsung.com>
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
parent 5e82a0f5
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -3330,6 +3330,9 @@ raid_bdev_examine_no_sb(struct spdk_bdev *bdev)
	struct raid_base_bdev_info *base_info;

	TAILQ_FOREACH(raid_bdev, &g_raid_bdev_list, global_link) {
		if (raid_bdev->state != RAID_BDEV_STATE_CONFIGURING || raid_bdev->sb != NULL) {
			continue;
		}
		RAID_FOR_EACH_BASE_BDEV(raid_bdev, base_info) {
			if (base_info->desc == NULL && base_info->name != NULL &&
			    strcmp(bdev->name, base_info->name) == 0) {