]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw/datalog: Move `DataLogBackends::head()` to `rgw_datalog.cc`
authorAdam C. Emerson <aemerson@redhat.com>
Thu, 22 Jan 2026 06:37:45 +0000 (01:37 -0500)
committerAdam C. Emerson <aemerson@redhat.com>
Tue, 27 Jan 2026 16:57:40 +0000 (11:57 -0500)
Since clang21 is a lot more strict about what is available in what
phase, move things to `rgw_datalog.cc` so the `intrusive_ptr` free
functions are available.

Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
src/rgw/driver/rados/rgw_datalog.cc
src/rgw/driver/rados/rgw_datalog.h

index a1d803cea77a92af864843fc9418347401d9e60a..1023ee043242399561e5a18aa853af8493c21729 100644 (file)
@@ -124,6 +124,13 @@ void rgw_data_notify_entry::dump(Formatter *f) const
   encode_json("gen", gen, f);
 }
 
+boost::intrusive_ptr<RGWDataChangesBE> DataLogBackends::head() {
+  std::unique_lock l(m);
+  auto i = end();
+  --i;
+  return i->second;
+}
+
 void rgw_data_notify_entry::decode_json(JSONObj *obj) {
   JSONDecoder::decode_json("key", key, obj);
   JSONDecoder::decode_json("gen", gen, obj);
index 329f04f300cf9bc2a3782fcdc34f99a175029bcd..6683f218e9ca0d59d26ac807eac01fa4172a7fa9 100644 (file)
@@ -218,12 +218,7 @@ class DataLogBackends final
                          shards), datalog(datalog) {}
 public:
 
-  boost::intrusive_ptr<RGWDataChangesBE> head() {
-    std::unique_lock l(m);
-    auto i = end();
-    --i;
-    return i->second;
-  }
+  boost::intrusive_ptr<RGWDataChangesBE> head();
   asio::awaitable<std::tuple<std::span<rgw_data_change_log_entry>,
                             std::string>>
   list(const DoutPrefixProvider *dpp, int shard,