[Devel] [PATCH v2 VZ9 0/4] vhost-blk: bounce buffer for unaligned requests

2024-12-29 Thread Pavel Tikhomirov
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

[Devel] [PATCH v2 VZ9 2/4] vhost-blk: remove excess vhost_blk_req.use_inline

2024-12-29 Thread Pavel Tikhomirov
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

[Devel] [PATCH v2 VZ9 1/4] vhost-blk: rework iov and bio handling

2024-12-29 Thread Pavel Tikhomirov
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

[Devel] [PATCH v2 VZ9 3/4] iov_iter: Add a function to extract a page list from an iterator

2024-12-29 Thread Pavel Tikhomirov
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.

[Devel] [PATCH v2 VZ9 4/4] vhost-blk: add bounce-buffer for non-aligned requests

2024-12-29 Thread Pavel Tikhomirov
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

Re: [Devel] [RFC PATCH vz9 v6 01/62] dm-ploop: md_pages map all pages at creation time

2024-12-29 Thread Alexander Atanasov
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