]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mon: make 'pg map <pgid>' output more explicit
authorSage Weil <sage@newdream.net>
Mon, 17 Jan 2011 23:36:51 +0000 (15:36 -0800)
committerSage Weil <sage@newdream.net>
Mon, 17 Jan 2011 23:36:51 +0000 (15:36 -0800)
Show effective pgid in parens.

Signed-off-by: Sage Weil <sage@newdream.net>
src/mon/PGMonitor.cc

index 0709e3754ab93d038bea0e3f8557e5ccd115bf8a..772f2c80e62e4f3dea993c38fd21592fe4609c73 100644 (file)
@@ -745,8 +745,10 @@ bool PGMonitor::preprocess_command(MMonCommand *m)
       r = -EINVAL;
       if (pgid.parse(m->cmd[2].c_str())) {
        vector<int> up, acting;
+       pg_t mpgid = mon->osdmon()->osdmap.raw_pg_to_pg(pgid);
        mon->osdmon()->osdmap.pg_to_up_acting_osds(pgid, up, acting);
-       ss << "osdmap e" << mon->osdmon()->osdmap.get_epoch() << " pg " << pgid
+       ss << "osdmap e" << mon->osdmon()->osdmap.get_epoch()
+          << " pg " << pgid << " (" << mpgid << ")"
           << " -> up " << up << " acting " << acting;
        r = 0;
       } else