Commit 9d6e1f5b authored by Yankun Li's avatar Yankun Li Committed by Tomasz Zawadzki
Browse files

bdev/raid: invoke cb_fn in __raid_bdev_remove_base_bdev



when cb_fn is not null, we should invok it to ack in
__raid_bdev_remove_base_bdev

Change-Id: Iee35ddb3c56b0db0952f03bebb817e6e7b1b15ea
Signed-off-by: default avatarYankun Li <845245370@qq.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/22373


Reviewed-by: default avatarArtur Paszkiewicz <artur.paszkiewicz@intel.com>
Reviewed-by: default avatarTomasz Zawadzki <tomasz.zawadzki@intel.com>
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarJim Harris <jim.harris@samsung.com>
Community-CI: Mellanox Build Bot
parent 9e822ce3
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -2128,6 +2128,9 @@ _raid_bdev_remove_base_bdev(struct raid_base_bdev_info *base_info,
			/* There is no base bdev for this raid, so free the raid device. */
			raid_bdev_cleanup_and_free(raid_bdev);
		}
		if (cb_fn != NULL) {
			cb_fn(cb_ctx, 0);
		}
	} else if (raid_bdev->num_base_bdevs_operational-- == raid_bdev->min_base_bdevs_operational) {
		/*
		 * After this base bdev is removed there will not be enough base bdevs