if (!qi.peering_requires_pg()) {
// for pg-less events, we run them under the ordering lock, since
// we don't have the pg lock to keep them ordered.
- qi.run(osd, pg, tp_handle);
+ qi.run(osd, sdata, pg, tp_handle);
} else if (osdmap->is_up_acting_osd_shard(token, osd->whoami)) {
if (create_info) {
if (create_info->by_mon &&
delete f;
*_dout << dendl;
- qi.run(osd, pg, tp_handle);
+ qi.run(osd, sdata, pg, tp_handle);
{
#ifdef WITH_LTTNG
#include "OpQueueItem.h"
#include "OSD.h"
-void PGOpItem::run(OSD *osd,
- PGRef& pg,
- ThreadPool::TPHandle &handle)
+void PGOpItem::run(
+ OSD *osd,
+ OSDShard *sdata,
+ PGRef& pg,
+ ThreadPool::TPHandle &handle)
{
osd->dequeue_op(pg, op, handle);
pg->unlock();
void PGPeeringItem::run(
OSD *osd,
+ OSDShard *sdata,
PGRef& pg,
ThreadPool::TPHandle &handle)
{
osd->dequeue_peering_evt(pg.get(), evt, handle);
}
-void PGSnapTrim::run(OSD *osd,
- PGRef& pg,
- ThreadPool::TPHandle &handle)
+void PGSnapTrim::run(
+ OSD *osd,
+ OSDShard *sdata,
+ PGRef& pg,
+ ThreadPool::TPHandle &handle)
{
pg->snap_trimmer(epoch_queued);
pg->unlock();
}
-void PGScrub::run(OSD *osd,
- PGRef& pg,
- ThreadPool::TPHandle &handle)
+void PGScrub::run(
+ OSD *osd,
+ OSDShard *sdata,
+ PGRef& pg,
+ ThreadPool::TPHandle &handle)
{
pg->scrub(epoch_queued, handle);
pg->unlock();
}
-void PGRecovery::run(OSD *osd,
- PGRef& pg,
- ThreadPool::TPHandle &handle)
+void PGRecovery::run(
+ OSD *osd,
+ OSDShard *sdata,
+ PGRef& pg,
+ ThreadPool::TPHandle &handle)
{
osd->do_recovery(pg.get(), epoch_queued, reserved_pushes, handle);
pg->unlock();
void PGRecoveryContext::run(
OSD *osd,
+ OSDShard *sdata,
PGRef& pg,
ThreadPool::TPHandle &handle)
{
void PGDelete::run(
OSD *osd,
+ OSDShard *sdata,
PGRef& pg,
ThreadPool::TPHandle &handle)
{
#include "PGPeeringEvent.h"
class OSD;
+class OSDShard;
class OpQueueItem {
public:
virtual ostream &print(ostream &rhs) const = 0;
- virtual void run(OSD *osd, PGRef& pg, ThreadPool::TPHandle &handle) = 0;
+ virtual void run(OSD *osd, OSDShard *sdata, PGRef& pg, ThreadPool::TPHandle &handle) = 0;
virtual ~OpQueueable() {}
friend ostream& operator<<(ostream& out, const OpQueueable& q) {
return q.print(out);
uint64_t get_reserved_pushes() const {
return qitem->get_reserved_pushes();
}
- void run(OSD *osd, PGRef& pg, ThreadPool::TPHandle &handle) {
- qitem->run(osd, pg, handle);
+ void run(OSD *osd, OSDShard *sdata,PGRef& pg, ThreadPool::TPHandle &handle) {
+ qitem->run(osd, sdata, pg, handle);
}
unsigned get_priority() const { return priority; }
int get_cost() const { return cost; }
boost::optional<OpRequestRef> maybe_get_op() const override final {
return op;
}
- void run(OSD *osd, PGRef& pg, ThreadPool::TPHandle &handle) override final;
+ void run(OSD *osd, OSDShard *sdata, PGRef& pg, ThreadPool::TPHandle &handle) override final;
};
class PGPeeringItem : public PGOpQueueable {
ostream &print(ostream &rhs) const override final {
return rhs << "PGPeeringEvent(" << evt->get_desc() << ")";
}
- void run(OSD *osd, PGRef& pg, ThreadPool::TPHandle &handle) override final;
+ void run(OSD *osd, OSDShard *sdata, PGRef& pg, ThreadPool::TPHandle &handle) override final;
bool is_peering() const override {
return true;
}
<< ")";
}
void run(
- OSD *osd, PGRef& pg, ThreadPool::TPHandle &handle) override final;
+ OSD *osd, OSDShard *sdata, PGRef& pg, ThreadPool::TPHandle &handle) override final;
};
class PGScrub : public PGOpQueueable {
<< ")";
}
void run(
- OSD *osd, PGRef& pg, ThreadPool::TPHandle &handle) override final;
+ OSD *osd, OSDShard *sdata, PGRef& pg, ThreadPool::TPHandle &handle) override final;
};
class PGRecovery : public PGOpQueueable {
return reserved_pushes;
}
virtual void run(
- OSD *osd, PGRef& pg, ThreadPool::TPHandle &handle) override final;
+ OSD *osd, OSDShard *sdata, PGRef& pg, ThreadPool::TPHandle &handle) override final;
};
class PGRecoveryContext : public PGOpQueueable {
<< ")";
}
void run(
- OSD *osd, PGRef& pg, ThreadPool::TPHandle &handle) override final;
+ OSD *osd, OSDShard *sdata, PGRef& pg, ThreadPool::TPHandle &handle) override final;
};
class PGDelete : public PGOpQueueable {
<< ")";
}
void run(
- OSD *osd, PGRef& pg, ThreadPool::TPHandle &handle) override final;
+ OSD *osd, OSDShard *sdata, PGRef& pg, ThreadPool::TPHandle &handle) override final;
};