bluestore/NVMEDevice.cc: fix NVMEManager thread halt
When enable SPDK in Ceph and start up Ceph development cluster, met
NVMEManager thread halt.
On aarch64 platform, the log as below:
Starting SPDK v18.04.1 / DPDK 18.05.0 initialization...
[ DPDK EAL parameters: nvme-device-manager -c 0x1 -m 2048 --file-prefix=spdk_pid16987 ]
EAL: Detected 46 lcore(s)
EAL: Detected 1 NUMA nodes
EAL: Multi-process socket /var/run/dpdk/spdk_pid16987/mp_socket
EAL: Probing VFIO support...
EAL: VFIO support initialized
EAL: PCI device 0000:01:00.0 on NUMA socket 0
EAL: probe driver: 8086:953 spdk_nvme
EAL: using IOMMU type 1 (Type 1)
^C
The reason is that pthread_cond_destroy() cannot destroy the active
condition_variable parameter.
Also on x86 debug builds we get the following error messages due to
probe_queue_lock still being active during ~NVMEManager:
/home/ubuntu/ceph/src/common/mutex_debug.h: 114: FAILED ceph_assert(r == 0)
ceph version
14.0.1-1862-g403622b (
403622be721a460f3dff2d84f6bfc628f5026704) nautilus (dev)
The change fixes the issue.
Fixes: http://tracker.ceph.com/issues/37720
Signed-off-by: tone.zhang <tone.zhang@arm.com>
Signed-off-by: Steve Capper <steve.capper@arm.com>