mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
block: Add BackingFilesDisabled error for actionable user guidance
When a QCOW2 image has a backing file but backing_files=on is not set, the error was MaxNestingDepthExceeded which gives no indication that this is a policy decision or how to resolve it. Add a BackingFilesDisabled error variant whose message indicates that backing file support is disabled and references the backing_files option. The translation from MaxNestingDepthExceeded to BackingFilesDisabled happens at the QcowDiskSync boundary where the policy decision is made, preserving the original error for genuine recursive depth exhaustion. Signed-off-by: Anatol Belski <anbelski@linux.microsoft.com>
This commit is contained in:
committed by
Rob Bradford
parent
68f746fbea
commit
94368c622e
@@ -44,6 +44,8 @@ pub enum Error {
|
||||
BackingFileIo(#[source] io::Error),
|
||||
#[error("Backing file open error")]
|
||||
BackingFileOpen(#[source] Box<Error>),
|
||||
#[error("Backing file support is disabled")]
|
||||
BackingFilesDisabled,
|
||||
#[error("Backing file name is too long: {0} bytes over")]
|
||||
BackingFileTooLong(usize),
|
||||
#[error("Image is marked corrupt and cannot be opened for writing")]
|
||||
|
||||
Reference in New Issue
Block a user