Spdk/module/bdev/ocf
Tomasz Zawadzki 868ba17780 bdev/ocf: simplify check for running cache instance
There are additional conditions which SPDK tracks,
that are known before issuing call to OCF.

Two main ones are:
- if vbdev->ocf_cache was not yet created [start_cache()]
- if the cache bdev was opened [attach_base()]

Both happen for the first cache bdev once. Then for
consecutive vbdev_ocf on same cache bdev, reference
will be copied.

This call will simplify checking both conditions.
Calling into OCF with NULL or stale ocf_cache pointer,
rightly so will cause issues with ASAN.

Related #1498

Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Ib202c15bda4cbbffa1516c69168e8bfb80370047
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3573
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Vitaliy Mysak <vitaliy.mysak@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
2020-07-30 04:02:08 +00:00
..
ctx.c pollers: Fix pollers to return correct busy status 2020-07-07 07:29:31 +00:00
ctx.h lib/bdev/ocf: fix potential issue around base->management_channel 2019-10-18 17:31:39 +00:00
data.c mk: move the bdev modules under module directory. 2019-08-22 16:29:49 +00:00
data.h mk: move the bdev modules under module directory. 2019-08-22 16:29:49 +00:00
Makefile mk/lib: add a check that major and minor version is set for libs. 2020-05-21 09:19:00 +00:00
stats.c ocf: update ocf submodule to v20.3 2020-04-17 07:32:48 +00:00
stats.h ocf: update ocf submodule to v20.3 2020-04-17 07:32:48 +00:00
utils.c lib/bdev/ocf: remove unused code related to polling utils 2019-10-22 17:22:41 +00:00
utils.h lib/bdev/ocf: increase capabilites of vbdev_ocf_mngt_stop function 2019-10-22 17:22:41 +00:00
vbdev_ocf_rpc.c module/bdev_ocf: remove spdk prefix from static functions. 2020-05-15 07:58:03 +00:00
vbdev_ocf.c bdev/ocf: simplify check for running cache instance 2020-07-30 04:02:08 +00:00
vbdev_ocf.h bdev/ocf: Fix typo about vbdev_ocf_qctx. 2020-04-29 06:42:55 +00:00
volume.c bdev/ocf: Fix typo about vbdev_ocf_qctx. 2020-04-29 06:42:55 +00:00
volume.h mk: move the bdev modules under module directory. 2019-08-22 16:29:49 +00:00