[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 15/26] gluster: Abort on AIO completion failure
From: |
Kevin Wolf |
Subject: |
[Qemu-devel] [PULL 15/26] gluster: Abort on AIO completion failure |
Date: |
Fri, 30 Aug 2013 16:30:40 +0200 |
From: Bharata B Rao <address@hidden>
Currently if gluster AIO callback thread fails to notify the QEMU thread about
AIO completion, we try graceful recovery by marking the disk drive as
inaccessible. This error recovery code is race-prone as found by Asias and
Stefan. However as found out by Paolo, this kind of error is impossible and
hence simplify the code that handles this error recovery.
Signed-off-by: Bharata B Rao <address@hidden>
Reviewed-by: Stefan Hajnoczi <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>
---
block/gluster.c | 15 ++-------------
1 file changed, 2 insertions(+), 13 deletions(-)
diff --git a/block/gluster.c b/block/gluster.c
index 46f36f8..dbb03f4 100644
--- a/block/gluster.c
+++ b/block/gluster.c
@@ -427,20 +427,9 @@ static void gluster_finish_aiocb(struct glfs_fd *fd,
ssize_t ret, void *arg)
/*
* Gluster AIO callback thread failed to notify the waiting
* QEMU thread about IO completion.
- *
- * Complete this IO request and make the disk inaccessible for
- * subsequent reads and writes.
*/
- error_report("Gluster failed to notify QEMU about IO completion");
-
- qemu_mutex_lock_iothread(); /* We are in gluster thread context */
- acb->common.cb(acb->common.opaque, -EIO);
- qemu_aio_release(acb);
- close(s->fds[GLUSTER_FD_READ]);
- close(s->fds[GLUSTER_FD_WRITE]);
- qemu_aio_set_fd_handler(s->fds[GLUSTER_FD_READ], NULL, NULL, NULL);
- bs->drv = NULL; /* Make the disk inaccessible */
- qemu_mutex_unlock_iothread();
+ error_report("Gluster AIO completion failed: %s", strerror(errno));
+ abort();
}
}
--
1.8.1.4
- [Qemu-devel] [PULL 07/26] add skeleton for BSD licensed "raw" BlockDriver, (continued)
- [Qemu-devel] [PULL 07/26] add skeleton for BSD licensed "raw" BlockDriver, Kevin Wolf, 2013/08/30
- [Qemu-devel] [PULL 08/26] raw_bsd: emit debug events in bdrv_co_readv() and bdrv_co_writev(), Kevin Wolf, 2013/08/30
- [Qemu-devel] [PULL 09/26] raw_bsd: add raw_create(), Kevin Wolf, 2013/08/30
- [Qemu-devel] [PULL 10/26] raw_bsd: introduce "special members", Kevin Wolf, 2013/08/30
- [Qemu-devel] [PULL 11/26] raw_bsd: add raw_create_options, Kevin Wolf, 2013/08/30
- [Qemu-devel] [PULL 12/26] raw_bsd: register bdrv_raw, Kevin Wolf, 2013/08/30
- [Qemu-devel] [PULL 13/26] switch raw block driver from "raw.o" to "raw_bsd.o", Kevin Wolf, 2013/08/30
- [Qemu-devel] [PULL 14/26] block: Remove old raw driver, Kevin Wolf, 2013/08/30
- [Qemu-devel] [PULL 16/26] option: Add assigned flag to QEMUOptionParameter, Kevin Wolf, 2013/08/30
- [Qemu-devel] [PULL 18/26] qemu-iotests: Snapshotting zero clusters, Kevin Wolf, 2013/08/30
- [Qemu-devel] [PULL 15/26] gluster: Abort on AIO completion failure,
Kevin Wolf <=
- [Qemu-devel] [PULL 17/26] qcow2-refcount: Snapshot update for zero clusters, Kevin Wolf, 2013/08/30
- [Qemu-devel] [PULL 20/26] qcow2: Metadata overlap checks, Kevin Wolf, 2013/08/30
- [Qemu-devel] [PULL 19/26] qcow2: Add corrupt bit, Kevin Wolf, 2013/08/30
- [Qemu-devel] [PULL 22/26] qcow2-refcount: Move OFLAG_COPIED checks, Kevin Wolf, 2013/08/30
- [Qemu-devel] [PULL 21/26] qcow2: Employ metadata overlap checks, Kevin Wolf, 2013/08/30
- [Qemu-devel] [PULL 23/26] qcow2-refcount: Repair OFLAG_COPIED errors, Kevin Wolf, 2013/08/30
- [Qemu-devel] [PULL 24/26] qcow2-refcount: Repair shared refcount blocks, Kevin Wolf, 2013/08/30
- [Qemu-devel] [PULL 25/26] qcow2_check: Mark image consistent, Kevin Wolf, 2013/08/30
- [Qemu-devel] [PULL 26/26] qemu-iotests: Overlapping cluster allocations, Kevin Wolf, 2013/08/30
- Re: [Qemu-devel] [PULL 00/26] Block patches, Anthony Liguori, 2013/08/30