summaryrefslogtreecommitdiffstats
path: root/include/block
diff options
context:
space:
mode:
authorStefan Hajnoczi2020-03-05 18:08:03 +0100
committerStefan Hajnoczi2020-03-09 17:41:31 +0100
commitb321051cf48ccc2d3d832af111d688f2282f089b (patch)
tree32317a09036588fd33643a5e844da001b4bf5ddd /include/block
parentaio-posix: extract ppoll(2) and epoll(7) fd monitoring (diff)
downloadqemu-b321051cf48ccc2d3d832af111d688f2282f089b.tar.gz
qemu-b321051cf48ccc2d3d832af111d688f2282f089b.tar.xz
qemu-b321051cf48ccc2d3d832af111d688f2282f089b.zip
aio-posix: simplify FDMonOps->update() prototype
The AioHandler *node, bool is_new arguments are more complicated to think about than simply being given AioHandler *old_node, AioHandler *new_node. Furthermore, the new Linux io_uring file descriptor monitoring mechanism added by the new patch requires access to both the old and the new nodes. Make this change now in preparation. Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Link: https://lore.kernel.org/r/20200305170806.1313245-5-stefanha@redhat.com Message-Id: <20200305170806.1313245-5-stefanha@redhat.com>
Diffstat (limited to 'include/block')
-rw-r--r--include/block/aio.h13
1 files changed, 6 insertions, 7 deletions
diff --git a/include/block/aio.h b/include/block/aio.h
index 90e07d7507..bd76b08f1a 100644
--- a/include/block/aio.h
+++ b/include/block/aio.h
@@ -57,17 +57,16 @@ typedef struct {
/*
* update:
* @ctx: the AioContext
- * @node: the handler
- * @is_new: is the file descriptor already being monitored?
+ * @old_node: the existing handler or NULL if this file descriptor is being
+ * monitored for the first time
+ * @new_node: the new handler or NULL if this file descriptor is being
+ * removed
*
- * Add/remove/modify a monitored file descriptor. There are three cases:
- * 1. node->pfd.events == 0 means remove the file descriptor.
- * 2. !is_new means modify an already monitored file descriptor.
- * 3. is_new means add a new file descriptor.
+ * Add/remove/modify a monitored file descriptor.
*
* Called with ctx->list_lock acquired.
*/
- void (*update)(AioContext *ctx, AioHandler *node, bool is_new);
+ void (*update)(AioContext *ctx, AioHandler *old_node, AioHandler *new_node);
/*
* wait: