Loading app/nvmf_tgt/conf.c +1 −1 Original line number Diff line number Diff line Loading @@ -613,7 +613,7 @@ spdk_nvmf_construct_subsystem(const char *name, } SPDK_NOTICELOG("Attaching block device %s to subsystem %s\n", bdev->name, subsystem->subnqn); spdk_bdev_get_name(bdev), subsystem->subnqn); } } Loading include/spdk/bdev.h +16 −0 Original line number Diff line number Diff line Loading @@ -199,6 +199,22 @@ bool spdk_bdev_io_type_supported(struct spdk_bdev *bdev, enum spdk_bdev_io_type int spdk_bdev_dump_config_json(struct spdk_bdev *bdev, struct spdk_json_write_ctx *w); /** * Get block device name. * * \param bdev Block device to query. * \return Name of bdev as a null-terminated string. */ const char *spdk_bdev_get_name(const struct spdk_bdev *bdev); /** * Get block device product name. * * \param bdev Block device to query. * \return Product name of bdev as a null-terminated string. */ const char *spdk_bdev_get_product_name(const struct spdk_bdev *bdev); /** * Get minimum I/O buffer address alignment for a bdev. * Loading lib/bdev/aio/blockdev_aio_rpc.c +1 −1 Original line number Diff line number Diff line Loading @@ -83,7 +83,7 @@ spdk_rpc_construct_aio_bdev(struct spdk_jsonrpc_server_conn *conn, w = spdk_jsonrpc_begin_result(conn, id); spdk_json_write_array_begin(w); spdk_json_write_string(w, bdev->name); spdk_json_write_string(w, spdk_bdev_get_name(bdev)); spdk_json_write_array_end(w); spdk_jsonrpc_end_result(conn, w); return; Loading lib/bdev/bdev.c +12 −0 Original line number Diff line number Diff line Loading @@ -533,6 +533,18 @@ spdk_bdev_get_io_channel(struct spdk_bdev *bdev, uint32_t priority) return spdk_get_io_channel(bdev, priority, false, NULL); } const char * spdk_bdev_get_name(const struct spdk_bdev *bdev) { return bdev->name; } const char * spdk_bdev_get_product_name(const struct spdk_bdev *bdev) { return bdev->product_name; } size_t spdk_bdev_get_buf_align(const struct spdk_bdev *bdev) { Loading lib/bdev/malloc/blockdev_malloc_rpc.c +1 −1 Original line number Diff line number Diff line Loading @@ -74,7 +74,7 @@ spdk_rpc_construct_malloc_bdev(struct spdk_jsonrpc_server_conn *conn, w = spdk_jsonrpc_begin_result(conn, id); spdk_json_write_array_begin(w); spdk_json_write_string(w, bdev->name); spdk_json_write_string(w, spdk_bdev_get_name(bdev)); spdk_json_write_array_end(w); spdk_jsonrpc_end_result(conn, w); return; Loading Loading
app/nvmf_tgt/conf.c +1 −1 Original line number Diff line number Diff line Loading @@ -613,7 +613,7 @@ spdk_nvmf_construct_subsystem(const char *name, } SPDK_NOTICELOG("Attaching block device %s to subsystem %s\n", bdev->name, subsystem->subnqn); spdk_bdev_get_name(bdev), subsystem->subnqn); } } Loading
include/spdk/bdev.h +16 −0 Original line number Diff line number Diff line Loading @@ -199,6 +199,22 @@ bool spdk_bdev_io_type_supported(struct spdk_bdev *bdev, enum spdk_bdev_io_type int spdk_bdev_dump_config_json(struct spdk_bdev *bdev, struct spdk_json_write_ctx *w); /** * Get block device name. * * \param bdev Block device to query. * \return Name of bdev as a null-terminated string. */ const char *spdk_bdev_get_name(const struct spdk_bdev *bdev); /** * Get block device product name. * * \param bdev Block device to query. * \return Product name of bdev as a null-terminated string. */ const char *spdk_bdev_get_product_name(const struct spdk_bdev *bdev); /** * Get minimum I/O buffer address alignment for a bdev. * Loading
lib/bdev/aio/blockdev_aio_rpc.c +1 −1 Original line number Diff line number Diff line Loading @@ -83,7 +83,7 @@ spdk_rpc_construct_aio_bdev(struct spdk_jsonrpc_server_conn *conn, w = spdk_jsonrpc_begin_result(conn, id); spdk_json_write_array_begin(w); spdk_json_write_string(w, bdev->name); spdk_json_write_string(w, spdk_bdev_get_name(bdev)); spdk_json_write_array_end(w); spdk_jsonrpc_end_result(conn, w); return; Loading
lib/bdev/bdev.c +12 −0 Original line number Diff line number Diff line Loading @@ -533,6 +533,18 @@ spdk_bdev_get_io_channel(struct spdk_bdev *bdev, uint32_t priority) return spdk_get_io_channel(bdev, priority, false, NULL); } const char * spdk_bdev_get_name(const struct spdk_bdev *bdev) { return bdev->name; } const char * spdk_bdev_get_product_name(const struct spdk_bdev *bdev) { return bdev->product_name; } size_t spdk_bdev_get_buf_align(const struct spdk_bdev *bdev) { Loading
lib/bdev/malloc/blockdev_malloc_rpc.c +1 −1 Original line number Diff line number Diff line Loading @@ -74,7 +74,7 @@ spdk_rpc_construct_malloc_bdev(struct spdk_jsonrpc_server_conn *conn, w = spdk_jsonrpc_begin_result(conn, id); spdk_json_write_array_begin(w); spdk_json_write_string(w, bdev->name); spdk_json_write_string(w, spdk_bdev_get_name(bdev)); spdk_json_write_array_end(w); spdk_jsonrpc_end_result(conn, w); return; Loading