backend: clean up requeued io_u's master
authorVincent Fu <vincent.fu@samsung.com>
Wed, 4 Jun 2025 22:00:01 +0000 (22:00 +0000)
committerVincent Fu <vincent.fu@samsung.com>
Thu, 5 Jun 2025 01:44:43 +0000 (01:44 +0000)
commit813445e7129240d51216e396a5ba8e19296b6581
treea35586454cb3211cd8ed91372804fc2becbf3870
parent02fe4fb04a141d5e72b641f7a36b3ea1e5a2b147
backend: clean up requeued io_u's

When an atttempt to queue an io_u returns FIO_Q_BUSY, the io_u is added
to td->io_u_requeues. If the runtime timeout expires with
td->io_u_requeues not empty, the job will not close the relevant
file because its file->references will be non-zero since the requeued
io_u still holds a reference to the file.

This patch discards the contents of td->io_u_requeues during io_u
cleanup which leads to file closure when its last reference is
destroyed. This is relevant for resource-constrained environments.

Suggested-by: Jonghwi Jeong <jongh2.jeong@samsung.com>
Signed-off-by: Vincent Fu <vincent.fu@samsung.com>
backend.c