Commit 4835489a authored by Daniel Verkamp's avatar Daniel Verkamp Committed by Jim Harris
Browse files

blobfs: fix bstype debug prints



Add newlines to the debug logs.

Also dump the mismatched bstype via SPDK_TRACEDUMP() rather than as a
string, since it may not be null terminated.

Change-Id: Icad567373c56f24aea550903a1370c3734465472
Signed-off-by: default avatarDaniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/382855


Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Tested-by: default avatarSPDK Automated Test System <sys_sgsw@intel.com>
parent 31521306
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -627,10 +627,11 @@ load_cb(void *ctx, struct spdk_blob_store *bs, int bserrno)
	bstype = spdk_bs_get_bstype(bs);

	if (!memcmp(&bstype, &zeros, sizeof(bstype))) {
		SPDK_DEBUGLOG(SPDK_TRACE_BLOB, "assigning bstype");
		SPDK_DEBUGLOG(SPDK_TRACE_BLOB, "assigning bstype\n");
		spdk_bs_set_bstype(bs, blobfs_type);
	} else if (memcmp(&bstype, &blobfs_type, sizeof(bstype))) {
		SPDK_DEBUGLOG(SPDK_TRACE_BLOB, "not blobfs: %s", bstype.bstype);
		SPDK_DEBUGLOG(SPDK_TRACE_BLOB, "not blobfs\n");
		SPDK_TRACEDUMP(SPDK_TRACE_BLOB, "bstype", &bstype, sizeof(bstype));
		args->fn.fs_op_with_handle(args->arg, NULL, bserrno);
		free_fs_request(req);
		free(fs);