#include "crimson/osd/object_context_loader.h"
+#include "osd/osd_types_fmt.h"
SET_SUBSYS(osd);
crimson::ct_error::enoent::make()
};
}
- auto [clone, existed] = shard_services.get_cached_obc(*coid);
+ auto [clone, existed] = obc_registry.get_cached_obc(*coid);
return clone->template with_lock<State, IOInterruptCondition>(
[existed=existed, clone=std::move(clone),
func=std::move(func), head=std::move(head), this]()
{
if (oid.is_head()) {
auto [obc, existed] =
- shard_services.get_cached_obc(std::move(oid));
+ obc_registry.get_cached_obc(std::move(oid));
return with_head_obc<State>(std::move(obc),
existed,
std::move(func));
#include <seastar/core/future.hh>
#include "crimson/common/errorator.h"
#include "crimson/osd/object_context.h"
-#include "crimson/osd/shard_services.h"
#include "crimson/osd/pg_backend.h"
namespace crimson::osd {
ObjectContext::obc_accessing_option_t>;
ObjectContextLoader(
- ShardServices& _shard_services,
+ ObjectContextRegistry& _obc_services,
PGBackend& _backend,
DoutPrefixProvider& dpp)
- : shard_services{_shard_services},
+ : obc_registry{_obc_services},
backend{_backend},
dpp{dpp}
{}
void notify_on_change(bool is_primary);
private:
- ShardServices &shard_services;
+ ObjectContextRegistry& obc_registry;
PGBackend& backend;
DoutPrefixProvider& dpp;
obc_accessing_list_t obc_set_accessing;
if (pg->is_primary()) {
// lookup_or_create
auto [c_obc, existed] =
- pg->get_shard_services().get_cached_obc(
- std::move(coid));
+ pg->obc_registry.get_cached_obc(std::move(coid));
assert(!existed);
c_obc->obs.oi = static_snap_oi;
c_obc->obs.exists = true;
osdmap,
this,
this),
+ obc_registry{
+ local_conf()},
obc_loader{
- shard_services,
+ obc_registry,
*backend.get(),
*this},
wait_for_active_blocker(this)
eversion_t projected_last_update;
public:
+ ObjectContextRegistry obc_registry;
ObjectContextLoader obc_loader;
// PeeringListener
-> interruptible_future<> {
crimson::osd::ObjectContextRef obc;
if (pg.is_primary()) {
- obc = shard_services.maybe_get_cached_obc(object);
+ obc = pg.obc_registry.maybe_get_cached_obc(object);
}
if (obc) {
if (obc->obs.exists) {
store(store),
perf(perf), recoverystate_perf(recoverystate_perf),
throttler(crimson::common::local_conf()),
- obc_registry(crimson::common::local_conf()),
next_tid(
static_cast<ceph_tid_t>(seastar::this_shard_id()) <<
(std::numeric_limits<ceph_tid_t>::digits - 8)),
up_epoch = epoch;
}
- crimson::osd::ObjectContextRegistry obc_registry;
-
// prevent creating new osd operations when system is shutting down,
// this is necessary because there are chances that a new operation
// is created, after the interruption of all ongoing operations, and
FORWARD(pg_created, pg_created, local_state.pg_map)
- FORWARD(
- maybe_get_cached_obc, maybe_get_cached_obc, local_state.obc_registry)
- FORWARD(
- get_cached_obc, get_cached_obc, local_state.obc_registry)
-
FORWARD_TO_OSD_SINGLETON_TARGET(
local_update_priority,
local_reserver.update_priority)