]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: gc aio, replace lists with other types
authorYehuda Sadeh <yehuda@redhat.com>
Fri, 23 Feb 2018 16:43:16 +0000 (08:43 -0800)
committerJesse Williamson <nerd.cpp@gmail.com>
Thu, 11 Jul 2019 17:32:58 +0000 (10:32 -0700)
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
(cherry picked from commit 278ca0352ac357426f435d1bb0343a6a815d1cdb)

src/rgw/rgw_gc.cc

index 038ee274597f0691ad64e7a5d96b1454d33608a9..7e982f966fc5581746a0b97a61c1e2bc8ba9d093 100644 (file)
@@ -151,15 +151,16 @@ class RGWGCIOManager {
     {}
   };
 
-  list<IO> ios;
-  map<int, std::list<string> > remove_tags;
+  deque<IO> ios;
+  vector<std::list<string> > remove_tags;
 
 #define MAX_AIO_DEFAULT 10
   size_t max_aio{MAX_AIO_DEFAULT};
 
 public:
   RGWGCIOManager(CephContext *_cct, RGWGC *_gc) : cct(_cct),
-                                                  gc(_gc) {
+                                                  gc(_gc),
+                                                  remove_tags(cct->_conf->rgw_gc_max_objs) {
     max_aio = cct->_conf->rgw_gc_max_concurrent_io;
   }
   ~RGWGCIOManager() {
@@ -253,8 +254,10 @@ done:
   }
 
   void flush_remove_tags() {
-    for (auto iter : remove_tags) {
-      flush_remove_tags(iter.first, iter.second);
+    int index = 0;
+    for (auto& rt : remove_tags) {
+      flush_remove_tags(index, rt);
+      ++index;
     }
   }
 };