]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
spdk: fix ceph-osd crash when activate SPDK 22356/head
authortone-zhang <tone.zhang@arm.com>
Fri, 1 Jun 2018 04:41:33 +0000 (04:41 +0000)
committertone-zhang <tone.zhang@arm.com>
Sat, 2 Jun 2018 10:21:32 +0000 (10:21 +0000)
When activate SPDK in Ceph, observe a Ceph crash.

It happened in the case 1) there is a pending IOContext in
NVMEDevice and 2) the lower block device has been recreated and
queue_t then points to an NVMEDevice that no longer exists.

This patch addresses the problem by deleting and zeroing queue_t
when NVMEDevice is closed.

Fixes: http://tracker.ceph.com/issues/24371
Signed-off-by: tone-zhang <tone.zhang@arm.com>
src/os/bluestore/NVMEDevice.cc

index 8738e211a71a1245c9ec33f970dd43922c001b4b..0fcfafd71aa4a81161f12ff7f09f667d4148e220 100644 (file)
@@ -795,6 +795,8 @@ void NVMEDevice::close()
 {
   dout(1) << __func__ << dendl;
 
+  delete queue_t;
+  queue_t = nullptr;
   name.clear();
   driver->remove_device(this);