ceph: print useful error message when crush rule not found
authorSage Weil <sage@newdream.net>
Fri, 9 Jul 2010 18:00:08 +0000 (11:00 -0700)
committerSage Weil <sage@newdream.net>
Mon, 2 Aug 2010 03:11:42 +0000 (20:11 -0700)
Include the crush_ruleset in the error message.

Signed-off-by: Sage Weil <sage@newdream.net>
fs/ceph/osdmap.c

index 46b391d8e86c02b91dd7be4a421730df6dbbd11f..1d5f58cc2d9337e18a278828a6a4654b55e898ae 100644 (file)
@@ -1026,8 +1026,9 @@ static int *calc_pg_raw(struct ceph_osdmap *osdmap, struct ceph_pg pgid,
        ruleno = crush_find_rule(osdmap->crush, pool->v.crush_ruleset,
                                 pool->v.type, pool->v.size);
        if (ruleno < 0) {
-               pr_err("no crush rule pool %d type %d size %d\n",
-                      poolid, pool->v.type, pool->v.size);
+               pr_err("no crush rule pool %d ruleset %d type %d size %d\n",
+                      poolid, pool->v.crush_ruleset, pool->v.type,
+                      pool->v.size);
                return NULL;
        }