Loading include/spdk/io_channel.h +7 −2 Original line number Diff line number Diff line Loading @@ -46,7 +46,8 @@ struct spdk_io_channel; typedef int (*io_channel_create_cb_t)(void *io_device, uint32_t priority, void *ctx_buf); typedef int (*io_channel_create_cb_t)(void *io_device, uint32_t priority, void *ctx_buf, void *unique_ctx); typedef void (*io_channel_destroy_cb_t)(void *io_device, void *ctx_buf); /** Loading Loading @@ -99,8 +100,12 @@ void spdk_io_device_unregister(void *io_device); * * The unique parameter allows callers to specify that an existing channel should not * be used to satisfy this request, even if the io_device and priority fields match. * * The unique_ctx parameter allows callers to pass channel-specific context to the create_cb * handler for unique channels. This value must be NULL for shared channels. */ struct spdk_io_channel *spdk_get_io_channel(void *io_device, uint32_t priority, bool unique); struct spdk_io_channel *spdk_get_io_channel(void *io_device, uint32_t priority, bool unique, void *unique_ctx); /** * \brief Releases a reference to an I/O channel. Loading lib/bdev/aio/blockdev_aio.c +2 −2 Original line number Diff line number Diff line Loading @@ -310,7 +310,7 @@ blockdev_aio_io_type_supported(struct spdk_bdev *bdev, enum spdk_bdev_io_type io } static int blockdev_aio_create_cb(void *io_device, uint32_t priority, void *ctx_buf) blockdev_aio_create_cb(void *io_device, uint32_t priority, void *ctx_buf, void *unique_ctx) { struct blockdev_aio_io_channel *ch = ctx_buf; Loading @@ -336,7 +336,7 @@ blockdev_aio_destroy_cb(void *io_device, void *ctx_buf) static struct spdk_io_channel * blockdev_aio_get_io_channel(struct spdk_bdev *bdev, uint32_t priority) { return spdk_get_io_channel(bdev, priority, false); return spdk_get_io_channel(bdev, priority, false, NULL); } static const struct spdk_bdev_fn_table aio_fn_table = { Loading lib/bdev/nvme/blockdev_nvme.c +2 −2 Original line number Diff line number Diff line Loading @@ -306,7 +306,7 @@ blockdev_nvme_io_type_supported(struct spdk_bdev *bdev, enum spdk_bdev_io_type i } static int blockdev_nvme_create_cb(void *io_device, uint32_t priority, void *ctx_buf) blockdev_nvme_create_cb(void *io_device, uint32_t priority, void *ctx_buf, void *unique_ctx) { struct spdk_nvme_ctrlr *ctrlr = io_device; struct nvme_io_channel *ch = ctx_buf; Loading Loading @@ -336,7 +336,7 @@ blockdev_nvme_get_io_channel(struct spdk_bdev *bdev, uint32_t priority) { struct nvme_blockdev *nvme_bdev = (struct nvme_blockdev *)bdev; return spdk_get_io_channel(nvme_bdev->ctrlr, priority, false); return spdk_get_io_channel(nvme_bdev->ctrlr, priority, false, NULL); } static const struct spdk_bdev_fn_table nvmelib_fn_table = { Loading lib/copy/copy_engine.c +4 −4 Original line number Diff line number Diff line Loading @@ -139,7 +139,7 @@ static struct spdk_copy_engine memcpy_copy_engine = { }; static int memcpy_create_cb(void *io_device, uint32_t priority, void *ctx_buf) memcpy_create_cb(void *io_device, uint32_t priority, void *ctx_buf, void *unique_ctx) { return 0; } Loading @@ -151,7 +151,7 @@ memcpy_destroy_cb(void *io_device, void *ctx_buf) static struct spdk_io_channel *mem_get_io_channel(uint32_t priority) { return spdk_get_io_channel(&memcpy_copy_engine, priority, false); return spdk_get_io_channel(&memcpy_copy_engine, priority, false, NULL); } static int Loading Loading @@ -179,7 +179,7 @@ void spdk_copy_module_list_add(struct spdk_copy_module_if *copy_module) } static int copy_create_cb(void *io_device, uint32_t priority, void *ctx_buf) copy_create_cb(void *io_device, uint32_t priority, void *ctx_buf, void *unique_ctx) { struct copy_io_channel *copy_ch = ctx_buf; Loading Loading @@ -208,7 +208,7 @@ copy_destroy_cb(void *io_device, void *ctx_buf) struct spdk_io_channel * spdk_copy_engine_get_io_channel(uint32_t priority) { return spdk_get_io_channel(&spdk_copy_module_list, priority, false); return spdk_get_io_channel(&spdk_copy_module_list, priority, false, NULL); } static int Loading lib/copy/ioat/copy_engine_ioat.c +2 −2 Original line number Diff line number Diff line Loading @@ -207,7 +207,7 @@ static struct spdk_copy_engine ioat_copy_engine = { }; static int ioat_create_cb(void *io_device, uint32_t priority, void *ctx_buf) ioat_create_cb(void *io_device, uint32_t priority, void *ctx_buf, void *unique_ctx) { struct ioat_io_channel *ch = ctx_buf; struct ioat_device *ioat_dev; Loading Loading @@ -236,7 +236,7 @@ ioat_destroy_cb(void *io_device, void *ctx_buf) static struct spdk_io_channel * ioat_get_io_channel(uint32_t priority) { return spdk_get_io_channel(&ioat_copy_engine, priority, false); return spdk_get_io_channel(&ioat_copy_engine, priority, false, NULL); } struct ioat_probe_ctx { Loading Loading
include/spdk/io_channel.h +7 −2 Original line number Diff line number Diff line Loading @@ -46,7 +46,8 @@ struct spdk_io_channel; typedef int (*io_channel_create_cb_t)(void *io_device, uint32_t priority, void *ctx_buf); typedef int (*io_channel_create_cb_t)(void *io_device, uint32_t priority, void *ctx_buf, void *unique_ctx); typedef void (*io_channel_destroy_cb_t)(void *io_device, void *ctx_buf); /** Loading Loading @@ -99,8 +100,12 @@ void spdk_io_device_unregister(void *io_device); * * The unique parameter allows callers to specify that an existing channel should not * be used to satisfy this request, even if the io_device and priority fields match. * * The unique_ctx parameter allows callers to pass channel-specific context to the create_cb * handler for unique channels. This value must be NULL for shared channels. */ struct spdk_io_channel *spdk_get_io_channel(void *io_device, uint32_t priority, bool unique); struct spdk_io_channel *spdk_get_io_channel(void *io_device, uint32_t priority, bool unique, void *unique_ctx); /** * \brief Releases a reference to an I/O channel. Loading
lib/bdev/aio/blockdev_aio.c +2 −2 Original line number Diff line number Diff line Loading @@ -310,7 +310,7 @@ blockdev_aio_io_type_supported(struct spdk_bdev *bdev, enum spdk_bdev_io_type io } static int blockdev_aio_create_cb(void *io_device, uint32_t priority, void *ctx_buf) blockdev_aio_create_cb(void *io_device, uint32_t priority, void *ctx_buf, void *unique_ctx) { struct blockdev_aio_io_channel *ch = ctx_buf; Loading @@ -336,7 +336,7 @@ blockdev_aio_destroy_cb(void *io_device, void *ctx_buf) static struct spdk_io_channel * blockdev_aio_get_io_channel(struct spdk_bdev *bdev, uint32_t priority) { return spdk_get_io_channel(bdev, priority, false); return spdk_get_io_channel(bdev, priority, false, NULL); } static const struct spdk_bdev_fn_table aio_fn_table = { Loading
lib/bdev/nvme/blockdev_nvme.c +2 −2 Original line number Diff line number Diff line Loading @@ -306,7 +306,7 @@ blockdev_nvme_io_type_supported(struct spdk_bdev *bdev, enum spdk_bdev_io_type i } static int blockdev_nvme_create_cb(void *io_device, uint32_t priority, void *ctx_buf) blockdev_nvme_create_cb(void *io_device, uint32_t priority, void *ctx_buf, void *unique_ctx) { struct spdk_nvme_ctrlr *ctrlr = io_device; struct nvme_io_channel *ch = ctx_buf; Loading Loading @@ -336,7 +336,7 @@ blockdev_nvme_get_io_channel(struct spdk_bdev *bdev, uint32_t priority) { struct nvme_blockdev *nvme_bdev = (struct nvme_blockdev *)bdev; return spdk_get_io_channel(nvme_bdev->ctrlr, priority, false); return spdk_get_io_channel(nvme_bdev->ctrlr, priority, false, NULL); } static const struct spdk_bdev_fn_table nvmelib_fn_table = { Loading
lib/copy/copy_engine.c +4 −4 Original line number Diff line number Diff line Loading @@ -139,7 +139,7 @@ static struct spdk_copy_engine memcpy_copy_engine = { }; static int memcpy_create_cb(void *io_device, uint32_t priority, void *ctx_buf) memcpy_create_cb(void *io_device, uint32_t priority, void *ctx_buf, void *unique_ctx) { return 0; } Loading @@ -151,7 +151,7 @@ memcpy_destroy_cb(void *io_device, void *ctx_buf) static struct spdk_io_channel *mem_get_io_channel(uint32_t priority) { return spdk_get_io_channel(&memcpy_copy_engine, priority, false); return spdk_get_io_channel(&memcpy_copy_engine, priority, false, NULL); } static int Loading Loading @@ -179,7 +179,7 @@ void spdk_copy_module_list_add(struct spdk_copy_module_if *copy_module) } static int copy_create_cb(void *io_device, uint32_t priority, void *ctx_buf) copy_create_cb(void *io_device, uint32_t priority, void *ctx_buf, void *unique_ctx) { struct copy_io_channel *copy_ch = ctx_buf; Loading Loading @@ -208,7 +208,7 @@ copy_destroy_cb(void *io_device, void *ctx_buf) struct spdk_io_channel * spdk_copy_engine_get_io_channel(uint32_t priority) { return spdk_get_io_channel(&spdk_copy_module_list, priority, false); return spdk_get_io_channel(&spdk_copy_module_list, priority, false, NULL); } static int Loading
lib/copy/ioat/copy_engine_ioat.c +2 −2 Original line number Diff line number Diff line Loading @@ -207,7 +207,7 @@ static struct spdk_copy_engine ioat_copy_engine = { }; static int ioat_create_cb(void *io_device, uint32_t priority, void *ctx_buf) ioat_create_cb(void *io_device, uint32_t priority, void *ctx_buf, void *unique_ctx) { struct ioat_io_channel *ch = ctx_buf; struct ioat_device *ioat_dev; Loading Loading @@ -236,7 +236,7 @@ ioat_destroy_cb(void *io_device, void *ctx_buf) static struct spdk_io_channel * ioat_get_io_channel(uint32_t priority) { return spdk_get_io_channel(&ioat_copy_engine, priority, false); return spdk_get_io_channel(&ioat_copy_engine, priority, false, NULL); } struct ioat_probe_ctx { Loading