aboutsummaryrefslogtreecommitdiff
path: root/qapi/block-core.json
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2021-04-14 19:52:26 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2021-06-25 10:54:13 +0200
commit18473467d55a20d643b6c9b3a52de42f705b4d35 (patch)
treec24a98cb7bafaacc30695d5d274df0de24433547 /qapi/block-core.json
parent24b36e9813ec15da7db62e3b3621730710c5f020 (diff)
file-posix: try BLKSECTGET on block devices too, do not round to power of 2
bs->sg is only true for character devices, but block devices can also be used with scsi-block and scsi-generic. Unfortunately BLKSECTGET returns bytes in an int for /dev/sgN devices, and sectors in a short for block devices, so account for that in the code. The maximum transfer also need not be a power of 2 (for example I have seen disks with 1280 KiB maximum transfer) so there's no need to pass the result through pow2floor. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'qapi/block-core.json')
0 files changed, 0 insertions, 0 deletions