Hello Sage Weil,
The patch 8b3932690084: "crush: warn on do_rule failure" from May 7,
2012, leads to the following warning:
net/ceph/osdmap.c:1117:8: warning: comparison of unsigned expression < 0 is
always false [-Wtautological-compare]
net/ceph/osdmap.c
1114 r = crush_do_rule(osdmap->crush, ruleno, pps, osds,
1115 min_t(int, pool->v.size, *num),
1116 osdmap->osd_weight);
1117 if (r < 0) {
^^^^^
r is unsigned so it's never less than zero. Also crush_do_rule() never
returns negative numbers.
1118 pr_err("error %d from crush rule: pool %d ruleset %d
type %d"
1119 " size %d\n", r, poolid, pool->v.crush_ruleset,
1120 pool->v.type, pool->v.size);
1121 return NULL;
1122 }
1123 *num = r;
regards,
dan carpenter
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html