entity_inst_t is huge; use uint64_t instead.
Note that this will currently confuse mds.0 vs osd.0, but we plan
to switch the mds to use mds.$gid soon anyway so that will go
away.
Signed-off-by: Sage Weil <sage@redhat.com>
cct->_conf->osd_snap_trim_cost,
cct->_conf->osd_snap_trim_priority,
ceph_clock_now(),
- entity_inst_t(),
+ 0,
pg->get_osdmap()->get_epoch())));
}
cct->_conf->osd_scrub_cost,
scrub_queue_priority,
ceph_clock_now(),
- entity_inst_t(),
+ 0,
pg->get_osdmap()->get_epoch()));
}
cct->_conf->osd_recovery_cost,
cct->_conf->osd_recovery_priority,
ceph_clock_now(),
- entity_inst_t(),
+ 0,
p.first));
}
public:
unordered_map<spg_t,pg_slot> pg_slots;
/// priority queue
- std::unique_ptr<OpQueue< pair<spg_t, PGQueueable>, entity_inst_t>> pqueue;
+ std::unique_ptr<OpQueue< pair<spg_t, PGQueueable>, uint64_t>> pqueue;
void _enqueue_front(pair<spg_t, PGQueueable> item, unsigned cutoff) {
unsigned priority = item.second.get_priority();
false, cct) {
if (opqueue == io_queue::weightedpriority) {
pqueue = std::unique_ptr
- <WeightedPriorityQueue<pair<spg_t,PGQueueable>,entity_inst_t>>(
- new WeightedPriorityQueue<pair<spg_t,PGQueueable>,entity_inst_t>(
+ <WeightedPriorityQueue<pair<spg_t,PGQueueable>,uint64_t>>(
+ new WeightedPriorityQueue<pair<spg_t,PGQueueable>,uint64_t>(
max_tok_per_prio, min_cost));
} else if (opqueue == io_queue::prioritized) {
pqueue = std::unique_ptr
- <PrioritizedQueue<pair<spg_t,PGQueueable>,entity_inst_t>>(
- new PrioritizedQueue<pair<spg_t,PGQueueable>,entity_inst_t>(
+ <PrioritizedQueue<pair<spg_t,PGQueueable>,uint64_t>>(
+ new PrioritizedQueue<pair<spg_t,PGQueueable>,uint64_t>(
max_tok_per_prio, min_cost));
} else if (opqueue == io_queue::mclock_opclass) {
pqueue = std::unique_ptr
int cost;
unsigned priority;
utime_t start_time;
- entity_inst_t owner;
+ uint64_t owner; ///< global id (e.g., client.XXX)
epoch_t map_epoch; ///< an epoch we expect the PG to exist in
struct RunVis : public boost::static_visitor<> {
: qvariant(op), cost(op->get_req()->get_cost()),
priority(op->get_req()->get_priority()),
start_time(op->get_req()->get_recv_stamp()),
- owner(op->get_req()->get_source_inst()),
+ owner(op->get_req()->get_source().num()),
map_epoch(e)
{}
PGQueueable(
const PGSnapTrim &op, int cost, unsigned priority, utime_t start_time,
- const entity_inst_t &owner, epoch_t e)
+ uint64_t owner, epoch_t e)
: qvariant(op), cost(cost), priority(priority), start_time(start_time),
owner(owner), map_epoch(e) {}
PGQueueable(
const PGScrub &op, int cost, unsigned priority, utime_t start_time,
- const entity_inst_t &owner, epoch_t e)
+ uint64_t owner, epoch_t e)
: qvariant(op), cost(cost), priority(priority), start_time(start_time),
owner(owner), map_epoch(e) {}
PGQueueable(
const PGRecovery &op, int cost, unsigned priority, utime_t start_time,
- const entity_inst_t &owner, epoch_t e)
+ uint64_t owner, epoch_t e)
: qvariant(op), cost(cost), priority(priority), start_time(start_time),
owner(owner), map_epoch(e) {}
unsigned get_priority() const { return priority; }
int get_cost() const { return cost; }
utime_t get_start_time() const { return start_time; }
- entity_inst_t get_owner() const { return owner; }
+ uint64_t get_owner() const { return owner; }
epoch_t get_map_epoch() const { return map_epoch; }
const QVariant& get_variant() const { return qvariant; }
}; // struct PGQueueable
namespace ceph {
using Request = std::pair<spg_t, PGQueueable>;
- using Client = entity_inst_t;
+ using Client = uint64_t;
// This class exists to bridge the ceph code, which treats the class
enum class osd_op_type_t {
client_op, osd_subop, bg_snaptrim, bg_recovery, bg_scrub };
- using InnerClient = std::pair<entity_inst_t,osd_op_type_t>;
+ using InnerClient = std::pair<uint64_t,osd_op_type_t>;
using queue_t = mClockQueue<Request, InnerClient>;
namespace ceph {
using Request = std::pair<spg_t, PGQueueable>;
- using Client = entity_inst_t;
+ using Client = uint64_t;
// This class exists to bridge the ceph code, which treats the class