]> git.ipfire.org Git - thirdparty/linux.git/commit
selftests: ublk: correct last_rw map type in seq_io.bt
authorCaleb Sander Mateos <csander@purestorage.com>
Fri, 12 Dec 2025 17:17:00 +0000 (10:17 -0700)
committerJens Axboe <axboe@kernel.dk>
Fri, 12 Dec 2025 19:50:40 +0000 (12:50 -0700)
commit1fd4b8d7e3cf102bd01a295460d629e15152d2b3
treead8f1119bf57a389b2d952c5537e514a4e65726b
parent9637fc3bdd10c8e073f71897bd35babbd21e9b29
selftests: ublk: correct last_rw map type in seq_io.bt

The last_rw map is initialized with a value of 0 but later assigned the
value args.sector + args.nr_sector, which has type sector_t = u64.
bpftrace complains about the type mismatch between int64 and uint64:
trace/seq_io.bt:18:3-59: ERROR: Type mismatch for @last_rw: trying to assign value of type 'uint64' when map already contains a value of type 'int64'
        @last_rw[$dev, str($2)] = (args.sector + args.nr_sector);

Cast the initial value to uint64 so bpftrace will load the program.

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/trace/seq_io.bt