engines/io_uring: remove loop over CQEs in fio_ioring_cqring_reap()
authorCaleb Sander Mateos <csander@purestorage.com>
Thu, 17 Jul 2025 17:23:35 +0000 (11:23 -0600)
committerCaleb Sander Mateos <csander@purestorage.com>
Thu, 17 Jul 2025 17:23:35 +0000 (11:23 -0600)
commit740019d28b835bf45a15c8660467f22231dcd268
tree39d2545d91325cae7c4be33a12b6d8b2e8e9c421
parentec87e8c198a341f5649020a24516c04293ed8787
engines/io_uring: remove loop over CQEs in fio_ioring_cqring_reap()

Currently fio_ioring_cqring_reap() loops over each available CQE,
re-loading the tail index, incrementing local variables, and checking
whether the max requested CQEs have been seen.
Avoid the loop by computing the number of available CQEs as tail - head
and capping it to the requested max.

Signed-off-by: Caleb Sander Mateos <csander@purestorage.com>
engines/io_uring.c