summaryrefslogtreecommitdiffstats
path: root/src/crimson/osd/pg_backend.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/crimson/osd/pg_backend.h')
-rw-r--r--src/crimson/osd/pg_backend.h54
1 files changed, 30 insertions, 24 deletions
diff --git a/src/crimson/osd/pg_backend.h b/src/crimson/osd/pg_backend.h
index 579e2bdee79..9c2230375b0 100644
--- a/src/crimson/osd/pg_backend.h
+++ b/src/crimson/osd/pg_backend.h
@@ -60,9 +60,10 @@ public:
using interruptible_future =
::crimson::interruptible::interruptible_future<
::crimson::osd::IOInterruptCondition, T>;
- using rep_op_fut_t =
+ using rep_op_ret_t =
std::tuple<interruptible_future<>,
interruptible_future<crimson::osd::acked_peers_t>>;
+ using rep_op_fut_t = interruptible_future<rep_op_ret_t>;
PGBackend(shard_id_t shard, CollectionRef coll,
crimson::osd::ShardServices &shard_services,
DoutPrefixProvider &dpp);
@@ -220,14 +221,6 @@ public:
ceph::os::Transaction& trans,
osd_op_params_t& osd_op_params,
object_stat_sum_t& delta_stats);
- rep_op_fut_t mutate_object(
- std::set<pg_shard_t> pg_shards,
- crimson::osd::ObjectContextRef &&obc,
- ceph::os::Transaction&& txn,
- osd_op_params_t&& osd_op_p,
- epoch_t min_epoch,
- epoch_t map_epoch,
- std::vector<pg_log_entry_t>&& log_entries);
/**
* list_objects
@@ -315,11 +308,6 @@ public:
ObjectState& os,
const OSDOp& osd_op,
ceph::os::Transaction& trans);
- void clone(
- /* const */object_info_t& snap_oi,
- const ObjectState& os,
- const ObjectState& d_os,
- ceph::os::Transaction& trans);
interruptible_future<struct stat> stat(
CollectionRef c,
const ghobject_t& oid) const;
@@ -327,7 +315,8 @@ public:
CollectionRef c,
const ghobject_t& oid,
uint64_t off,
- uint64_t len);
+ uint64_t len,
+ uint32_t op_flags = 0);
write_iertr::future<> tmapput(
ObjectState& os,
@@ -387,11 +376,13 @@ public:
object_stat_sum_t& delta_stats);
ll_read_ierrorator::future<ceph::bufferlist> omap_get_header(
const crimson::os::CollectionRef& c,
- const ghobject_t& oid) const;
+ const ghobject_t& oid,
+ uint32_t op_flags = 0) const;
ll_read_ierrorator::future<> omap_get_header(
const ObjectState& os,
OSDOp& osd_op,
- object_stat_sum_t& delta_stats) const;
+ object_stat_sum_t& delta_stats,
+ uint32_t op_flags = 0) const;
interruptible_future<> omap_set_header(
ObjectState& os,
const OSDOp& osd_op,
@@ -419,6 +410,28 @@ public:
osd_op_params_t& osd_op_params,
object_stat_sum_t& delta_stats);
+ /// sets oi and (for head) ss attrs
+ void set_metadata(
+ const hobject_t &obj,
+ object_info_t &oi,
+ const SnapSet *ss /* non-null iff head */,
+ ceph::os::Transaction& trans);
+
+ /// clone from->to and clear ss attribute on to
+ void clone_for_write(
+ const hobject_t &from,
+ const hobject_t &to,
+ ceph::os::Transaction& trans);
+
+ virtual rep_op_fut_t
+ submit_transaction(const std::set<pg_shard_t> &pg_shards,
+ const hobject_t& hoid,
+ crimson::osd::ObjectContextRef&& new_clone,
+ ceph::os::Transaction&& txn,
+ osd_op_params_t&& osd_op_p,
+ epoch_t min_epoch, epoch_t max_epoch,
+ std::vector<pg_log_entry_t>&& log_entries) = 0;
+
virtual void got_rep_op_reply(const MOSDRepOpReply&) {}
virtual seastar::future<> stop() = 0;
virtual void on_actingset_changed(bool same_primary) = 0;
@@ -475,13 +488,6 @@ private:
object_stat_sum_t& delta_stats,
object_info_t& oi,
uint64_t truncate_size);
- virtual rep_op_fut_t
- _submit_transaction(std::set<pg_shard_t>&& pg_shards,
- const hobject_t& hoid,
- ceph::os::Transaction&& txn,
- osd_op_params_t&& osd_op_p,
- epoch_t min_epoch, epoch_t max_epoch,
- std::vector<pg_log_entry_t>&& log_entries) = 0;
friend class ReplicatedRecoveryBackend;
friend class ::crimson::osd::PG;