From: Sage Weil Date: Fri, 8 Feb 2019 13:22:20 +0000 (-0600) Subject: common/options: add osd_map_message_max_bytes X-Git-Tag: v12.2.13~196^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=09a3cf5e0f933fe5854ea97f10a50d1118d3751d;p=ceph.git common/options: add osd_map_message_max_bytes Limit MOSDMap message size by bytes as well as map count. Signed-off-by: Sage Weil (cherry picked from commit e15be00560c1492e0807d0779cfd0d6088396b3e) Conflicts: src/common/config_values.h: the changes in this file is applied to src/common/config.h instead. because, src/common/config_values.h is extracted in 4718b7cb2fac65b2ac7014f42ba1a10181350f0b. which happened after luminous, and that commit was not backported. also, the OPT_SIZE is changed to OPT_U64, as we don't have OPT_SIZE by then, the size_t option support was added after luminous, and that change was not backported. so let's use the uint64_t as an alternative, as other *bytes settings are also using OPT_U64. and OSDMonitor.cc will be accessing that setting using the legacy way instead of using conf.get_val<>() interface, so this change will have no impact on the fix. --- diff --git a/src/common/legacy_config_opts.h b/src/common/legacy_config_opts.h index 7dac8782d23..3f997a41ea4 100644 --- a/src/common/legacy_config_opts.h +++ b/src/common/legacy_config_opts.h @@ -649,6 +649,7 @@ OPTION(osd_map_dedup, OPT_BOOL) OPTION(osd_map_max_advance, OPT_INT) // make this < cache_size! OPTION(osd_map_cache_size, OPT_INT) OPTION(osd_map_message_max, OPT_INT) // max maps per MOSDMap message +OPTION(osd_map_message_max_bytes, OPT_U64) // max maps per MOSDMap message OPTION(osd_map_share_max_epochs, OPT_INT) // cap on # of inc maps we send to peers, clients OPTION(osd_inject_bad_map_crc_probability, OPT_FLOAT) OPTION(osd_inject_failure_on_pg_removal, OPT_BOOL) diff --git a/src/common/options.cc b/src/common/options.cc index fdbc23312ae..1a1afb6aac4 100644 --- a/src/common/options.cc +++ b/src/common/options.cc @@ -1928,7 +1928,11 @@ std::vector