qemu/block/export
Stefan Hajnoczi e44362ce31 block/export: fix vhost-user-blk export sector number calculation
The driver is supposed to honor the blk_size field but the protocol
still uses 512-byte sector numbers. It is incorrect to multiply
req->sector_num by blk_size.

VIRTIO 1.1 5.2.5 Device Initialization says:

  blk_size can be read to determine the optimal sector size for the
  driver to use. This does not affect the units used in the protocol
  (always 512 bytes), but awareness of the correct value can affect
  performance.

Fixes: 3578389bcf ("block/export: vhost-user block device backend server")
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-Id: <20210223144653.811468-10-stefanha@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2021-03-08 14:56:54 +01: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: fix vhost-user-blk export sector number calculation 2021-03-08 14:56:54 +01: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