]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osdmap: fix temp osd pg mapping
authorSage Weil <sage.weil@dreamhost.com>
Thu, 5 May 2011 23:08:58 +0000 (16:08 -0700)
committerSage Weil <sage.weil@dreamhost.com>
Thu, 5 May 2011 23:12:26 +0000 (16:12 -0700)
If you feed in a raw pg (full precision) you should get the same mapping
out as when you plug in the effective/reduced precision pg.  The
raw_to_temp_osds() wasn't doing that, which gave you results like

flak:src 04:01 PM $ ./ceph pg map 0.4
2011-05-05 16:01:18.524051 mon <- [pg,map,0.4]
2011-05-05 16:01:18.524987 mon2 -> 'osdmap e11 pg 0.4 (0.4) -> up [1,0] acting [0]' (0)
flak:src 04:01 PM $ ./ceph pg map 0.7ed4
2011-05-05 16:01:21.755490 mon <- [pg,map,0.7ed4]
2011-05-05 16:01:21.755996 mon1 -> 'osdmap e11 pg 0.7ed4 (0.4) -> up [1,0] acting [1,0]' (0)

The objecter was feeding in raw pgs, so this was sending requests to the
wrong nodes.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
src/osd/OSDMap.h

index d291919ccfab1e07a089087796197b7f31e6fdfb..254bd31efb722d51528125ae8cf130141a43fcd8 100644 (file)
@@ -843,6 +843,7 @@ private:
   }
   
   bool raw_to_temp_osds(pg_t pg, vector<int>& raw, vector<int>& temp) {
+    pg = raw_pg_to_pg(pg);
     map<pg_t,vector<int> >::iterator p = pg_temp.find(pg);
     if (p != pg_temp.end()) {
       temp.clear();