From f3263d0988ecfeb52510da299192c99db24ef516 Mon Sep 17 00:00:00 2001 From: Keith Adler Date: Wed, 6 May 2026 11:46:07 -0500 Subject: [PATCH] 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 --- block/src/raw_async.rs | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/block/src/raw_async.rs b/block/src/raw_async.rs index 715a39ecc..c0432e35b 100644 --- a/block/src/raw_async.rs +++ b/block/src/raw_async.rs @@ -69,7 +69,9 @@ impl AsyncIo for RawFileAsync { .build() .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 @@ -97,7 +99,11 @@ impl AsyncIo for RawFileAsync { .build() .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 @@ -119,7 +125,9 @@ impl AsyncIo for RawFileAsync { .build() .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 @@ -169,8 +177,10 @@ impl AsyncIo for RawFileAsync { .build() .user_data(req.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:?}" + ))) })?; }; submitted = true; @@ -189,8 +199,10 @@ impl AsyncIo for RawFileAsync { .build() .user_data(req.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:?}" + ))) })?; }; submitted = true;