mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2025-02-06 02:25:23 +00:00
devices: virtio: block: suppress error for GET_ID
If the guest sends a VIRTIO_BLK_T_GET_ID request and the block device does not have an ID configured, crosvm prints an error message: [devices/src/virtio/block/asynchronous.rs:191] failed executing disk request: unsupported (8) Since there is no corresponding feature flag for GET_ID support, the guest can only detect if the command is supported by just trying it. However, the error message is confusing to the crosvm user, since this request failure is not indicative of a problem, just a part of normal operation. To avoid this confusion, suppress the error message when GET_ID fails while still returning the unsupported status to the guest. BUG=None TEST=crosvm run -r vm_rootfs.img vm_kernel # check syslog for no error Change-Id: I05fcd3c428ff1314998ac88fd92d78423155dba3 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3213115 Reviewed-by: Chirantan Ekbote <chirantan@chromium.org> Tested-by: kokoro <noreply+kokoro@google.com> Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
This commit is contained in:
parent
4ea81e3003
commit
ecab88ad99
2 changed files with 6 additions and 2 deletions
|
@ -188,7 +188,9 @@ async fn process_one_request(
|
|||
{
|
||||
Ok(()) => VIRTIO_BLK_S_OK,
|
||||
Err(e) => {
|
||||
if !matches!(e, ExecuteError::Unsupported(VIRTIO_BLK_T_GET_ID)) {
|
||||
error!("failed executing disk request: {}", e);
|
||||
}
|
||||
e.status()
|
||||
}
|
||||
};
|
||||
|
|
|
@ -151,7 +151,9 @@ impl Worker {
|
|||
) {
|
||||
Ok(()) => VIRTIO_BLK_S_OK,
|
||||
Err(e) => {
|
||||
if !matches!(e, ExecuteError::Unsupported(VIRTIO_BLK_T_GET_ID)) {
|
||||
error!("failed executing disk request: {}", e);
|
||||
}
|
||||
e.status()
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue