bdev/part: add API to get name of bdev_part_base
Change-Id: I1545f5aaab67c3a56d37c712cafc932c089a0477 Signed-off-by: Chunyang Hui <chunyang.hui@intel.com> Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/468909 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Changpeng Liu <changpeng.liu@intel.com> Reviewed-by: Paul Luse <paul.e.luse@intel.com>
This commit is contained in:
parent
ae80025286
commit
b60a249bea
@ -913,6 +913,15 @@ struct spdk_bdev_part_base;
|
||||
*/
|
||||
struct spdk_bdev *spdk_bdev_part_base_get_bdev(struct spdk_bdev_part_base *part_base);
|
||||
|
||||
/**
|
||||
* Returns a spdk_bdev name of the corresponding spdk_bdev_part_base
|
||||
*
|
||||
* \param part_base A pointer to an spdk_bdev_part_base object.
|
||||
*
|
||||
* \return A text string representing the name of the base bdev.
|
||||
*/
|
||||
const char *spdk_bdev_part_base_get_bdev_name(struct spdk_bdev_part_base *part_base);
|
||||
|
||||
/**
|
||||
* Returns a pointer to the spdk_bdev_descriptor associated with an spdk_bdev_part_base
|
||||
*
|
||||
|
@ -81,6 +81,12 @@ spdk_bdev_part_base_get_ctx(struct spdk_bdev_part_base *part_base)
|
||||
return part_base->ctx;
|
||||
}
|
||||
|
||||
const char *
|
||||
spdk_bdev_part_base_get_bdev_name(struct spdk_bdev_part_base *part_base)
|
||||
{
|
||||
return part_base->bdev->name;
|
||||
}
|
||||
|
||||
void
|
||||
spdk_bdev_part_base_free(struct spdk_bdev_part_base *base)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user