X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fceph%2Fsrc%2Frgw%2Frgw_gc.h;fp=src%2Fceph%2Fsrc%2Frgw%2Frgw_gc.h;h=0000000000000000000000000000000000000000;hb=7da45d65be36d36b880cc55c5036e96c24b53f00;hp=491796b50e86d6dc1d876a3c173873f3274854dd;hpb=691462d09d0987b47e112d6ee8740375df3c51b2;p=stor4nfv.git diff --git a/src/ceph/src/rgw/rgw_gc.h b/src/ceph/src/rgw/rgw_gc.h deleted file mode 100644 index 491796b..0000000 --- a/src/ceph/src/rgw/rgw_gc.h +++ /dev/null @@ -1,67 +0,0 @@ -// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- -// vim: ts=8 sw=2 smarttab - -#ifndef CEPH_RGW_GC_H -#define CEPH_RGW_GC_H - - -#include "include/types.h" -#include "include/rados/librados.hpp" -#include "common/Mutex.h" -#include "common/Cond.h" -#include "common/Thread.h" -#include "rgw_common.h" -#include "rgw_rados.h" -#include "cls/rgw/cls_rgw_types.h" - -#include - -class RGWGC { - CephContext *cct; - RGWRados *store; - int max_objs; - string *obj_names; - std::atomic down_flag = { false }; - - int tag_index(const string& tag); - - class GCWorker : public Thread { - CephContext *cct; - RGWGC *gc; - Mutex lock; - Cond cond; - - public: - GCWorker(CephContext *_cct, RGWGC *_gc) : cct(_cct), gc(_gc), lock("GCWorker") {} - void *entry() override; - void stop(); - }; - - GCWorker *worker; -public: - RGWGC() : cct(NULL), store(NULL), max_objs(0), obj_names(NULL), worker(NULL) {} - ~RGWGC() { - stop_processor(); - finalize(); - } - - void add_chain(librados::ObjectWriteOperation& op, cls_rgw_obj_chain& chain, const string& tag); - int send_chain(cls_rgw_obj_chain& chain, const string& tag, bool sync); - int defer_chain(const string& tag, bool sync); - int remove(int index, const std::list& tags); - - void initialize(CephContext *_cct, RGWRados *_store); - void finalize(); - - int list(int *index, string& marker, uint32_t max, bool expired_only, std::list& result, bool *truncated); - void list_init(int *index) { *index = 0; } - int process(int index, int process_max_secs); - int process(); - - bool going_down(); - void start_processor(); - void stop_processor(); -}; - - -#endif