+14
−5
Loading
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>