Commit eb9d8f34 authored by Shuhei Matsumoto's avatar Shuhei Matsumoto Committed by Tomasz Zawadzki
Browse files

lib/thread: Add spdk_io_device_get_name as a SPDK internal API



This is a preparation to support thread_get_io_channels RPC
in the next patch. The next patch will refer only name of struct
io_device, and so adding a helper function is better than making
struct io_device public.

Signed-off-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I9bc9dd78f71aa1e32847dc4c67eb79dae9cfbf9d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/886


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Reviewed-by: default avatarAleksey Marchuk <alexeymar@mellanox.com>
parent 0b0f0c54
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -113,4 +113,6 @@ struct spdk_thread {

const char *spdk_poller_state_str(enum spdk_poller_state state);

const char *spdk_io_device_get_name(struct io_device *dev);

#endif /* SPDK_THREAD_INTERNAL_H_ */
+6 −0
Original line number Diff line number Diff line
@@ -1215,6 +1215,12 @@ spdk_io_device_unregister(void *io_device, spdk_io_device_unregister_cb unregist
	_spdk_io_device_free(dev);
}

const char *
spdk_io_device_get_name(struct io_device *dev)
{
	return dev->name;
}

struct spdk_io_channel *
spdk_get_io_channel(void *io_device)
{