rbd: increase maximum number of trash entries listable

Work around an issue reported that due to a large number of items in the
rbd trash the function fails rather than listing the items as desired.
This short term fix simply increases the limit rather than doing
anything long term.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
This commit is contained in:
John Mulligan 2022-11-15 11:28:53 -05:00 committed by mergify[bot]
parent 07cb92e414
commit b956ad18da

View File

@ -984,7 +984,7 @@ func GetTrashList(ioctx *rados.IOContext) ([]TrashInfo, error) {
count C.size_t count C.size_t
entries []C.rbd_trash_image_info_t entries []C.rbd_trash_image_info_t
) )
retry.WithSizes(32, 1024, func(size int) retry.Hint { retry.WithSizes(32, 10240, func(size int) retry.Hint {
count = C.size_t(size) count = C.size_t(size)
entries = make([]C.rbd_trash_image_info_t, count) entries = make([]C.rbd_trash_image_info_t, count)
ret := C.rbd_trash_list(cephIoctx(ioctx), &entries[0], &count) ret := C.rbd_trash_list(cephIoctx(ioctx), &entries[0], &count)