std::map<hobject_t, std::pair<uint64_t, uint64_t>> chunks;
uint64_t num_chunks = 0;
object_manifest_t new_manifest;
+ ObjectContextRef obc;
- ManifestOp(RefCountCallback* cb)
- : cb(cb) {}
- ManifestOp() = default;
+ ManifestOp(ObjectContextRef obc, RefCountCallback* cb)
+ : cb(cb), obc(obc) {}
+ ManifestOp() = delete;
};
typedef std::shared_ptr<ManifestOp> ManifestOpRef;
std::map<hobject_t, ManifestOpRef> manifest_ops;
release_object_locks(manager);
}
- bool pg_is_repair() override {
- return is_repair();
- }
void inc_osd_stat_repaired() override {
osd->inc_osd_stat_repaired();
}
}
void schedule_recovery_work(
- GenContext<ThreadPool::TPHandle&> *c) override;
+ GenContext<ThreadPool::TPHandle&> *c,
+ uint64_t cost) override;
pg_shard_t whoami_shard() const override {
return pg_whoami;
}
void send_message_osd_cluster(
MessageRef m, Connection *con) override {
- osd->send_message_osd_cluster(m, con);
+ osd->send_message_osd_cluster(std::move(m), con);
}
void send_message_osd_cluster(
Message *m, const ConnectionRef& con) override {
void _make_clone(
OpContext *ctx,
PGTransaction* t,
- ObjectContextRef obc,
+ ObjectContextRef clone_obc,
const hobject_t& head, const hobject_t& coid,
object_info_t *poi);
void execute_ctx(OpContext *ctx);
int start_flush(
OpRequestRef op, ObjectContextRef obc,
bool blocking, hobject_t *pmissing,
- std::optional<std::function<void()>> &&on_flush);
+ std::optional<std::function<void()>> &&on_flush,
+ bool force_dedup = false);
void finish_flush(hobject_t oid, ceph_tid_t tid, int r);
int try_flush_mark_clean(FlushOpRef fop);
void cancel_flush(FlushOpRef fop, bool requeue, std::vector<ceph_tid_t> *tids);
/// generate a new temp object name (for recovery)
hobject_t get_temp_recovery_object(const hobject_t& target,
eversion_t version) override;
- int get_recovery_op_priority() const {
- int64_t pri = 0;
- pool.info.opts.get(pool_opts_t::RECOVERY_OP_PRIORITY, &pri);
- return pri > 0 ? pri : cct->_conf->osd_recovery_op_priority;
- }
-
public:
coll_t get_coll() {
return coll;
> reactions;
explicit WaitScrub(my_context ctx)
: my_base(ctx),
- NamedState(nullptr, "Trimming/WaitScrub") {
+ NamedState(nullptr, "WaitScrub") {
context< SnapTrimmer >().log_enter(state_name);
}
void exit() {
ObjectContextRef obc,
PGTransaction *t,
const std::string &key);
+ /**
+ * getattr_maybe_cache
+ *
+ * Populates val (if non-null) with the value of the attr with the specified key.
+ * Returns -ENOENT if object does not exist, -ENODATA if the object exists,
+ * but the specified key does not.
+ */
int getattr_maybe_cache(
ObjectContextRef obc,
const std::string &key,