From: Adam C. Emerson Date: Thu, 22 Jan 2026 06:37:45 +0000 (-0500) Subject: rgw/datalog: Move `DataLogBackends::head()` to `rgw_datalog.cc` X-Git-Tag: v21.0.0~140^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=5b81911b310289eaca180b6e6668cf8840fb86b9;p=ceph.git rgw/datalog: Move `DataLogBackends::head()` to `rgw_datalog.cc` 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 --- diff --git a/src/rgw/driver/rados/rgw_datalog.cc b/src/rgw/driver/rados/rgw_datalog.cc index a1d803cea77a..1023ee043242 100644 --- a/src/rgw/driver/rados/rgw_datalog.cc +++ b/src/rgw/driver/rados/rgw_datalog.cc @@ -124,6 +124,13 @@ void rgw_data_notify_entry::dump(Formatter *f) const encode_json("gen", gen, f); } +boost::intrusive_ptr 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); diff --git a/src/rgw/driver/rados/rgw_datalog.h b/src/rgw/driver/rados/rgw_datalog.h index 329f04f300cf..6683f218e9ca 100644 --- a/src/rgw/driver/rados/rgw_datalog.h +++ b/src/rgw/driver/rados/rgw_datalog.h @@ -218,12 +218,7 @@ class DataLogBackends final shards), datalog(datalog) {} public: - boost::intrusive_ptr head() { - std::unique_lock l(m); - auto i = end(); - --i; - return i->second; - } + boost::intrusive_ptr head(); asio::awaitable, std::string>> list(const DoutPrefixProvider *dpp, int shard,