]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
selftests: ublk: support non-O_DIRECT backing files
authorCaleb Sander Mateos <csander@purestorage.com>
Thu, 8 Jan 2026 09:19:44 +0000 (02:19 -0700)
committerJens Axboe <axboe@kernel.dk>
Mon, 12 Jan 2026 16:16:38 +0000 (09:16 -0700)
commita1805442674b85ff9d626965f828e4fd71a82b28
tree83b3582cba4dbc4089ae838857819f210e98ab26
parent24f8a44b797f03dfadb455138930523599d3c22a
selftests: ublk: support non-O_DIRECT backing files

A subsequent commit will add support for using a backing file to store
integrity data. Since integrity data is accessed in intervals of
metadata_size, which may be much smaller than a logical block on the
backing device, direct I/O cannot be used. Add an argument to
backing_file_tgt_init() to specify the number of files to open for
direct I/O. The remaining files will use buffered I/O. For now, continue
to request direct I/O for all the files.

Signed-off-by: Caleb Sander Mateos <csander@purestorage.com>
Reviewed-by: Ming Lei <ming.lei@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
tools/testing/selftests/ublk/common.c
tools/testing/selftests/ublk/file_backed.c
tools/testing/selftests/ublk/kublk.h
tools/testing/selftests/ublk/stripe.c