From bc4bbbae8c01a66acf97b407c121c5802cb4fc05 Mon Sep 17 00:00:00 2001 From: Yehuda Sadeh Date: Fri, 23 Feb 2018 08:43:16 -0800 Subject: [PATCH] rgw: gc aio, replace lists with other types Signed-off-by: Yehuda Sadeh (cherry picked from commit 278ca0352ac357426f435d1bb0343a6a815d1cdb) --- src/rgw/rgw_gc.cc | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/rgw/rgw_gc.cc b/src/rgw/rgw_gc.cc index 038ee274597f0..7e982f966fc55 100644 --- a/src/rgw/rgw_gc.cc +++ b/src/rgw/rgw_gc.cc @@ -151,15 +151,16 @@ class RGWGCIOManager { {} }; - list ios; - map > remove_tags; + deque ios; + vector > 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; } } }; -- 2.39.5