Commit 9bec3f58 authored by Changpeng Liu's avatar Changpeng Liu Committed by Konrad Sztyber
Browse files

bdev/malloc: don't do verify when separate metadata buffer is null



The `bdev_gpt` module will examine Malloc device without passing separate
metadata buffer, then the Malloc driver will report error logs for
Malloc device created with separate metadata, here we skip doing verify
if the input metadata buffer is NULL.

Fix #3191.

Change-Id: Ia6a160dca238534a7b534f05e0646123c7870d1e
Signed-off-by: default avatarChangpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/20632


Reviewed-by: default avatarKonrad Sztyber <konrad.sztyber@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: default avatarKarol Latecki <karol.latecki@intel.com>
Reviewed-by: default avatarJim Harris <jim.harris@samsung.com>
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
parent 3bf2356c
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -74,6 +74,10 @@ malloc_verify_pi(struct spdk_bdev_io *bdev_io)
			.iov_len	= bdev_io->u.bdev.num_blocks * bdev->md_len,
		};

		if (bdev_io->u.bdev.md_buf == NULL) {
			return 0;
		}

		rc = spdk_dix_verify(bdev_io->u.bdev.iovs,
				     bdev_io->u.bdev.iovcnt,
				     &md_iov,