]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/rgw/rgw_cache.h
import ceph pacific 16.2.5
[ceph.git] / ceph / src / rgw / rgw_cache.h
index 659b5518128e8d5c1ca2a80ee78457be88a78958..852780cc6644664c941b34452b3ae0929e512ec3 100644 (file)
@@ -168,7 +168,7 @@ class ObjectCache {
   bool enabled;
   ceph::timespan expiry;
 
-  void touch_lru(const string& name, ObjectCacheEntry& entry,
+  void touch_lru(const DoutPrefixProvider *dpp, const string& name, ObjectCacheEntry& entry,
                 std::list<string>::iterator& lru_iter);
   void remove_lru(const string& name, std::list<string>::iterator& lru_iter);
   void invalidate_lru(ObjectCacheEntry& entry);
@@ -178,10 +178,10 @@ class ObjectCache {
 public:
   ObjectCache() : lru_size(0), lru_counter(0), lru_window(0), cct(NULL), enabled(false) { }
   ~ObjectCache();
-  int get(const std::string& name, ObjectCacheInfo& bl, uint32_t mask, rgw_cache_entry_info *cache_info);
-  std::optional<ObjectCacheInfo> get(const std::string& name) {
+  int get(const DoutPrefixProvider *dpp, const std::string& name, ObjectCacheInfo& bl, uint32_t mask, rgw_cache_entry_info *cache_info);
+  std::optional<ObjectCacheInfo> get(const DoutPrefixProvider *dpp, const std::string& name) {
     std::optional<ObjectCacheInfo> info{std::in_place};
-    auto r = get(name, *info, 0, nullptr);
+    auto r = get(dpp, name, *info, 0, nullptr);
     return r < 0 ? std::nullopt : info;
   }
 
@@ -198,15 +198,16 @@ public:
     }
   }
 
-  void put(const std::string& name, ObjectCacheInfo& bl, rgw_cache_entry_info *cache_info);
-  bool remove(const std::string& name);
+  void put(const DoutPrefixProvider *dpp, const std::string& name, ObjectCacheInfo& bl, rgw_cache_entry_info *cache_info);
+  bool remove(const DoutPrefixProvider *dpp, const std::string& name);
   void set_ctx(CephContext *_cct) {
     cct = _cct;
     lru_window = cct->_conf->rgw_cache_lru_size / 2;
     expiry = std::chrono::seconds(cct->_conf.get_val<uint64_t>(
                                                "rgw_cache_expiry_interval"));
   }
-  bool chain_cache_entry(std::initializer_list<rgw_cache_entry_info*> cache_info_entries,
+  bool chain_cache_entry(const DoutPrefixProvider *dpp,
+                         std::initializer_list<rgw_cache_entry_info*> cache_info_entries,
                         RGWChainedCache::Entry *chained_entry);
 
   void set_enabled(bool status);