mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
block: Check request total length is a multiple of SECTOR_SIZE
The request can be spread over multiple descriptors but the virtio-block specification (and this code) expects that is a whole number of sectors (512 bytes). Signed-off-by: Rob Bradford <rbradford@meta.com>
This commit is contained in:
@@ -71,6 +71,8 @@ pub enum Error {
|
||||
GetFileMetadata(#[source] io::Error),
|
||||
#[error("The requested operation would cause a seek beyond disk end")]
|
||||
InvalidOffset,
|
||||
#[error("Request data length is not a multiple of the 512-byte sector size")]
|
||||
InvalidDataLength,
|
||||
#[error("Failure in qcow")]
|
||||
QcowError(#[source] qcow::Error),
|
||||
#[error("The requested operation does not support multiple descriptors")]
|
||||
|
||||
Reference in New Issue
Block a user