mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-31 23:27:20 +00:00

block layer, ublk and io_uring might re-order IO in the past - plug - queue ublk io command via task work Add one test for verifying if sequential WRITE IO is dispatched in order. - null target is taken, so we can just observe io order from `tracepoint:block:block_rq_complete` which represents the dispatch order - WRITE IO is taken because READ may come from system-wide utility Cc: Uday Shankar <ushankar@purestorage.com> Signed-off-by: Ming Lei <ming.lei@redhat.com> Link: https://lore.kernel.org/r/20250322093218.431419-2-ming.lei@redhat.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
25 lines
466 B
Text
25 lines
466 B
Text
/*
|
|
$1: dev_t
|
|
$2: RWBS
|
|
$3: strlen($2)
|
|
*/
|
|
BEGIN {
|
|
@last_rw[$1, str($2)] = 0;
|
|
}
|
|
tracepoint:block:block_rq_complete
|
|
{
|
|
$dev = $1;
|
|
if ((int64)args.dev == $1 && !strncmp(args.rwbs, str($2), $3)) {
|
|
$last = @last_rw[$dev, str($2)];
|
|
if ((uint64)args.sector != $last) {
|
|
printf("io_out_of_order: exp %llu actual %llu\n",
|
|
args.sector, $last);
|
|
}
|
|
@last_rw[$dev, str($2)] = (args.sector + args.nr_sector);
|
|
}
|
|
@ios = count();
|
|
}
|
|
|
|
END {
|
|
clear(@last_rw);
|
|
}
|