backend: respect return value of init_io_u_buffers
authorShin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Thu, 1 Dec 2022 02:44:25 +0000 (11:44 +0900)
committerJens Axboe <axboe@kernel.dk>
Thu, 1 Dec 2022 02:58:34 +0000 (19:58 -0700)
commit6d8fe6e847bb43cf7db5eee4cf58fd490f12be47
treea418a78f92655aa8097d35d338726cc4e680ea67
parent967c5441fa3d3932ec50ea5623411cc6e8589463
backend: respect return value of init_io_u_buffers

When workloads require large buffer for I/O, fio fails to allocate I/O
buffer but does not report meaningful error message. It just accesses
to null pointer and fail with signal 11. This symptom is observed with
the command line below:

$ fio --name=job --filename=/tmp/fio --rw=write --bs=1g --size=1g \
      --iodepth=128 --ioengine=libaio

The I/O buffer allocation is done in function init_io_u_buffers. The
allocation failure is not reported because return value of the function
is ignored. Check the return value and report to the higher layer.

Fixes: 71e6e5a2fd5c ("iolog replay: Realloc io_u buffers to adapt to operation size.")
Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Link: https://lore.kernel.org/r/20221201024425.2340442-1-shinichiro.kawasaki@wdc.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
backend.c
blktrace.c
iolog.c