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: Daniel Verkamp <daniel.verkamp@intel.com>
This commit is contained in:
Daniel Verkamp 2016-08-30 12:56:06 -07:00 committed by Ben Walker
parent 02ccb0f791
commit 7bdba4437d
4 changed files with 4 additions and 4 deletions

View File

@ -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;

View File

@ -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,

View File

@ -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,

View File

@ -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,