Re: [PATCH blktests] block/045: respect dma_alignment

Shin'ichiro Kawasaki <[email protected]>
Newsgroups org.kernel.vger.linux-block
Message-ID <aofpEiLpsmRVtGJR@shinhome>
On Aug 06, 2026 / 18:42, Shin'ichiro Kawasaki wrote:
> Since the kernel commit 14b007e17881 ("block: validate user space
> vectors during extraction"), the test case block/045 fails with the
> error message below:
> 
>  block/045 (test direct I/O full-trim bvec alignment)         [failed]
>      runtime  0.550s  ...  0.630s
>      --- tests/block/045.out     2026-08-03 19:26:40.407053612 +0900
>      +++ /home/shin/Blktests/blktests/results/nodev/block/045.out.bad    2026-08-05 20:48:33.366932845 +0900
>      @@ -1,2 +1,4 @@
>       Running block/045
>      +bio-full-trim: pread returned -1 (errno 22)
>      +bio-full-trim helper failed
>       Test complete
> 
> The errno 22 means EINVAL. The commit introduced the dma_alignment check
> and returns EINVAL when the check is not fulfilled. The test case calls
> pread() with one byte offset. This offset is not aligned to the
> dma_alignment, then EINVAL is returned.
> 
> To avoid the failure, respect the dma_alignment check. Get the
> dma_alignment value and pass it to bio-full-trim command. Use the
> alignment to decide the offset value.

FYI, I applied the patch.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.