Alberto Garcia writes:
> An empty GSList is represented by a NULL pointer, therefore it's a
> perfectly valid argument for g_slist_find() and there's no need to
> make any additional check.
>
> Signed-off-by: Alberto Garcia
> ---
> block/io.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion
Markus Armbruster writes:
> Just spotted this in my git-pull...
>
> Alexander Yarygin writes:
>
>> Each call of the virtio_blk_reset() function calls blk_drain_all(),
>> which works for all existing BlockDriverStates, while draining only
>> one is needed.
>>
on one disk at time.
Since bdrv_drain_all() is still called in other places, patch 3 optimizes
it for cases, where there are more disks than iothreads.
Thanks.
Alexander Yarygin (2):
block-backend: Introduce blk_drain()
virtio-blk: Use blk_drain() to drain IO requests
block/block-backend.c
restores vblk->complete_request.
Cc: "Michael S. Tsirkin"
Cc: Christian Borntraeger
Cc: Cornelia Huck
Cc: Kevin Wolf
Cc: Paolo Bonzini
Cc: Stefan Hajnoczi
Signed-off-by: Alexander Yarygin
---
hw/block/virtio-blk.c | 15 ++-
1 file changed, 10 insertions(+), 5 delet
This patch introduces the blk_drain() function which allows to replace
blk_drain_all() when only one BlockDriverState needs to be drained.
Cc: Christian Borntraeger
Cc: Cornelia Huck
Cc: Kevin Wolf
Cc: Paolo Bonzini
Cc: Stefan Hajnoczi
Signed-off-by: Alexander Yarygin
Reviewed-by: Paolo
Stefan Hajnoczi writes:
> On Wed, Jun 10, 2015 at 02:38:17PM +0300, Alexander Yarygin wrote:
>> After the commit 9b536adc ("block: acquire AioContext in
>> bdrv_drain_all()") the aio_poll() function got called for every
>> BlockDriverState, in assumption tha
Signed-off-by: Alexander Yarygin
---
block/io.c | 42 ++
1 file changed, 26 insertions(+), 16 deletions(-)
diff --git a/block/io.c b/block/io.c
index e394d92..7502186 100644
--- a/block/io.c
+++ b/block/io.c
@@ -271,17 +271,6 @@ static bool bdrv_reques
This patch introduces the blk_drain() function which allows to replace
blk_drain_all() when only one BlockDriverState needs to be drained.
Cc: Christian Borntraeger
Cc: Cornelia Huck
Cc: Kevin Wolf
Cc: Paolo Bonzini
Cc: Stefan Hajnoczi
Signed-off-by: Alexander Yarygin
Reviewed-by: Paolo
Bonzini
Cc: Stefan Hajnoczi
Signed-off-by: Alexander Yarygin
---
hw/block/virtio-blk.c | 11 ++-
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/hw/block/virtio-blk.c b/hw/block/virtio-blk.c
index e6afe97..2009092 100644
--- a/hw/block/virtio-blk.c
+++ b/hw/block/virtio
me.
Since bdrv_drain_all() is still called in other places, patch 3 optimizes
it for cases, where there are more disks than iothreads.
Thanks.
Alexander Yarygin (3):
block-backend: Introduce blk_drain()
virtio-blk: Use blk_drain() to drain IO requests
block: Let bdrv_drain_all() to call aio_poll(
Signed-off-by: Alexander Yarygin
---
block/io.c | 42 ++
1 file changed, 26 insertions(+), 16 deletions(-)
diff --git a/block/io.c b/block/io.c
index e394d92..7502186 100644
--- a/block/io.c
+++ b/block/io.c
@@ -271,17 +271,6 @@ static bool bdrv_reques
Borntraeger
Cc: Cornelia Huck
Cc: Kevin Wolf
Cc: Paolo Bonzini
Cc: Stefan Hajnoczi
Signed-off-by: Alexander Yarygin
---
block/block-backend.c | 5 +
hw/block/virtio-blk.c | 2 +-
include/sysemu/block-backend.h | 1 +
3 files changed, 7 insertions(+), 1 deletion(-)
diff --git a
loop by using bdrv_drain() instead of bdrv_drain_all().
bdrv_drain() works on one disk at time.
Since bdrv_drain_all() is still called in other places, patch 2/2 optimizes
it for cases, where there are more disks than iothreads.
Thanks.
Alexander Yarygin (2):
block-backend: Introduce blk_drain
elia Huck
Cc: Kevin Wolf
Cc: Paolo Bonzini
Cc: Stefan Hajnoczi
Signed-off-by: Alexander Yarygin
---
block.c | 40 +---
1 file changed, 25 insertions(+), 15 deletions(-)
diff --git a/block.c b/block.c
index f2f8ae7..bdfb1ce 100644
--- a/block.c
+++ b/block.c
Paolo Bonzini writes:
> On 13/05/2015 18:34, Alexander Yarygin wrote:
>> Ah, right. We need second loop, something like this:
>>
>> @@ -2030,20 +2033,33 @@ void bdrv_drain(BlockDriverState *bs)
>> void bdrv_drain_all(void)
>> {
>> /* Always run fi
Fam Zheng writes:
> On Wed, 05/13 19:34, Alexander Yarygin wrote:
>> Paolo Bonzini writes:
>>
>> > On 13/05/2015 17:18, Alexander Yarygin wrote:
>> >> After the commit 9b536adc ("block: acquire AioContext in
>> >> bdrv_drain
Paolo Bonzini writes:
> On 13/05/2015 17:18, Alexander Yarygin wrote:
>> After the commit 9b536adc ("block: acquire AioContext in
>> bdrv_drain_all()") the aio_poll() function got called for every
>> BlockDriverState, in assumption that every device may
Alberto Garcia writes:
> On Wed 13 May 2015 05:18:31 PM CEST, Alexander Yarygin
> wrote:
>
>> +if (!aio_ctxs || !g_list_find(aio_ctxs, aio_context)) {
>> +busy |= aio_poll(aio_context, busy);
>> +aio_ctxs = g_list_a
elia Huck
Cc: Kevin Wolf
Cc: Paolo Bonzini
Cc: Stefan Hajnoczi
Signed-off-by: Alexander Yarygin
---
block.c | 13 +++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/block.c b/block.c
index f2f8ae7..7414815 100644
--- a/block.c
+++ b/block.c
@@ -1994,7 +1994,6 @@ static
19 matches
Mail list logo