]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osdc/Objecter: allow multiple ops to be canceled atomically
authorSage Weil <sage@redhat.com>
Mon, 19 Feb 2018 14:43:11 +0000 (08:43 -0600)
committerSage Weil <sage@redhat.com>
Mon, 19 Feb 2018 14:52:51 +0000 (08:52 -0600)
This allows multiple cancellations without worrying about a race with an
(objecter) osdmap update.

Signed-off-by: Sage Weil <sage@redhat.com>
src/osdc/Objecter.cc
src/osdc/Objecter.h

index 6d1dea3ab118f73548bf18b360acb064e6a9946e..fd8e208d195c10224184e7ed7fd6837b59665038 100644 (file)
@@ -2539,6 +2539,16 @@ int Objecter::op_cancel(ceph_tid_t tid, int r)
   return ret;
 }
 
+int Objecter::op_cancel(const vector<ceph_tid_t>& tids, int r)
+{
+  unique_lock wl(rwlock);
+  ldout(cct,10) << __func__ << " " << tids << dendl;
+  for (auto tid : tids) {
+    _op_cancel(tid, r);
+  }
+  return 0;
+}
+
 int Objecter::_op_cancel(ceph_tid_t tid, int r)
 {
   int ret = 0;
index 6d81df31af9d69f6cd3cdf0c113551dd5de3eac2..1aca8a82932b7376b246a199a1d01303587e7be9 100644 (file)
@@ -2212,6 +2212,7 @@ private:
   int _op_cancel(ceph_tid_t tid, int r);
 public:
   int op_cancel(ceph_tid_t tid, int r);
+  int op_cancel(const vector<ceph_tid_t>& tidls, int r);
 
   /**
    * Any write op which is in progress at the start of this call shall no