This is a rework (this v2) of patches originally implemented by Andrey.
https://virtuozzo.atlassian.net/browse/PSBM-157752
Andrey Zhadchenko (2):
vhost-blk: rework iov and bio handling
vhost-blk: add bounce-buffer for non-aligned requests
David Howells (1):
iov_iter: Add a function to extr
We already have all information in vhost_blk_req.bio itself, so we can
save place in vhost_blk_req.
https://virtuozzo.atlassian.net/browse/PSBM-157752
Signed-off-by: Pavel Tikhomirov
---
drivers/vhost/blk.c | 6 +-
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/drivers/vhost/bl
From: Andrey Zhadchenko
Manual page handling is tiresome and error-prone. Let's use iov
iterators and bio_iov_iter_get_pages() helper, which will
automatically fill bio with pages from iov. As this also pins
pages, add bio_release_pages() at the end of every bio.
While at it, remove VHOST_BLK_SE
From: David Howells
Add a function, iov_iter_extract_pages(), to extract a list of pages from
an iterator. The pages may be returned with a pin added or nothing,
depending on the type of iterator.
Add a second function, iov_iter_extract_will_pin(), to determine how the
cleanup should be done.
From: Andrey Zhadchenko
We see that virtio-blk requests from Windows Server 2022 are not aligned
to sector size (512), specifically that io vectors start at 0x8 offset
to sector alignment. And if we send such unaligned requests directly to
block device it refuses to work with them.
In qemu there
On 24.12.24 12:13, Pavel Tikhomirov wrote:
I'll reply here to all the comments.
- kmap_atomic creates a temporary mapping on the current CPU only and we
want to create permanent mappings for the pages.
- kmap_atomic is deprecated - we want to avoid it.
- we want to use READ/WRITE_ONCE ever