Skip to contentSkip to conversation

Block patches

GIT PULL Applied Stefan Hajnoczi 2 participants 3 messages Aug 11, 2016 Block layer

lore
Share & tools
lore
#0 lore raw

The following changes since commit d08306dc42ea599ffcf8aad056fa9c23acfbe230:

Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into staging (2016-08-10 17:14:35 +0100)

are available in the git repository at:

git://github.com/stefanha/qemu.git tags/block-pull-request

for you to fetch changes up to 44713c9e8547f0ff41e3e257f0dd5c17bb497225:

linux-aio: Handle io_submit() failure gracefully (2016-08-11 09:42:35 +0100)

----------------------------------------------------------------

----------------------------------------------------------------

Kevin Wolf (1):
linux-aio: Handle io_submit() failure gracefully

 block/linux-aio.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
Signature · 1 line
2.7.4
#1 lore raw

[Qemu-devel] [PULL 1/1] linux-aio: Handle io_submit() failure gracefully

From: Kevin Wolf <[email protected]>

It is generally not expected that io_submit() fails other than with -EAGAIN, but corner cases like SELinux refusing I/O when permissions are revoked are still possible. In this case, we shouldn't abort, but just return an I/O error for the request.

Message-id: [email protected]

---
 block/linux-aio.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
block/linux-aio.c +7 -1
index de3548f..e906abe 100644
@@ -221,7 +221,13 @@ static void ioq_submit(LinuxAioState *s)
             break;
         }
         if (ret < 0) {
-            abort();
+            /* Fail the first request, retry the rest */
+            aiocb = QSIMPLEQ_FIRST(&s->io_q.pending);
+            QSIMPLEQ_REMOVE_HEAD(&s->io_q.pending, next);
+            s->io_q.in_queue--;
+            aiocb->ret = ret;
+            qemu_laio_process_completion(aiocb);
+            continue;
         }
 
         s->io_q.in_flight += ret;
Signature · 1 line
2.7.4
#2 lore raw
In reply to Stefan Hajnoczi
Quoted 10 lines · Stefan Hajnoczi

The following changes since commit d08306dc42ea599ffcf8aad056fa9c23acfbe230:

Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into staging (2016-08-10 17:14:35 +0100)

are available in the git repository at:

git://github.com/stefanha/qemu.git tags/block-pull-request

for you to fetch changes up to 44713c9e8547f0ff41e3e257f0dd5c17bb497225:

Quoted 8 lines

linux-aio: Handle io_submit() failure gracefully (2016-08-11 09:42:35 +0100)

----------------------------------------------------------------

----------------------------------------------------------------

Kevin Wolf (1):
linux-aio: Handle io_submit() failure gracefully

Applied, thanks.

-- PMM