summaryrefslogtreecommitdiffstats
path: root/src/crimson/osd/pg_backend.h
diff options
context:
space:
mode:
authorLaura Flores <lflores@redhat.com>2024-02-15 20:41:31 +0100
committerGitHub <noreply@github.com>2024-02-15 20:41:31 +0100
commitf50f7fd97bd9d03d9026891e4eabc783584c3fd4 (patch)
treedf945570a7f8cd86617258eb3c097619f365dff9 /src/crimson/osd/pg_backend.h
parentMerge pull request #55566 from zdover23/wip-doc-2024-02-14-cephadm-services-nfs (diff)
parentfixup: don't store ref-to-on-stack-temporary in RecoveryBackend::coll (diff)
downloadceph-f50f7fd97bd9d03d9026891e4eabc783584c3fd4.tar.xz
ceph-f50f7fd97bd9d03d9026891e4eabc783584c3fd4.zip
Merge pull request #54930 from rzarzynski/wip-osd-ec-rework
osd: rework EC for the sake of integration with crimson
Diffstat (limited to 'src/crimson/osd/pg_backend.h')
-rw-r--r--src/crimson/osd/pg_backend.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/crimson/osd/pg_backend.h b/src/crimson/osd/pg_backend.h
index 98723ff588b..f3f27fd05ba 100644
--- a/src/crimson/osd/pg_backend.h
+++ b/src/crimson/osd/pg_backend.h
@@ -451,4 +451,22 @@ private:
std::vector<pg_log_entry_t>&& log_entries) = 0;
friend class ReplicatedRecoveryBackend;
friend class ::crimson::osd::PG;
+
+protected:
+ boost::container::flat_set<hobject_t> temp_contents;
+
+ template <class... Args>
+ void add_temp_obj(Args&&... args) {
+ temp_contents.insert(std::forward<Args>(args)...);
+ }
+ void clear_temp_obj(const hobject_t &oid) {
+ temp_contents.erase(oid);
+ }
+ template <class T>
+ void clear_temp_objs(const T &cont) {
+ for (const auto& oid : cont) {
+ clear_temp_obj(oid);
+ }
+ }
+ friend class RecoveryBackend;
};