mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
block: preserve async queue push errors
Keep the underlying io_uring submission queue push error in raw async I/O paths instead of replacing it with a generic full-queue message. Signed-off-by: Keith Adler <kadler@cloudflare.com>
This commit is contained in:
committed by
Rob Bradford
parent
cd3aca91d3
commit
f3263d0988
@@ -69,7 +69,9 @@ impl AsyncIo for RawFileAsync {
|
|||||||
.build()
|
.build()
|
||||||
.user_data(user_data),
|
.user_data(user_data),
|
||||||
)
|
)
|
||||||
.map_err(|_| AsyncIoError::ReadVectored(Error::other("Submission queue is full")))?;
|
.map_err(|e| {
|
||||||
|
AsyncIoError::ReadVectored(Error::other(format!("Submission queue is full: {e:?}")))
|
||||||
|
})?;
|
||||||
};
|
};
|
||||||
|
|
||||||
// Update the submission queue and submit new operations to the
|
// Update the submission queue and submit new operations to the
|
||||||
@@ -97,7 +99,11 @@ impl AsyncIo for RawFileAsync {
|
|||||||
.build()
|
.build()
|
||||||
.user_data(user_data),
|
.user_data(user_data),
|
||||||
)
|
)
|
||||||
.map_err(|_| AsyncIoError::WriteVectored(Error::other("Submission queue is full")))?;
|
.map_err(|e| {
|
||||||
|
AsyncIoError::WriteVectored(Error::other(format!(
|
||||||
|
"Submission queue is full: {e:?}"
|
||||||
|
)))
|
||||||
|
})?;
|
||||||
};
|
};
|
||||||
|
|
||||||
// Update the submission queue and submit new operations to the
|
// Update the submission queue and submit new operations to the
|
||||||
@@ -119,7 +125,9 @@ impl AsyncIo for RawFileAsync {
|
|||||||
.build()
|
.build()
|
||||||
.user_data(user_data),
|
.user_data(user_data),
|
||||||
)
|
)
|
||||||
.map_err(|_| AsyncIoError::Fsync(Error::other("Submission queue is full")))?;
|
.map_err(|e| {
|
||||||
|
AsyncIoError::Fsync(Error::other(format!("Submission queue is full: {e:?}")))
|
||||||
|
})?;
|
||||||
};
|
};
|
||||||
|
|
||||||
// Update the submission queue and submit new operations to the
|
// Update the submission queue and submit new operations to the
|
||||||
@@ -169,8 +177,10 @@ impl AsyncIo for RawFileAsync {
|
|||||||
.build()
|
.build()
|
||||||
.user_data(req.user_data),
|
.user_data(req.user_data),
|
||||||
)
|
)
|
||||||
.map_err(|_| {
|
.map_err(|e| {
|
||||||
AsyncIoError::ReadVectored(Error::other("Submission queue is full"))
|
AsyncIoError::ReadVectored(Error::other(format!(
|
||||||
|
"Submission queue is full: {e:?}"
|
||||||
|
)))
|
||||||
})?;
|
})?;
|
||||||
};
|
};
|
||||||
submitted = true;
|
submitted = true;
|
||||||
@@ -189,8 +199,10 @@ impl AsyncIo for RawFileAsync {
|
|||||||
.build()
|
.build()
|
||||||
.user_data(req.user_data),
|
.user_data(req.user_data),
|
||||||
)
|
)
|
||||||
.map_err(|_| {
|
.map_err(|e| {
|
||||||
AsyncIoError::WriteVectored(Error::other("Submission queue is full"))
|
AsyncIoError::WriteVectored(Error::other(format!(
|
||||||
|
"Submission queue is full: {e:?}"
|
||||||
|
)))
|
||||||
})?;
|
})?;
|
||||||
};
|
};
|
||||||
submitted = true;
|
submitted = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user