mirror of
https://github.com/ceph/ceph
synced 2025-02-24 11:37:37 +00:00
crimson/osd: ObjectContext is not a Blocker anymore.
This is a follow-up to the c2dc437f78
which removes unused OBC mebers after the with_lock() transition.
I'm not sure there is a reason to keep the `Blocker` bits as all
`ObjectContext::dump_detail()` does is just dumping `object_state_t`
while entering the OBC stage is already denoted by `PGPipeline::get_obc`.
Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
This commit is contained in:
parent
c945133cd8
commit
54bc1bd5d4
@ -8,13 +8,6 @@
|
||||
|
||||
namespace crimson::osd {
|
||||
|
||||
void ObjectContext::dump_detail(Formatter *f) const
|
||||
{
|
||||
f->open_object_section("ObjectContext");
|
||||
obs.oi.dump(f);
|
||||
f->close_section();
|
||||
}
|
||||
|
||||
ObjectContextRegistry::ObjectContextRegistry(crimson::common::ConfigProxy &conf)
|
||||
{
|
||||
obc_lru.set_target_size(conf.get_val<uint64_t>("crimson_osd_obc_lru_size"));
|
||||
|
@ -35,8 +35,7 @@ struct obc_to_hoid {
|
||||
}
|
||||
};
|
||||
|
||||
class ObjectContext : public Blocker,
|
||||
public ceph::common::intrusive_lru_base<
|
||||
class ObjectContext : public ceph::common::intrusive_lru_base<
|
||||
ceph::common::intrusive_lru_config<
|
||||
hobject_t, ObjectContext, obc_to_hoid<ObjectContext>>>
|
||||
{
|
||||
@ -98,19 +97,6 @@ private:
|
||||
tri_mutex lock;
|
||||
bool recovery_read_marker = false;
|
||||
|
||||
const char *get_type_name() const final {
|
||||
return "ObjectContext";
|
||||
}
|
||||
void dump_detail(Formatter *f) const final;
|
||||
|
||||
template <typename LockF>
|
||||
seastar::future<> get_lock(
|
||||
Operation *op,
|
||||
LockF &&lockf) {
|
||||
return op->with_blocking_future(
|
||||
make_blocking_future(std::forward<LockF>(lockf)));
|
||||
}
|
||||
|
||||
template <typename Lock, typename Func>
|
||||
auto _with_lock(Lock&& lock, Func&& func) {
|
||||
Ref obc = this;
|
||||
@ -160,13 +146,6 @@ public:
|
||||
return lock.is_acquired();
|
||||
}
|
||||
|
||||
template <typename F>
|
||||
seastar::future<> get_write_greedy(Operation *op) {
|
||||
return get_lock(op, [this] {
|
||||
return lock.lock_for_write(true);
|
||||
});
|
||||
}
|
||||
|
||||
bool get_recovery_read() {
|
||||
if (lock.try_lock_for_read()) {
|
||||
recovery_read_marker = true;
|
||||
|
Loading…
Reference in New Issue
Block a user