]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
rgw: fix FP error when calculating enteries per bi shard
authorJ. Eric Ivancich <ivancich@redhat.com>
Thu, 5 Jan 2023 18:57:37 +0000 (13:57 -0500)
committerJ. Eric Ivancich <ivancich@redhat.com>
Fri, 6 Jan 2023 14:29:37 +0000 (09:29 -0500)
commitbd6ee7e78d857bff31b0bb23f0ee8d8737ffef8e
treedee0de1b55620ea721c61685532cfc539b4de7bb
parentab4dd1a7e757aed6a6e7cc013d6cb0d6890bb3b1
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>
src/rgw/rgw_rados.cc