From: Sage Weil Date: Thu, 23 Feb 2017 21:50:21 +0000 (-0500) Subject: mon/OSDMonitor: remove trivial PGMap dependency for 'osd primary-temp' command X-Git-Tag: v12.0.1~285^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F13616%2Fhead;p=ceph.git mon/OSDMonitor: remove trivial PGMap dependency for 'osd primary-temp' command Signed-off-by: Sage Weil --- diff --git a/src/mon/OSDMonitor.cc b/src/mon/OSDMonitor.cc index 79a74a0f1f21..9684eacffa27 100644 --- a/src/mon/OSDMonitor.cc +++ b/src/mon/OSDMonitor.cc @@ -6813,8 +6813,7 @@ bool OSDMonitor::prepare_command_impl(MonOpRequestRef op, err = -EINVAL; goto reply; } - PGMap& pg_map = mon->pgmon()->pg_map; - if (!pg_map.pg_stat.count(pgid)) { + if (!osdmap.pg_exists(pgid)) { ss << "pg " << pgid << " does not exist"; err = -ENOENT; goto reply;