rgw: fix FP error when calculating enteries per bi shard
When calculating how many entries per shard to request during an
ordered bucket listing, we divide by the number of bucket index
shards. If this value is 0, then a floating point exception is
generated, crashing the RGW.
This addresses the proximate issue by detecting the situation and
returning an error rather than crashing.
Signed-off-by: J. Eric Ivancich <ivancich@redhat.com>
(cherry picked from commit
bd6ee7e78d857bff31b0bb23f0ee8d8737ffef8e)
Conflicts:
src/rgw/rgw_rados.cc (trivial: __func__ vs __PRETTY_FUNCTION__)