Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit effcb9ed authored by Sage Weil's avatar Sage Weil
Browse files

ceph: print useful error message when crush rule not found



Include the crush_ruleset in the error message.

Signed-off-by: default avatarSage Weil <sage@newdream.net>
parent a8b763a9
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -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;
	}