Re: [PATCHv2 1/2] blktests: test direct io offsets

Chaitanya Kulkarni
2025-11-20T00:56:47Z

On 11/19/25 15:59, Keith Busch wrote:
> On Wed, Nov 19, 2025 at 11:48:47PM +0000, Chaitanya Kulkarni wrote:
>> On 11/19/25 11:54, Keith Busch wrote:
>>> + ret = pwritev(test_fd, iov, vecs, 0);
>>> + if (ret < 0)
>>> + err(errno, "%s: failed to read buf", __func__);
>>> +
>>
>> is pwritev correct above or it should be preadv () ?
> Good eye, it should have been preadv. This part is currently unreachable
> though, as it requires byte-aligned dma limits and the kernel doesn't
> report such a value. But if this were to run, the test would have
> falsely declared data corruption.

how about ?

1. Keep the code but disable it until kernel gets that support ? OR
2. add an ability to autodetect if kernel has a support before running the
test else skip test_invalid_dma_vector_length() ?

-ck