[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-block] [PATCH 08/20] nfs: move nfs_set_events out of the while loo
From: |
Paolo Bonzini |
Subject: |
[Qemu-block] [PATCH 08/20] nfs: move nfs_set_events out of the while loops |
Date: |
Mon, 17 Oct 2016 15:54:18 +0200 |
nfs_set_events only needs to be called once before entering the
while loop; afterwards, nfs_process_read and nfs_process_write
take care of it.
Reviewed-by: Stefan Hajnoczi <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
---
block/nfs.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/block/nfs.c b/block/nfs.c
index c3db2ec..c8df8d8 100644
--- a/block/nfs.c
+++ b/block/nfs.c
@@ -149,8 +149,8 @@ static int coroutine_fn nfs_co_readv(BlockDriverState *bs,
return -ENOMEM;
}
+ nfs_set_events(client);
while (!task.complete) {
- nfs_set_events(client);
qemu_coroutine_yield();
}
@@ -191,8 +191,8 @@ static int coroutine_fn nfs_co_writev(BlockDriverState *bs,
return -ENOMEM;
}
+ nfs_set_events(client);
while (!task.complete) {
- nfs_set_events(client);
qemu_coroutine_yield();
}
@@ -217,8 +217,8 @@ static int coroutine_fn nfs_co_flush(BlockDriverState *bs)
return -ENOMEM;
}
+ nfs_set_events(client);
while (!task.complete) {
- nfs_set_events(client);
qemu_coroutine_yield();
}
@@ -513,8 +513,8 @@ static int64_t nfs_get_allocated_file_size(BlockDriverState
*bs)
return -ENOMEM;
}
+ nfs_set_events(client);
while (!task.complete) {
- nfs_set_events(client);
aio_poll(client->aio_context, true);
}
--
2.7.4
- [Qemu-block] [PATCH v2 00/20] dataplane: remove RFifoLock, Paolo Bonzini, 2016/10/17
- [Qemu-block] [PATCH 01/20] replication: interrupt failover if the main device is closed, Paolo Bonzini, 2016/10/17
- [Qemu-block] [PATCH 03/20] mirror: use bdrv_drained_begin/bdrv_drained_end, Paolo Bonzini, 2016/10/17
- [Qemu-block] [PATCH 02/20] blockjob: introduce .drain callback for jobs, Paolo Bonzini, 2016/10/17
- [Qemu-block] [PATCH 05/20] block: change drain to look only at one child at a time, Paolo Bonzini, 2016/10/17
- [Qemu-block] [PATCH 04/20] block: add BDS field to count in-flight requests, Paolo Bonzini, 2016/10/17
- [Qemu-block] [PATCH 06/20] qed: Implement .bdrv_drain, Paolo Bonzini, 2016/10/17
- [Qemu-block] [PATCH 07/20] block: introduce BDRV_POLL_WHILE, Paolo Bonzini, 2016/10/17
- [Qemu-block] [PATCH 09/20] nfs: use BDRV_POLL_WHILE, Paolo Bonzini, 2016/10/17
- [Qemu-block] [PATCH 08/20] nfs: move nfs_set_events out of the while loops,
Paolo Bonzini <=
- [Qemu-block] [PATCH 11/20] aio: introduce qemu_get_current_aio_context, Paolo Bonzini, 2016/10/17
- [Qemu-block] [PATCH 10/20] sheepdog: use BDRV_POLL_WHILE, Paolo Bonzini, 2016/10/17
- [Qemu-block] [PATCH 12/20] iothread: detach all block devices before stopping them, Paolo Bonzini, 2016/10/17
- [Qemu-block] [PATCH 13/20] replication: pass BlockDriverState to reopen_backing_file, Paolo Bonzini, 2016/10/17
- [Qemu-block] [PATCH 14/20] block: prepare bdrv_reopen_multiple to release AioContext, Paolo Bonzini, 2016/10/17
- [Qemu-block] [PATCH 15/20] qemu-io: acquire AioContext, Paolo Bonzini, 2016/10/17
- [Qemu-block] [PATCH 16/20] qemu-img: call aio_context_acquire/release around block job, Paolo Bonzini, 2016/10/17
- [Qemu-block] [PATCH 17/20] block: only call aio_poll on the current thread's AioContext, Paolo Bonzini, 2016/10/17