diff options
author | jerryluo <luojierui@chinatelecom.cn> | 2021-01-25 17:10:57 +0100 |
---|---|---|
committer | Kefu Chai <tchaikov@gmail.com> | 2021-09-27 15:55:00 +0200 |
commit | c726ce9e5088b30d29e0db5c0ecc8c03fe41da1d (patch) | |
tree | e94aa75eedbbe027d30daaf201d77b0b16c6186e /src/osd/OSDMapMapping.h | |
parent | Merge pull request #43285 from rhcs-dashboard/api-endpoint-version-compatibility (diff) | |
download | ceph-c726ce9e5088b30d29e0db5c0ecc8c03fe41da1d.tar.xz ceph-c726ce9e5088b30d29e0db5c0ecc8c03fe41da1d.zip |
mon/OSDMonitor: Make the pg_num check more accurate
In check_pg_num function, finding the corresponding osd according to the
current pool's crush rule, and calculating whether the average value of
pg_num on these osd will exceed the value of 'mon_max_pg_per_osd'. Make
the pg_num check more accurate by counting all the pgs on the osd used
by the new pool.
Fixes: https://tracker.ceph.com/issues/47062
Signed-off-by: Jerry Luo <luojierui@chinatelecom.cn>
Diffstat (limited to 'src/osd/OSDMapMapping.h')
-rw-r--r-- | src/osd/OSDMapMapping.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/osd/OSDMapMapping.h b/src/osd/OSDMapMapping.h index b4ddd322b19..4025917d0dd 100644 --- a/src/osd/OSDMapMapping.h +++ b/src/osd/OSDMapMapping.h @@ -324,7 +324,7 @@ public: } } - const mempool::osdmap_mapping::vector<pg_t>& get_osd_acting_pgs(unsigned osd) { + const mempool::osdmap_mapping::vector<pg_t>& get_osd_acting_pgs(unsigned osd) { ceph_assert(osd < acting_rmap.size()); return acting_rmap[osd]; } |