From: Sage Weil Date: Mon, 19 Feb 2018 14:43:11 +0000 (-0600) Subject: osdc/Objecter: allow multiple ops to be canceled atomically X-Git-Tag: v13.0.2~216^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=7459d4a4794eb092cdc3ee06af12b782c892193d;p=ceph.git osdc/Objecter: allow multiple ops to be canceled atomically This allows multiple cancellations without worrying about a race with an (objecter) osdmap update. Signed-off-by: Sage Weil --- diff --git a/src/osdc/Objecter.cc b/src/osdc/Objecter.cc index 6d1dea3ab11..fd8e208d195 100644 --- a/src/osdc/Objecter.cc +++ b/src/osdc/Objecter.cc @@ -2539,6 +2539,16 @@ int Objecter::op_cancel(ceph_tid_t tid, int r) return ret; } +int Objecter::op_cancel(const vector& 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; diff --git a/src/osdc/Objecter.h b/src/osdc/Objecter.h index 6d81df31af9..1aca8a82932 100644 --- a/src/osdc/Objecter.h +++ b/src/osdc/Objecter.h @@ -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& tidls, int r); /** * Any write op which is in progress at the start of this call shall no