Commit 1c0f3504 authored by Artur Paszkiewicz's avatar Artur Paszkiewicz Committed by Konrad Sztyber
Browse files

raid: fix checking base bdev blocklen when creating raid bdev



Don't use num_base_bdevs_discovered to check if a base bdev is the first
one being configured - it can be set asynchronously after the superblock
is loaded.

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


Community-CI: Mellanox Build Bot
Reviewed-by: default avatarKonrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: default avatarJim Harris <jim.harris@samsung.com>
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
parent 8aab02a7
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -3028,7 +3028,7 @@ raid_bdev_configure_base_bdev(struct raid_base_bdev_info *base_info, bool existi
	 * otherwise - verify. Assumption is that all the base bdevs for any raid bdev should
	 * have the same blocklen and metadata format.
	 */
	if (raid_bdev->num_base_bdevs_discovered == 0) {
	if (raid_bdev->bdev.blocklen == 0) {
		raid_bdev->bdev.blocklen = bdev->blocklen;
		raid_bdev->bdev.md_len = spdk_bdev_get_md_size(bdev);
		raid_bdev->bdev.md_interleave = spdk_bdev_is_md_interleaved(bdev);