From 54adced8e553bd1d06a1807efc20272d018ea7ac Mon Sep 17 00:00:00 2001 From: Mike Gerdts Date: Tue, 18 Apr 2023 13:15:16 -0500 Subject: [PATCH] blob: log blob ID as hex, again This is a followup to commit f4dc558245b317203676d18e7ecfa9b027f0a02b which strove to log blob IDs as hex to make small blob IDs more recognizable. That commit missed a few cases where the blob ID is logged as decimal. Signed-off-by: Mike Gerdts Change-Id: I75d1b5973ee7e812f7caf0e826d3edbcba126743 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/17641 Tested-by: SPDK CI Jenkins Reviewed-by: Aleksey Marchuk Reviewed-by: Jim Harris Community-CI: Mellanox Build Bot --- lib/blob/blobstore.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/blob/blobstore.c b/lib/blob/blobstore.c index 7be85c74c..a3286b58a 100644 --- a/lib/blob/blobstore.c +++ b/lib/blob/blobstore.c @@ -893,8 +893,8 @@ blob_parse(const struct spdk_blob_md_page *pages, uint32_t page_count, * happen for example if a bogus blobid is passed in through open. */ if (blob->id != pages[0].id) { - SPDK_ERRLOG("Blobid (%" PRIu64 ") doesn't match what's in metadata (%" PRIu64 ")\n", - blob->id, pages[0].id); + SPDK_ERRLOG("Blobid (0x%" PRIx64 ") doesn't match what's in metadata " + "(0x%" PRIx64 ")\n", blob->id, pages[0].id); return -ENOENT; } @@ -1597,7 +1597,7 @@ blob_load_cpl(spdk_bs_sequence_t *seq, void *cb_arg, int bserrno) } if (bserrno) { - SPDK_ERRLOG("Metadata page %d read failed for blobid %" PRIu64 ": %d\n", + SPDK_ERRLOG("Metadata page %d read failed for blobid 0x%" PRIx64 ": %d\n", current_page, blob->id, bserrno); blob_load_final(ctx, bserrno); return; @@ -1606,7 +1606,7 @@ blob_load_cpl(spdk_bs_sequence_t *seq, void *cb_arg, int bserrno) page = &ctx->pages[ctx->num_pages - 1]; crc = blob_md_page_calc_crc(page); if (crc != page->crc) { - SPDK_ERRLOG("Metadata page %d crc mismatch for blobid %" PRIu64 "\n", + SPDK_ERRLOG("Metadata page %d crc mismatch for blobid 0x%" PRIx64 "\n", current_page, blob->id); blob_load_final(ctx, -EINVAL); return; @@ -5986,7 +5986,7 @@ bs_create_blob(struct spdk_blob_store *bs, id = bs_page_to_blobid(page_idx); - SPDK_DEBUGLOG(blob, "Creating blob with id %" PRIu64 " at page %u\n", id, page_idx); + SPDK_DEBUGLOG(blob, "Creating blob with id 0x%" PRIx64 " at page %u\n", id, page_idx); spdk_blob_opts_init(&opts_local, sizeof(opts_local)); if (opts) { @@ -6489,8 +6489,8 @@ bs_snapshot_origblob_open_cpl(void *cb_arg, struct spdk_blob *_blob, int bserrno ctx->original.blob = _blob; if (_blob->data_ro || _blob->md_ro) { - SPDK_DEBUGLOG(blob, "Cannot create snapshot from read only blob with id %" PRIu64 "\n", - _blob->id); + SPDK_DEBUGLOG(blob, "Cannot create snapshot from read only blob with id 0x%" + PRIx64 "\n", _blob->id); ctx->bserrno = -EINVAL; spdk_blob_close(_blob, bs_clone_snapshot_cleanup_finish, ctx); return;