+10
−11
+11
−31
Loading
The bdev_null_create RPC set rpc_construct_null structure and copied it to null_bdev_opts structure. However, this was not efficient or clean. The difference of rpc_construct_null structure and null_bdev_opts structure were: 1. null_bdev_opts::block_size was block size, rpc_construct_null::block_size was data block size 2. null_bdev_opts::uuid was pointer, rpc_construct_null::uuid was instance For #1, as we do for malloc bdev, we can use null_bdev_opts::block_size as data block size. If null_bdev_opts::block_size is data block size, we do not have to compare opts::block_size and opts::md_size. For #2, as we do for malloc bdev, null_bdev_opts::uuid can be instance and we can copy null_bdev_opts::uuid to spdk_bdev::uuid. Additionally, spdk_null_bdev_opts is not a public data structure. Hence, it should not have "spdk_" prefix. Signed-off-by:Shuhei Matsumoto <smatsumoto@nvidia.com> Change-Id: If53702071cf02fe23d03f464a63c2495c70e1f12 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/24109 Reviewed-by:
Jim Harris <jim.harris@samsung.com> Reviewed-by:
Aleksey Marchuk <alexeymar@nvidia.com> Tested-by:
SPDK CI Jenkins <sys_sgci@intel.com> Community-CI: Mellanox Build Bot