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:
parent
02ccb0f791
commit
7bdba4437d
@ -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;
|
||||
|
@ -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,
|
||||
|
@ -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,
|
||||
|
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user