]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
common/Finisher: rename ContextQueue::swap method.
authorIgor Fedotov <ifedotov@suse.com>
Mon, 5 Aug 2019 14:22:43 +0000 (17:22 +0300)
committerIgor Fedotov <ifedotov@suse.com>
Mon, 5 Aug 2019 14:22:43 +0000 (17:22 +0300)
Actually it doesn't conform to swap semantic.

Signed-off-by: Igor Fedotov <ifedotov@suse.com>
src/common/Finisher.h
src/osd/OSD.cc

index 6926d8207b41edd27aa73c33f01347453b493b8a..d76674027c7a6ce9e251a5aef042777e540fc6f8 100644 (file)
@@ -220,7 +220,7 @@ public:
     ls.clear();
   }
 
-  void swap(std::list<Context *>& ls) {
+  void move_to(std::list<Context *>& ls) {
     ls.clear();
     std::scoped_lock l(q_mutex);
     if (!q.empty()) {
index d67002909e9ef25188a8be1e0e16bc0f34f334c6..052768b672f6ba8d82b061224e30521aeb001992 100644 (file)
@@ -10494,7 +10494,7 @@ void OSD::ShardedOpWQ::_process(uint32_t thread_index, heartbeat_handle_d *hb)
 
   list<Context *> oncommits;
   if (is_smallest_thread_index && !sdata->context_queue.empty()) {
-    sdata->context_queue.swap(oncommits);
+    sdata->context_queue.move_to(oncommits);
   }
 
   if (sdata->pqueue->empty()) {