numam-spdk/lib
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
..
bdev ocf: lock queue list during create/delete 2019-05-22 17:57:31 +00:00
blob blob: fix scanbuild failures in this file. 2019-05-16 20:53:21 +00:00
blobfs blobfs: removed unaligned memory access 2019-05-20 16:55:42 +00:00
conf string: spdk_strtol to delegate additional error checking 2019-01-29 00:10:57 +00:00
copy misc/rpc: rename some C functions of rpc methods 2019-05-07 05:30:16 +00:00
env_dpdk env_dpdk: set crypto log level to ERR 2019-05-13 15:46:50 +00:00
event thread: Add a mechanism to exit a lightweight thread 2019-05-22 04:23:17 +00:00
ftl lib/ftl: minor ftl_rwb_fill cleanup 2019-05-22 16:17:23 +00:00
ioat ioat: allocate device struct using regular calloc 2019-04-09 06:30:42 +00:00
iscsi iscsi: Move acceptor into portal_grp 2019-05-16 23:23:45 +00:00
json json_util: add debug logs to spdk_json_decode_object function 2019-01-10 14:31:37 +00:00
jsonrpc jsonrpc: Use spdk_json_write_named_* APIs throughout 2019-02-04 07:08:04 +00:00
log log/fdump: fix alignment of the last printed line 2019-05-10 10:27:29 +00:00
lvol lvol: Fix for lvol failed deletion flow 2019-04-02 19:23:22 +00:00
nbd nbd: optional nbd_device in start_nbd_disk 2019-04-04 08:35:50 +00:00
net net: Use spdk_json_write_named_* APIs throughout 2019-02-04 07:08:04 +00:00
notify lib/notify: rename spdk_notify_get_events to spdk_notify_foreach_event 2019-05-07 06:11:27 +00:00
nvme nvme: add nvme_free_request() variant that takes qpair 2019-05-22 14:51:01 +00:00
nvmf nvmf: increase default max num qps to 128 2019-05-22 14:50:05 +00:00
reduce lib/reduce: add new API to retrieve volume parameters 2019-05-13 15:41:35 +00:00
rocksdb rocksdb: cleanup SpdkInitializeThread/SpdkFinalizeThread 2019-05-02 09:00:43 +00:00
rpc rpc: fix segfault on get_spdk_version request with extra params 2019-05-22 04:36:47 +00:00
scsi Revert "scsi: Simplify removing LUN when no connection is for it" 2019-05-20 16:56:06 +00:00
sock sock: fix a uninitialized-variable error 2019-05-08 21:24:13 +00:00
thread thread: Add a mechanism to exit a lightweight thread 2019-05-22 04:23:17 +00:00
trace trace: print error message if event name is too long 2019-05-02 08:41:56 +00:00
ut_mock thread: Eliminate use of pthread_self and thread_ids 2019-01-15 16:53:12 +00:00
util dif: Support multiple iovecs for data buffer in spdk_dif_generate_stream 2019-05-16 20:17:44 +00:00
vhost vhost: remove 2MB memory region size restriction 2019-05-22 00:53:08 +00:00
virtio virtio: zero-out virtqueue structures at init 2019-04-22 16:49:39 +00:00
Makefile bdev/nvme: always enable FTL 2019-05-02 08:41:56 +00:00