]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rbd-mirror: clean up ENOENT error message
authorJason Dillaman <dillaman@redhat.com>
Wed, 25 Apr 2018 23:45:01 +0000 (19:45 -0400)
committerJason Dillaman <dillaman@redhat.com>
Fri, 27 Apr 2018 12:34:28 +0000 (08:34 -0400)
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
src/tools/rbd_mirror/InstanceWatcher.cc
src/tools/rbd_mirror/InstanceWatcher.h

index 796b7bfe604c727fe65c69c2c2c5171eff538cce..88faa67c07a7d9270123abf7291af978a9014860 100644 (file)
@@ -389,7 +389,6 @@ void InstanceWatcher<I>::remove(Context *on_finish) {
   assert(m_on_finish == nullptr);
   m_on_finish = on_finish;
   m_ret_val = 0;
-  m_removing = true;
 
   get_instance_locker();
 }
@@ -866,7 +865,7 @@ template <typename I>
 void InstanceWatcher<I>::handle_remove_instance_object(int r) {
   dout(10) << "r=" << r << dendl;
 
-  if (m_removing && r == -ENOENT) {
+  if (r == -ENOENT) {
     r = 0;
   }
 
@@ -938,10 +937,6 @@ void InstanceWatcher<I>::handle_wait_for_notify_ops(int r) {
 
     std::swap(on_finish, m_on_finish);
     r = m_ret_val;
-
-    if (m_removing) {
-      m_removing = false;
-    }
   }
   on_finish->complete(r);
 }
index c3cd60500f75f617dfa3c3e1323e3cdb09e79f9e..f9671585a2724559f67cdeb20ad120e2e42cc44e 100644 (file)
@@ -163,7 +163,6 @@ private:
   librbd::ManagedLock<ImageCtxT> *m_instance_lock;
   Context *m_on_finish = nullptr;
   int m_ret_val = 0;
-  bool m_removing = false;
   std::string m_leader_instance_id;
   librbd::managed_lock::Locker m_instance_locker;
   std::set<std::pair<std::string, C_NotifyInstanceRequest *>> m_notify_ops;