summaryrefslogtreecommitdiffstats
path: root/src/osd/OSDMapMapping.h
diff options
context:
space:
mode:
authorSage Weil <sage@redhat.com>2017-01-31 21:03:17 +0100
committerSage Weil <sage@redhat.com>2017-02-16 18:04:08 +0100
commit3a072e4b2f143c7846711ba9582183d3e07e5f21 (patch)
treea7a0492f8d23ae1f29ce5b7682cde7d2caf0b521 /src/osd/OSDMapMapping.h
parentmon/OSDMonitor: avoid priming same pgs more than once (diff)
downloadceph-3a072e4b2f143c7846711ba9582183d3e07e5f21.tar.xz
ceph-3a072e4b2f143c7846711ba9582183d3e07e5f21.zip
osd/OSDMapMapper: count total pgs
Signed-off-by: Sage Weil <sage@redhat.com>
Diffstat (limited to 'src/osd/OSDMapMapping.h')
-rw-r--r--src/osd/OSDMapMapping.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/osd/OSDMapMapping.h b/src/osd/OSDMapMapping.h
index cb9498c371a..95fed453f9c 100644
--- a/src/osd/OSDMapMapping.h
+++ b/src/osd/OSDMapMapping.h
@@ -85,6 +85,7 @@ class OSDMapMapping {
std::vector<std::vector<pg_t>> acting_rmap; // osd -> pg
//unused: std::vector<std::vector<pg_t>> up_rmap; // osd -> pg
epoch_t epoch;
+ uint64_t num_pgs = 0;
void _init_mappings(const OSDMap& osdmap);
void _update_range(
@@ -131,6 +132,10 @@ public:
epoch_t get_epoch() const {
return epoch;
}
+
+ uint64_t get_num_pgs() const {
+ return num_pgs;
+ }
};
/// thread pool to calculate mapping on multiple CPUs