Kevin Wolf
10b2393e5e
blkio: Respect memory-alignment for bounce buffer allocations
...
blkio_alloc_mem_region() requires that the requested buffer size is a
multiple of the memory-alignment property. If it isn't, the allocation
fails with a return value of -EINVAL.
Fix the call in blkio_resize_bounce_pool() to make sure the requested
size is properly aligned.
I observed this problem with vhost-vdpa, which requires page aligned
memory. As the virtio-blk device behind it still had 512 byte blocks, we
got bs->bl.request_alignment = 512, but actually any request that needed
a bounce buffer and was not aligned to 4k would fail without this fix.
Suggested-by: Stefano Garzarella <sgarzare@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Message-ID: <20240131173140.42398-1-kwolf@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2024-02-07 15:26:04 +01:00
..
2023-12-21 22:49:27 +01:00
2024-01-26 11:16:58 +01:00
2022-09-30 18:42:34 +02:00
2021-10-05 18:56:41 +02:00
2023-05-10 14:16:54 +02:00
2023-12-21 22:49:27 +01:00
2023-11-08 17:56:18 +01:00
2024-02-07 15:26:04 +01:00
2024-01-26 11:16:58 +01:00
2023-11-08 17:56:18 +01:00
2023-12-21 22:49:27 +01:00
2024-02-07 14:55:25 +01:00
2023-11-07 19:14:19 +01:00
2022-12-15 16:07:43 +01:00
2022-10-26 14:56:42 -04:00
2023-11-08 17:56:18 +01:00
2023-11-08 17:56:18 +01:00
2024-01-26 11:16:58 +01:00
2023-12-21 22:49:27 +01:00
2022-03-04 18:18:25 +01:00
2023-11-08 17:56:18 +01:00
2023-11-07 19:14:19 +01:00
2023-05-10 14:16:53 +02:00
2023-05-19 19:12:12 +02:00
2023-11-08 17:56:18 +01:00
2020-11-15 17:04:40 +01:00
2023-10-12 16:31:33 +02:00
2023-02-23 19:49:32 +01:00
2019-06-12 13:20:20 +02:00
2023-03-30 15:03:36 +02:00
2023-11-08 17:56:18 +01:00
2023-04-24 13:53:44 -04:00
2023-12-21 22:49:27 +01:00
2023-04-25 13:17:28 +02:00
2023-11-08 17:56:18 +01:00
2023-10-12 16:31:33 +02:00
2023-12-21 22:49:27 +01:00
2024-01-30 16:13:28 -05:00
2024-01-22 11:00:12 -05:00
2021-07-09 18:20:27 +02:00
2023-10-12 16:31:33 +02:00
2023-10-31 15:42:14 +01:00
2023-12-31 09:11:29 +01:00
2023-12-21 22:49:27 +01:00
2023-10-12 16:31:33 +02:00
2023-10-12 16:31:33 +02:00
2023-02-01 16:52:32 +01:00
2023-11-06 15:00:28 +00:00
2023-11-08 17:56:18 +01:00
2023-11-08 17:56:18 +01:00
2023-11-08 17:56:18 +01:00
2023-11-08 17:56:18 +01:00
2023-01-19 10:18:28 +01:00
2023-12-21 22:49:27 +01:00
2023-12-21 22:49:27 +01:00
2023-11-08 17:56:17 +01:00
2023-10-12 16:31:33 +02:00
2023-11-08 17:56:17 +01:00
2023-10-12 16:31:33 +02:00
2023-04-25 13:17:28 +02:00
2023-04-25 13:17:28 +02:00
2023-12-21 22:49:27 +01:00
2023-11-08 17:56:17 +01:00
2023-11-08 17:56:18 +01:00
2023-06-28 09:46:20 +02:00
2022-03-07 13:16:49 +00:00
2023-06-28 09:46:34 +02:00
2023-11-08 17:56:18 +01:00
2023-11-08 17:56:18 +01:00
2023-12-21 22:49:27 +01:00
2023-12-21 22:49:27 +01:00
2023-10-12 16:31:33 +02:00
2023-12-21 22:49:27 +01:00
2022-03-07 09:33:30 +01:00
2023-11-08 17:56:18 +01:00
2023-12-21 22:49:27 +01:00
2023-05-30 17:37:26 +02:00
2024-01-26 11:16:58 +01:00
2023-09-26 18:09:08 +02:00
2023-11-08 17:56:18 +01:00
2023-10-05 11:02:08 -05:00
2020-08-21 06:18:24 -04:00
2023-11-08 17:56:18 +01:00
2019-06-12 13:20:20 +02:00
2023-11-08 17:56:18 +01:00
2023-11-08 17:56:18 +01:00
2023-11-08 17:56:18 +01:00
2023-12-21 22:49:27 +01:00
2023-11-08 17:56:18 +01:00
2023-11-01 16:13:59 +01:00
2023-05-30 17:37:26 +02:00
2023-12-21 22:49:27 +01:00