numam-spdk/lib/bdev
Vitaliy Mysak 244d6e3daa ocf: lock queue list during create/delete
OCF queue list needs to be managed synchronously.
This patch uses our own mutex to achieve that because we cannot rely on
  ocf_mngt_cache_lock() as it may produce deadlocks when using
  cleaner.

Alternative way would be to use trylock, but
  we need to register a poller for it and do locking concurently
  which doesn't seem to be possible in callbacks of io channel.

We agreed with OCF team that we are going to change this part
  when OCF will deliver safe ocf_mngt_cache_lock() function.

This patch fixes a very rare failure on our CI that looked like this:
```
04:33:02 vbdev_ocf.c: 134:stop_vbdev: *NOTICE*: Not stopping cache instance 'Malloc0' because it is referenced by other OCF bdev
04:33:03 MalCache1: Core core2 successfully removed
04:33:03 MalCache1: Stopping cache
04:33:03 MalCache1: Done saving cache state!
04:33:03 src/ocf/mngt/ocf_mngt_cache.c:1576:2: runtime error: pointer index expression with base 0x000000000000 overflowed to 0xffffffffffffffa8
04:33:03     #0 0x7f3c52d54c26 in _ocf_mngt_cache_stop src/ocf/mngt/ocf_mngt_cache.c:1576
04:33:03     #1 0x7f3c52d5579f in ocf_mngt_cache_stop src/ocf/mngt/ocf_mngt_cache.c:1657
04:33:03     #2 0x7f3c52cbe9f4 in stop_vbdev /var/jenkins/workspace/NVMe_tests/nvme_phy_autotest/spdk/lib/bdev/ocf/vbdev_ocf.c:147
04:33:03     #3 0x7f3c52cbf4a0 in vbdev_ocf_destruct /var/jenkins/workspace/NVMe_tests/nvme_phy_autotest/spdk/lib/bdev/ocf/vbdev_ocf.c:216
```

Change-Id: Id6fafb444958f3becdc480e44762074c6c081e1f
Signed-off-by: Vitaliy Mysak <vitaliy.mysak@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/450682
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
2019-05-22 17:57:31 +00:00
..
aio bdev/aio: An error code can be returned via the rpc interface. 2019-05-22 16:12:40 +00:00
compress bdev/compress: fix issues with multi-thread 2019-05-22 15:36:48 +00:00
crypto bdev/crypto: cleanup the vbdev_crypto_examine 2019-05-02 09:10:38 +00:00
error bdev: make spdk_bdev_register_module_xxx function names predictable 2019-02-11 23:56:53 +00:00
gpt bdev: switch to spdk_*malloc(). 2019-04-09 06:30:42 +00:00
iscsi bdev/iscsi: fix iscsi bdev wrong lun id 2019-04-01 01:16:51 +00:00
lvol misc/rpc: rename some C functions of rpc methods 2019-05-07 05:30:16 +00:00
malloc bdev: Make malloc bdev use the new zero copy mechanism 2019-04-23 18:38:39 +00:00
null bdev/null : Clean up module resources that failed to initialize. 2019-04-24 22:25:47 +00:00
nvme misc/rpc: rename some C functions of rpc methods 2019-05-07 05:30:16 +00:00
ocf ocf: lock queue list during create/delete 2019-05-22 17:57:31 +00:00
passthru bdev/passthru: add error check in get buffer read callback 2019-05-20 17:02:27 +00:00
pmem bdev: process failure of spdk_bdev_io_get_buf_cb in each bdev module 2019-02-27 07:28:15 +00:00
raid bdev/raid: Fix more than a space between struct and name struct 2019-05-14 22:36:04 +00:00
rbd bdev: process failure of spdk_bdev_io_get_buf_cb in each bdev module 2019-02-27 07:28:15 +00:00
rpc bdev: make bdevs array for get_bdevs_iostat RPC 2019-05-08 22:43:00 +00:00
split misc/rpc: rename some C functions of rpc methods 2019-05-07 05:30:16 +00:00
uring bdev: Add io_uring bdev module 2019-03-22 18:51:48 +00:00
virtio misc/rpc: rename some C functions of rpc methods 2019-05-07 05:30:16 +00:00
bdev.c bdev: complete parent IO only when all the children IO are finished 2019-05-22 08:18:40 +00:00
Makefile bdev/compress: add compression vbdev module 2019-03-27 14:51:22 +00:00
part.c bdev: don't allow NVME_IO types for partitioned bdevs 2019-05-06 05:46:12 +00:00
scsi_nvme.c bdev: move error union to internal spdk_bdev_io struct 2018-06-26 20:04:07 +00:00
vtune.c mk: don't use '-include spdk/config.h' 2018-10-02 23:13:32 +00:00