nbd: Add a function to get the nbd path

Change-Id: I7d121e8c6985a1b355c130248963008da0c63ac7
Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/433936
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This commit is contained in:
Ben Walker 2018-11-19 13:14:56 -07:00 committed by Jim Harris
parent c42bee0cb6
commit bc7b547368
2 changed files with 11 additions and 0 deletions

View File

@ -77,6 +77,11 @@ struct spdk_nbd_disk *spdk_nbd_start(const char *bdev_name, const char *nbd_path
*/
void spdk_nbd_stop(struct spdk_nbd_disk *nbd);
/**
* Get the local filesystem path used for the network block device.
*/
const char *spdk_nbd_get_path(struct spdk_nbd_disk *nbd);
/**
* Write NBD subsystem configuration into provided JSON context.
*

View File

@ -966,4 +966,10 @@ err:
return NULL;
}
const char *
spdk_nbd_get_path(struct spdk_nbd_disk *nbd)
{
return nbd->nbd_path;
}
SPDK_LOG_REGISTER_COMPONENT("nbd", SPDK_LOG_NBD)