From: xie xingguo Date: Wed, 3 Feb 2016 07:24:23 +0000 (+0800) Subject: bluestore/NVMEDevice: fix wrong remove_device logic X-Git-Tag: v10.1.0~417^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=a5714fbe68b6ec41b8dd42eb28b8c5307ccb30a8;p=ceph.git bluestore/NVMEDevice: fix wrong remove_device logic It actually will reserve the device to be romoved only and clear others. Signed-off-by: xie xingguo --- diff --git a/src/os/bluestore/NVMEDevice.cc b/src/os/bluestore/NVMEDevice.cc index a1b2c68146ff..280a6e7b54cd 100644 --- a/src/os/bluestore/NVMEDevice.cc +++ b/src/os/bluestore/NVMEDevice.cc @@ -164,7 +164,7 @@ class SharedDriverData { _aio_stop(); std::vector new_devices; for (auto &&it : registered_devices) { - if (it == device) + if (it != device) new_devices.push_back(it); } registered_devices.swap(new_devices);