]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
rgw: fix FP error when calculating enteries per bi shard 53593/head
authorJ. Eric Ivancich <ivancich@redhat.com>
Thu, 5 Jan 2023 18:57:37 +0000 (13:57 -0500)
committerMykola Golub <mgolub@suse.com>
Fri, 22 Sep 2023 06:17:19 +0000 (09:17 +0300)
commit4d5976f99bd2caa8da52386670c96300072d78c7
tree005564ab1b21298597bb7e4e0b45ed023448e75b
parent2e1f10153ef2437dea8ce9168df827af9bb64fd7
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)
src/rgw/rgw_rados.cc