? &delta_buffer : nullptr;
}
- CachedExtentRef duplicate_for_write() override {
+ CachedExtentRef duplicate_for_write(Transaction&) override {
assert(delta_buffer.empty());
return CachedExtentRef(new node_type_t(*this));
};
return this->is_mutation_pending() ? &delta_buffer : nullptr;
}
- CachedExtentRef duplicate_for_write() override {
+ CachedExtentRef duplicate_for_write(Transaction&) override {
assert(delta_buffer.empty());
return CachedExtentRef(new node_type_t(*this));
};
return i;
}
- auto ret = i->duplicate_for_write();
+ auto ret = i->duplicate_for_write(t);
ret->pending_for_transaction = t.get_trans_id();
ret->prior_instance = i;
// duplicate_for_write won't occur after ool write finished
// vim: ts=8 sw=2 smarttab
#include "crimson/os/seastore/cached_extent.h"
+#include "crimson/os/seastore/transaction.h"
#include "crimson/common/log.h"
* structure which defers updating the actual buffer until
* on_delta_write().
*/
- virtual CachedExtentRef duplicate_for_write() = 0;
+ virtual CachedExtentRef duplicate_for_write(Transaction &t) = 0;
/**
* prepare_write
extent_len_t get_length() const final { return length; }
- CachedExtentRef duplicate_for_write() final {
+ CachedExtentRef duplicate_for_write(Transaction&) final {
ceph_assert(0 == "Should never happen for a placeholder");
return CachedExtentRef();
}
coll_map_t decoded;
delta_buffer_t delta_buffer;
- CachedExtentRef duplicate_for_write() final {
+ CachedExtentRef duplicate_for_write(Transaction&) final {
assert(delta_buffer.empty());
return CachedExtentRef(new CollectionNode(*this));
}
ObjectDataBlock(const ObjectDataBlock &other)
: LogicalCachedExtent(other) {}
- CachedExtentRef duplicate_for_write() final {
+ CachedExtentRef duplicate_for_write(Transaction&) final {
return CachedExtentRef(new ObjectDataBlock(*this));
};
bool extent_is_below_min() const { return below_min(); }
uint32_t get_node_size() { return get_size(); }
- CachedExtentRef duplicate_for_write() final {
+ CachedExtentRef duplicate_for_write(Transaction&) final {
assert(delta_buffer.empty());
return CachedExtentRef(new OMapInnerNode(*this));
}
bool extent_is_below_min() const { return below_min(); }
uint32_t get_node_size() { return get_size(); }
- CachedExtentRef duplicate_for_write() final {
+ CachedExtentRef duplicate_for_write(Transaction&) final {
assert(delta_buffer.empty());
return CachedExtentRef(new OMapLeafNode(*this));
}
ceph_abort("impossible path"); }
DeltaRecorder* get_recorder() const override {
return nullptr; }
- CachedExtentRef duplicate_for_write() override {
+ CachedExtentRef duplicate_for_write(Transaction&) override {
ceph_abort("impossible path"); }
extent_types_t get_type() const override {
return extent_types_t::TEST_BLOCK; }
return recorder.get();
}
- CachedExtentRef duplicate_for_write() override {
+ CachedExtentRef duplicate_for_write(Transaction&) override {
return CachedExtentRef(new SeastoreNodeExtent(*this));
}
ceph::bufferlist get_delta() override {
ceph_abort("impossible path"); }
DeltaRecorder* get_recorder() const override {
ceph_abort("impossible path"); }
- CachedExtentRef duplicate_for_write() override {
+ CachedExtentRef duplicate_for_write(Transaction&) override {
ceph_abort("impossible path"); }
extent_types_t get_type() const override {
return extent_types_t::TEST_BLOCK; }
RootBlock(const RootBlock &rhs) = default;
- CachedExtentRef duplicate_for_write() final {
+ CachedExtentRef duplicate_for_write(Transaction&) final {
return CachedExtentRef(new RootBlock(*this));
};
TestBlock(const TestBlock &other)
: LogicalCachedExtent(other) {}
- CachedExtentRef duplicate_for_write() final {
+ CachedExtentRef duplicate_for_write(Transaction&) final {
return CachedExtentRef(new TestBlock(*this));
};
TestBlockPhysical(const TestBlockPhysical &other)
: CachedExtent(other) {}
- CachedExtentRef duplicate_for_write() final {
+ CachedExtentRef duplicate_for_write(Transaction&) final {
return CachedExtentRef(new TestBlockPhysical(*this));
};