include/nbd: add comments for public APIs
Change-Id: I97db4d4ec7313ee4862b02dda83aba921afc4f48 Signed-off-by: Yanbo Zhou <yanbo.zhou@intel.com> Reviewed-on: https://review.gerrithub.io/405850 Tested-by: SPDK Automated Test System <sys_sgsw@intel.com> Reviewed-by: GangCao <gang.cao@intel.com> Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
parent
f63b058d4f
commit
d734471b93
@ -31,6 +31,10 @@
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
/** \file
|
||||
* Network block device layer
|
||||
*/
|
||||
|
||||
#ifndef SPDK_NBD_H_
|
||||
#define SPDK_NBD_H_
|
||||
|
||||
@ -41,12 +45,34 @@ extern "C" {
|
||||
struct spdk_bdev;
|
||||
struct spdk_nbd_disk;
|
||||
|
||||
/**
|
||||
* Initialize the network block device layer.
|
||||
*
|
||||
* \return 0 on success.
|
||||
*/
|
||||
int spdk_nbd_init(void);
|
||||
|
||||
/**
|
||||
* Stop and close all the running network block devices.
|
||||
*/
|
||||
void spdk_nbd_fini(void);
|
||||
|
||||
/**
|
||||
* Start a network block device backed by the bdev.
|
||||
*
|
||||
* \param bdev_name Name of bdev exposed as a network block device.
|
||||
* \param nbd_path Path to the registered network block device.
|
||||
*
|
||||
* \return a pointer to the configuration of the registered network block device
|
||||
* on success, or NULL on failure.
|
||||
*/
|
||||
struct spdk_nbd_disk *spdk_nbd_start(const char *bdev_name, const char *nbd_path);
|
||||
|
||||
/**
|
||||
* Stop the running network block device safely.
|
||||
*
|
||||
* \param nbd A pointer to the network block device to stop.
|
||||
*/
|
||||
void spdk_nbd_stop(struct spdk_nbd_disk *nbd);
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
Loading…
x
Reference in New Issue
Block a user