Spdk/module/bdev
Marcin Dziegielewski 1b6d1c80f9 lib/bdev/ocf: fix potential issue around base->management_channel
This patch improves management of base->management_channel in code and
fixes potential issue described below. In situation when we want to create
configuration like this:

$rpc_py bdev_ocf_create C1 wt Malloc NonExisting
$rpc_py bdev_ocf_create C2 wt Malloc Core

In current code on C1 vbdev creation we are creating not fully
initialized vbdev_ocf_base for cache (without management channel).

On C2 creation, because in vbdev_ocf_volume_open we are looking for
right base by name, we can grab cache base from C1 and then, there is
possibility, to hit segmentation fault due to uninitialized
mangament_channel.

This patch moves initialisation of managemnet channel to attach
base function and thanks to that we have guarrnte that each copy of
cache base (we have copy in each parent in case of multicore cache)
are valid.

Signed-off-by: Marcin Dziegielewski <marcin.dziegielewski@intel.com>
Change-Id: Iab1ced3a4bf8ba0fec947bbf77b55dc3620a58a7
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/468131
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Vitaliy Mysak <vitaliy.mysak@intel.com>
2019-10-18 17:31:39 +00:00
..
aio bdev/aio: delete unnecessary code 2019-10-16 15:55:46 +00:00
compress module/compress: fix a few typos in comments/log messages 2019-09-18 18:17:28 +00:00
crypto RPC: rename rpc get_bdevs to bdev_get_bdevs 2019-09-13 22:39:15 +00:00
delay mk: move the bdev modules under module directory. 2019-08-22 16:29:49 +00:00
error RPC: rename RPC bdev_error series 2019-08-26 18:59:18 +00:00
gpt mk: move the bdev modules under module directory. 2019-08-22 16:29:49 +00:00
iscsi RPC: rename bdev_iscsi RPCs 2019-08-26 22:42:48 +00:00
lvol lvol: Use error log instead of info log on error 2019-09-09 08:40:58 +00:00
malloc scripts/rpc: Rename rpc delete_malloc_bdev to bdev_malloc_delete 2019-09-09 05:02:47 +00:00
null scripts/rpc: Rename rpc related to null bdev 2019-08-28 15:19:58 +00:00
nvme bdev_nvme: register a remove cb for bdev_nvme. 2019-10-11 20:13:26 +00:00
ocf lib/bdev/ocf: fix potential issue around base->management_channel 2019-10-18 17:31:39 +00:00
passthru module/passthru: fix a few typos in comments 2019-09-20 02:02:42 +00:00
pmem rpc: Rename delete_pmem_pool to bdev_pmem_delete_pool 2019-09-05 07:04:17 +00:00
raid module/raid: move a single function up 2019-09-30 20:35:03 +00:00
rbd RPC: rename rpc delete_rbd_bdev to bdev_rbd_delete 2019-09-13 22:39:15 +00:00
rpc lib/bdev: zoned info in get_bdevs RPC call 2019-10-02 21:13:16 +00:00
split RPC: rename destruct_split_vbdev to bdev_split_delete 2019-09-19 19:24:47 +00:00
uring bdev/uring: fix no data length set in bdev_uring_writev 2019-10-16 15:55:35 +00:00
virtio RPC: rename construct_virtio_dev to bdev_virtio_attach_controller 2019-09-19 19:24:47 +00:00
Makefile mk: standardize DIRS-x assignments. 2019-08-29 20:16:18 +00:00