Commit 9886052b authored by Karl Bonde Torp's avatar Karl Bonde Torp Committed by Konrad Sztyber
Browse files

bdev: skip examining bdev without support for READ



Change-Id: If46e438d327fc9f1ad137f2082cbbca38ff7dc68
Signed-off-by: default avatarKarl Bonde Torp <k.torp@samsung.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/24548


Community-CI: Mellanox Build Bot
Reviewed-by: default avatarJim Harris <jim.harris@samsung.com>
Reviewed-by: default avatarShuhei Matsumoto <smatsumoto@nvidia.com>
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarAleksey Marchuk <alexeymar@nvidia.com>
parent 5924e9ab
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -686,6 +686,13 @@ bdev_in_examine_allowlist(struct spdk_bdev *bdev)
static inline bool
bdev_ok_to_examine(struct spdk_bdev *bdev)
{
	/* Some bdevs may not support the READ command.
	 * Do not try to examine them.
	 */
	if (!spdk_bdev_io_type_supported(bdev, SPDK_BDEV_IO_TYPE_READ)) {
		return false;
	}

	if (g_bdev_opts.bdev_auto_examine) {
		return true;
	} else {