Commit 305cb239 authored by Ben Walker's avatar Ben Walker Committed by Daniel Verkamp
Browse files

io_channel: Remove unique flag



This is no longer used anywhere. For the places where we previously
used it, we've since found alternate solutions that do not
require it.

Change-Id: I738a80b95ef50348ce1c14969a3812b0a625b3fd
Signed-off-by: default avatarBen Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/362064


Tested-by: default avatar <sys_sgsw@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
parent 267a4e1e
Loading
Loading
Loading
Loading
+2 −10
Original line number Diff line number Diff line
@@ -46,8 +46,7 @@

struct spdk_io_channel;

typedef int (*io_channel_create_cb_t)(void *io_device, uint32_t priority, void *ctx_buf,
				      void *unique_ctx);
typedef int (*io_channel_create_cb_t)(void *io_device, uint32_t priority, void *ctx_buf);
typedef void (*io_channel_destroy_cb_t)(void *io_device, void *ctx_buf);

/**
@@ -97,15 +96,8 @@ void spdk_io_device_unregister(void *io_device);
 * The priority parameter allows callers to create different I/O channels to the same
 *  I/O device with varying priorities.  Currently this value must be set to
 *  SPDK_IO_PRIORITY_DEFAULT.
 *
 * 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,
		void *unique_ctx);
struct spdk_io_channel *spdk_get_io_channel(void *io_device, uint32_t priority);

/**
 * \brief Releases a reference to an I/O channel.
+2 −2
Original line number Diff line number Diff line
@@ -290,7 +290,7 @@ blockdev_aio_io_type_supported(void *ctx, enum spdk_bdev_io_type io_type)
}

static int
blockdev_aio_create_cb(void *io_device, uint32_t priority, void *ctx_buf, void *unique_ctx)
blockdev_aio_create_cb(void *io_device, uint32_t priority, void *ctx_buf)
{
	struct blockdev_aio_io_channel *ch = ctx_buf;

@@ -318,7 +318,7 @@ blockdev_aio_get_io_channel(void *ctx, uint32_t priority)
{
	struct file_disk *fdisk = ctx;

	return spdk_get_io_channel(&fdisk->fd, priority, false, NULL);
	return spdk_get_io_channel(&fdisk->fd, priority);
}

static const struct spdk_bdev_fn_table aio_fn_table = {
+2 −3
Original line number Diff line number Diff line
@@ -507,8 +507,7 @@ spdk_bdev_dump_config_json(struct spdk_bdev *bdev, struct spdk_json_write_ctx *w
}

static int
spdk_bdev_channel_create(void *io_device, uint32_t priority, void *ctx_buf,
			 void *unique_ctx)
spdk_bdev_channel_create(void *io_device, uint32_t priority, void *ctx_buf)
{
	struct spdk_bdev		*bdev = io_device;
	struct spdk_bdev_channel	*ch = ctx_buf;
@@ -530,7 +529,7 @@ spdk_bdev_channel_destroy(void *io_device, void *ctx_buf)
struct spdk_io_channel *
spdk_bdev_get_io_channel(struct spdk_bdev *bdev, uint32_t priority)
{
	return spdk_get_io_channel(bdev, priority, false, NULL);
	return spdk_get_io_channel(bdev, priority);
}

const char *
+2 −2
Original line number Diff line number Diff line
@@ -110,7 +110,7 @@ blockdev_null_io_type_supported(void *ctx, enum spdk_bdev_io_type io_type)
static struct spdk_io_channel *
blockdev_null_get_io_channel(void *ctx, uint32_t priority)
{
	return spdk_get_io_channel(&g_null_bdev_head, priority, false, NULL);
	return spdk_get_io_channel(&g_null_bdev_head, priority);
}

static const struct spdk_bdev_fn_table null_fn_table = {
@@ -160,7 +160,7 @@ create_null_bdev(const char *name, uint64_t num_blocks, uint32_t block_size)
}

static int
null_bdev_create_cb(void *io_device, uint32_t priority, void *ctx_buf, void *unique_ctx)
null_bdev_create_cb(void *io_device, uint32_t priority, void *ctx_buf)
{
	return 0;
}
+2 −2
Original line number Diff line number Diff line
@@ -343,7 +343,7 @@ bdev_nvme_io_type_supported(void *ctx, enum spdk_bdev_io_type io_type)
}

static int
bdev_nvme_create_cb(void *io_device, uint32_t priority, void *ctx_buf, void *unique_ctx)
bdev_nvme_create_cb(void *io_device, uint32_t priority, void *ctx_buf)
{
	struct spdk_nvme_ctrlr *ctrlr = io_device;
	struct nvme_io_channel *ch = ctx_buf;
@@ -373,7 +373,7 @@ bdev_nvme_get_io_channel(void *ctx, uint32_t priority)
{
	struct nvme_bdev *nvme_bdev = ctx;

	return spdk_get_io_channel(nvme_bdev->nvme_ctrlr->ctrlr, priority, false, NULL);
	return spdk_get_io_channel(nvme_bdev->nvme_ctrlr->ctrlr, priority);
}

static int
Loading