Commit c0b7ff1f authored by Karol Kolacinski's avatar Karol Kolacinski Committed by Jim Harris
Browse files

lib/bdev: Fix spdk_bdev_claim_get_name string



spdk_bdev_claim_get_name() returns "read_many_write_many" for
SPDK_BDEV_CLAIM_READ_MANY_WRITE_SHARED, while the mapping in
the description says it's "read_many_write_shared".

Fix the string returned by this function by aligning it to the enum name
and its description by removing the mapping in the description.

Change-Id: I152d574afdf4f52cfadb66a607648cd5a0d4ea0a
Signed-off-by: default avatarKarol Kolacinski <karol.kolacinski@dell.com>
Reviewed-on: https://review.spdk.io/c/spdk/spdk/+/26415


Tested-by: default avatarSPDK Automated Test System <spdkbot@gmail.com>
Reviewed-by: default avatarChangpeng Liu <changpeliu@tencent.com>
Community-CI: Mellanox Build Bot
Reviewed-by: default avatarJim Harris <jim.harris@nvidia.com>
parent 03b3be47
Loading
Loading
Loading
Loading
+2 −10
Original line number Diff line number Diff line
@@ -220,16 +220,8 @@ struct spdk_bdev_claim_opts {
SPDK_STATIC_ASSERT(sizeof(struct spdk_bdev_claim_opts) == 48, "Incorrect size");

/**
 * Retrieve the name of the bdev module claim type. The mapping between claim types and their names
 * is:
 *
 *   SPDK_BDEV_CLAIM_NONE			"not_claimed"
 *   SPDK_BDEV_CLAIM_EXCL_WRITE			"exclusive_write"
 *   SPDK_BDEV_CLAIM_READ_MANY_WRITE_ONE	"read_many_write_one"
 *   SPDK_BDEV_CLAIM_READ_MANY_WRITE_NONE	"read_many_write_none"
 *   SPDK_BDEV_CLAIM_READ_MANY_WRITE_SHARED	"read_many_write_shared"
 *
 * Any other value will return "invalid_claim".
 * Retrieve the name of the bdev module claim type.
 * See function definition for mapping claims types to name.
 *
 * \param claim_type The claim type.
 * \return A string that describes the claim type.
+1 −1
Original line number Diff line number Diff line
@@ -9281,7 +9281,7 @@ spdk_bdev_claim_get_name(enum spdk_bdev_claim_type type)
	case SPDK_BDEV_CLAIM_READ_MANY_WRITE_NONE:
		return "read_many_write_none";
	case SPDK_BDEV_CLAIM_READ_MANY_WRITE_SHARED:
		return "read_many_write_many";
		return "read_many_write_shared";
	default:
		break;
	}