Re: [PATCH] selftests: ublk: fix the build and file offsets on 32-bit
From: Jens Axboe
Date: Wed Nov 04 2026 - 10:14:16 EST
On Tue, 03 Nov 2026 11:39:28 -0500, Sasha Levin wrote:
> kublk puts pointers into 64-bit UAPI and SQE fields with a plain (__u64)
> cast. ublk builds with -Werror, so it fails to build on 32-bit
> architectures:
>
> batch.c:379:42: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
>
> Cast through uintptr_t. kublk also passes 64-bit user copy offsets,
> which start at UBLKSRV_IO_BUF_OFFSET (2 GB), to pread() and pwrite(),
> and with glibc those are truncated to a 32-bit off_t there. Build with
> -D_FILE_OFFSET_BITS=64 as well.
>
> [...]
Applied, thanks!
[1/1] selftests: ublk: fix the build and file offsets on 32-bit
commit: 3197517875fdcfae1e9b5a4dcaf35cbbd66c413c
Best regards,
--
Jens Axboe