qemu/block/export
Stefan Hajnoczi 1b0b2e6d06 block/export: improve vu_blk_sect_range_ok()
The checks in vu_blk_sect_range_ok() assume VIRTIO_BLK_SECTOR_SIZE is
equal to BDRV_SECTOR_SIZE. This is true, but let's add a
QEMU_BUILD_BUG_ON() to make it explicit.

We might as well check that the request buffer size is a multiple of
VIRTIO_BLK_SECTOR_SIZE while we're at it.

Suggested-by: Max Reitz <mreitz@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-Id: <20210331142727.391465-1-stefanha@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2021-05-18 11:08:13 +02:00
..
export.c qapi: Use QAPI_LIST_APPEND in trivial cases 2021-01-28 08:08:45 +01:00
fuse.c fuse: Implement hole detection through lseek 2020-12-11 17:52:40 +01:00
meson.build fuse: Allow exporting BDSs via FUSE 2020-12-11 17:52:39 +01:00
vhost-user-blk-server.c block/export: improve vu_blk_sect_range_ok() 2021-05-18 11:08:13 +02:00
vhost-user-blk-server.h block/export: convert vhost-user-blk server to block export API 2020-10-23 13:42:16 +01:00