Message ID | 20220929200523.3218710-3-kbusch@meta.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | qemu direct io alignment fix | expand |
diff --git a/block/file-posix.c b/block/file-posix.c index e3f3de2780..af994aba2b 100644 --- a/block/file-posix.c +++ b/block/file-posix.c @@ -2068,13 +2068,14 @@ static bool bdrv_qiov_is_aligned(BlockDriverState *bs, QEMUIOVector *qiov) { int i; size_t alignment = bdrv_min_mem_align(bs); + size_t len = bs->bl.request_alignment; IO_CODE(); for (i = 0; i < qiov->niov; i++) { if ((uintptr_t) qiov->iov[i].iov_base % alignment) { return false; } - if (qiov->iov[i].iov_len % alignment) { + if (qiov->iov[i].iov_len % len) { return false; } }