summaryrefslogtreecommitdiffstats
path: root/src/os
diff options
context:
space:
mode:
authorYuri Weinstein <yweinste@redhat.com>2023-08-22 20:31:05 +0200
committerGitHub <noreply@github.com>2023-08-22 20:31:05 +0200
commitcdddefd2f958f525a808924c6372e107e7c650e7 (patch)
tree435cedac7c36d263c6cd12432294f99a8618afae /src/os
parentMerge pull request #51868 from NitzanMordhai/wip-nitzan-admin-socket-new-sess... (diff)
parentosd/OSD: trim_maps - add possible leakage tracker (diff)
downloadceph-cdddefd2f958f525a808924c6372e107e7c650e7.tar.xz
ceph-cdddefd2f958f525a808924c6372e107e7c650e7.zip
Merge pull request #52339 from Matan-B/wip-matanb-trim-maps-refactor
osd/OSD: Simplify trim_maps Reviewed-by: Samuel Just <sjust@redhat.com>
Diffstat (limited to 'src/os')
-rw-r--r--src/os/Transaction.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/os/Transaction.h b/src/os/Transaction.h
index f28a257fcef..119d676702e 100644
--- a/src/os/Transaction.h
+++ b/src/os/Transaction.h
@@ -291,6 +291,12 @@ public:
Transaction(const Transaction& other) = default;
Transaction& operator=(const Transaction& other) = default;
+ Transaction claim_and_reset() {
+ auto ret = Transaction();
+ std::swap(*this, ret);
+ return ret;
+ }
+
// expose object_index for FileStore::Op's benefit
const std::map<ghobject_t, uint32_t>& get_object_index() const {
return object_index;