Commit 7bdba443 authored by Daniel Verkamp's avatar Daniel Verkamp Committed by Ben Walker
Browse files

bdev: make fn_table a const pointer



The table of bdev function pointers should not need to be modified at
runtime.

Change-Id: I3e8876fc83df9296ce528231269b1a905c96072c
Signed-off-by: default avatarDaniel Verkamp <daniel.verkamp@intel.com>
parent 02ccb0f7
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -90,7 +90,7 @@ struct spdk_bdev {
	int thin_provisioning;

	/** function table for all LUN ops */
	struct spdk_bdev_fn_table *fn_table;
	const struct spdk_bdev_fn_table *fn_table;

	/** Represents maximum unmap block descriptor count */
	uint32_t max_unmap_bdesc_count;
+1 −1
Original line number Diff line number Diff line
@@ -288,7 +288,7 @@ blockdev_aio_io_type_supported(struct spdk_bdev *bdev, enum spdk_bdev_io_type io
	}
}

static struct spdk_bdev_fn_table aio_fn_table = {
static const struct spdk_bdev_fn_table aio_fn_table = {
	.destruct		= blockdev_aio_destruct,
	.check_io		= blockdev_aio_check_io,
	.submit_request		= blockdev_aio_submit_request,
+1 −1
Original line number Diff line number Diff line
@@ -266,7 +266,7 @@ blockdev_malloc_io_type_supported(struct spdk_bdev *bdev, enum spdk_bdev_io_type
	}
}

static struct spdk_bdev_fn_table malloc_fn_table = {
static const struct spdk_bdev_fn_table malloc_fn_table = {
	.destruct		= blockdev_malloc_destruct,
	.check_io		= blockdev_malloc_check_io,
	.submit_request		= blockdev_malloc_submit_request,
+1 −1
Original line number Diff line number Diff line
@@ -294,7 +294,7 @@ blockdev_nvme_io_type_supported(struct spdk_bdev *bdev, enum spdk_bdev_io_type i
	}
}

static struct spdk_bdev_fn_table nvmelib_fn_table = {
static const struct spdk_bdev_fn_table nvmelib_fn_table = {
	.destruct		= blockdev_nvme_destruct,
	.check_io		= blockdev_nvme_check_io,
	.submit_request		= blockdev_nvme_submit_request,