The const spg_t member is been insantiated from constructor
and now get_pgid() can reference this to return a spg_t instance
without the need of pg_info (thus not requiring to acquire pg_lock).
Signed-off-by: Somnath Roy <somnath.roy@sandisk.com>
finish_sync_event(NULL),
scrub_after_recovery(false),
active_pushes(0),
- recovery_state(this)
+ recovery_state(this),
+ pg_id(p)
{
#ifdef PG_DEBUG_REFS
osd->add_pgid(p, this);
// Prevent copying
PG(const PG& rhs);
PG& operator=(const PG& rhs);
+ const spg_t pg_id;
public:
- spg_t get_pgid() const { return info.pgid; }
+ const spg_t& get_pgid() const { return pg_id; }
int get_nrep() const { return acting.size(); }
void init_primary_up_acting(