From 575a4025c51c9a2cce80c35c6eb2037fff8f829a Mon Sep 17 00:00:00 2001 From: Seth Howell Date: Mon, 25 Jun 2018 16:12:07 -0700 Subject: [PATCH] bdev: Add docs to new functions in bdev_module.h Change-Id: I4cde4e74879ef1cbf2d75ff5f8d2f054bf3f3141 Signed-off-by: Seth Howell Reviewed-on: https://review.gerrithub.io/416763 Tested-by: SPDK Automated Test System Reviewed-by: John Kariuki Reviewed-by: Jim Harris Reviewed-by: Daniel Verkamp Reviewed-by: Shuhei Matsumoto Reviewed-by: Ben Walker --- include/spdk/bdev_module.h | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/include/spdk/bdev_module.h b/include/spdk/bdev_module.h index b62849b02..89f33ed02 100644 --- a/include/spdk/bdev_module.h +++ b/include/spdk/bdev_module.h @@ -688,14 +688,49 @@ spdk_bdev_io_from_ctx(void *ctx) struct spdk_bdev_part_base; +/** + * Returns a pointer to the spdk_bdev associated with an spdk_bdev_part_base + * + * \param part_base A pointer to an spdk_bdev_part_base object. + * + * \return A pointer to the base's spdk_bdev struct. + */ struct spdk_bdev *spdk_bdev_part_base_get_bdev(struct spdk_bdev_part_base *part_base); +/** + * Returns a pointer to the spdk_bdev_descriptor associated with an spdk_bdev_part_base + * + * \param part_base A pointer to an spdk_bdev_part_base object. + * + * \return A pointer to the base's spdk_bdev_desc struct. + */ struct spdk_bdev_desc *spdk_bdev_part_base_get_desc(struct spdk_bdev_part_base *part_base); +/** + * Returns a pointer to the tailq associated with an spdk_bdev_part_base + * + * \param part_base A pointer to an spdk_bdev_part_base object. + * + * \return The head of a tailq of spdk_bdev_part structs registered to the base's module. + */ struct bdev_part_tailq *spdk_bdev_part_base_get_tailq(struct spdk_bdev_part_base *part_base); +/** + * Returns a pointer to the module level context associated with an spdk_bdev_part_base + * + * \param part_base A pointer to an spdk_bdev_part_base object. + * + * \return A pointer to the module level context registered with the base in spdk_bdev_part_base_construct. + */ void *spdk_bdev_part_base_get_ctx(struct spdk_bdev_part_base *part_base); +/** + * Returns the reference number associated with an spdk_bdev_part_base + * + * \param part_base A pointer to an spdk_bdev_part_base object. + * + * \return The base's reference number. + */ uint32_t spdk_bdev_part_base_get_ref(struct spdk_bdev_part_base *part_base); typedef void (*spdk_bdev_part_base_free_fn)(void *ctx);