Commit f7cc6174 authored by Mike Gerdts's avatar Mike Gerdts Committed by Jim Harris
Browse files

blob: log blob ID as hex, again



This is a followup to commit f4dc5582
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: default avatarMike Gerdts <mgerdts@nvidia.com>
Change-Id: I75d1b5973ee7e812f7caf0e826d3edbcba126743
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/17641


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarAleksey Marchuk <alexeymar@nvidia.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Community-CI: Mellanox Build Bot
parent fdeb57c0
Loading
Loading
Loading
Loading
+7 −7
Original line number Diff line number Diff line
@@ -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;