mirror of
https://github.com/ceph/ceph
synced 2024-12-18 01:16:55 +00:00
OSDMap: add primary-specifying pg_to_acting_osds
This works the same as pg_to_up_acting_osds Signed-off-by: Greg Farnum <greg@inktank.com>
This commit is contained in:
parent
93d481a5d2
commit
045e1d75a7
@ -519,9 +519,17 @@ public:
|
||||
*/
|
||||
int pg_to_osds(pg_t pg, vector<int> *raw, int *primary) const;
|
||||
/// map a pg to its acting set. @return acting set size
|
||||
int pg_to_acting_osds(pg_t pg, vector<int> *acting,
|
||||
int *acting_primary) const {
|
||||
_pg_to_up_acting_osds(pg, NULL, *acting);
|
||||
*acting_primary = (acting->empty() ? -1 : acting->front());
|
||||
return acting->size();
|
||||
}
|
||||
int pg_to_acting_osds(pg_t pg, vector<int>& acting) const {
|
||||
_pg_to_up_acting_osds(pg, NULL, acting);
|
||||
return acting.size();
|
||||
int primary;
|
||||
int r = pg_to_acting_osds(pg, &acting, &primary);
|
||||
assert(acting.empty() || primary == acting.front());
|
||||
return r;
|
||||
}
|
||||
/**
|
||||
* This does not apply temp overrides and should not be used
|
||||
|
Loading…
Reference in New Issue
Block a user