]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
bluestore/NVMEDevice: fix wrong remove_device logic
authorxie xingguo <xie.xingguo@zte.com.cn>
Wed, 3 Feb 2016 07:24:23 +0000 (15:24 +0800)
committerxie xingguo <xie.xingguo@zte.com.cn>
Wed, 3 Feb 2016 07:54:03 +0000 (15:54 +0800)
It actually will reserve the device to be romoved only and clear others.

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
src/os/bluestore/NVMEDevice.cc

index a1b2c68146ffc7f335dbf909f108db81e1f45f89..280a6e7b54cd633d05a88d27ec622d99b2afd208 100644 (file)
@@ -164,7 +164,7 @@ class SharedDriverData {
     _aio_stop();
     std::vector<NVMEDevice*> new_devices;
     for (auto &&it : registered_devices) {
-      if (it == device)
+      if (it != device)
         new_devices.push_back(it);
     }
     registered_devices.swap(new_devices);