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: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/382855
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
This commit is contained in:
Daniel Verkamp 2017-10-17 10:53:05 -07:00 committed by Jim Harris
parent 31521306a5
commit 4835489a9d

View File

@ -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);