bufferlist doesn't need to use dout/derr. Only one function used it, and
that was only to return an error string.
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
The problem is that on some platforms __u64 == uint64_t (x86_64), and on
others it's doesn't (ppc64). Which means we don't know whether to define
different versions of overloaded functions for both types or just one.
So, standardize on uint64_t. This plays nicer with STL, which defines
hash<uint64_t> on 64 bit arches but not 32 bit. Which means we can't
standarzie on __u64 or else hash<__u64> won't work. Bah!
This lets us return NULL if the pool isn't in the map, which is
needed functionality for pool deletion. Meanwhile, code which
expects the pool to exist will continue to cause a crash if it doesn't.
This was misbehaving for x=0, among other things.
Avoid filling in perm array for the initial (p)r=0 call. We only
need to do a full permutation for subsequent r.