The existing drive-backup command accepts a target file path, but that
interface provides little flexibility on the properties of target block device,
compared to what is possible with "blockdev-add", "drive_add" or "-drive".
This is also a building block to allow image fleecing (creating a point
Similar to drive-backup, but this command uses a device id as target
instead of creating/opening an image file.
Also add blocker on target bs, since the target is also a named device
now.
Add check and report error for bs == target which became possible but is
an illegal case with introduction of
This applies cases on drive-backup on blockdev-backup, except cases with
target format and mode.
Also add a case to check source == target.
Signed-off-by: Fam Zheng
---
tests/qemu-iotests/055 | 277 ++---
tests/qemu-iotests/055.out | 4 +-
2 files c
Currently, we call ioapic_service() immediately when we find the irq is still
active during eoi broadcast. But for real hardware, there's some dealy between
the EOI writing and irq delivery (system bus latency?). So we need to emulate
this behavior. Otherwise, for a guest who haven't register a pro
Like BLOCK_OP_TYPE_BACKUP_SOURCE and BLOCK_OP_TYPE_BACKUP_TARGET,
block-commit involves two asymmetric devices.
This change is not user-visible (yet), because commit only works with
device names.
But once we enable backing reference in blockdev-add, or specifying
node-name in block-commit command
v6: Drop bdrv_em_aiocb_info.cancel in patch 5. (Paolo)
v5: Fix IDE callback. (Paolo)
Fix blkdebug. (Paolo)
Drop the DMA fix which is independent of this series. (Paolo)
Incorperate Yuan's patch on quorum_aio_cancel. (Benoît)
Commit message wording fix. (Benoît)
Rename qemu_aio_
Before, bdrv_aio_cancel will either complete the request (like normal)
and call CB with an actual return code, or skip calling the request (for
example when the IO req is not submitted by thread pool yet).
We will change bdrv_aio_cancel to do it differently: always call CB
before return, with eith
This will be useful in synchronous cancel emulation with
bdrv_aio_cancel_async.
Signed-off-by: Fam Zheng
---
block.c | 12 +++-
include/block/aio.h | 2 ++
2 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/block.c b/block.c
index d06dd51..c1ee860 100644
--- a/bl
The cancelled flag is no longer useful. Later the request will complete
as before, and cb will be called.
Signed-off-by: Fam Zheng
---
block/archipelago.c | 17 +
1 file changed, 1 insertion(+), 16 deletions(-)
diff --git a/block/archipelago.c b/block/archipelago.c
index 22a7daa
Also drop the now unused ->done pointer.
Signed-off-by: Fam Zheng
---
block.c | 21 -
1 file changed, 21 deletions(-)
diff --git a/block.c b/block.c
index 371082b..6193883 100644
--- a/block.c
+++ b/block.c
@@ -4757,22 +4757,8 @@ typedef struct BlockDriverAIOCBCoroutine {
Signed-off-by: Fam Zheng
---
block.c | 10 --
1 file changed, 10 deletions(-)
diff --git a/block.c b/block.c
index 6193883..349bb13 100644
--- a/block.c
+++ b/block.c
@@ -4675,18 +4675,8 @@ typedef struct BlockDriverAIOCBSync {
int is_write;
} BlockDriverAIOCBSync;
-static void b
This is the async version of bdrv_aio_cancel, which doesn't block the
caller. It guarantees that the cb is called either before returning or
some time later.
bdrv_aio_cancel can base on bdrv_aio_cancel_async, later we can convert
all .io_cancel implementations to .io_cancel_async, and the aio_poll
Signed-off-by: Fam Zheng
---
block/blkdebug.c | 15 +--
1 file changed, 1 insertion(+), 14 deletions(-)
diff --git a/block/blkdebug.c b/block/blkdebug.c
index 69b330e..08131b3 100644
--- a/block/blkdebug.c
+++ b/block/blkdebug.c
@@ -52,11 +52,8 @@ typedef struct BlkdebugSuspendedReq
The .cancel_async shares the same the first half with .cancel: try to
steal the request if not submitted yet. In this case set the elem to
THREAD_DONE status and ret to -ECANCELED, which means
thread_pool_completion_bh will call the cb with -ECANCELED.
If the request is already submitted, do nothi
Just call io_cancel (2), if it fails, it means the request is not
canceled, so the event loop will eventually call
qemu_laio_process_completion.
In qemu_laio_process_completion, change to call the cb unconditionally.
It is required by bdrv_aio_cancel_async.
Signed-off-by: Fam Zheng
---
block/li
Signed-off-by: Fam Zheng
---
block/curl.c | 6 --
1 file changed, 6 deletions(-)
diff --git a/block/curl.c b/block/curl.c
index 938f9d9..6f5d6ae 100644
--- a/block/curl.c
+++ b/block/curl.c
@@ -613,14 +613,8 @@ out_noclean:
return -EINVAL;
}
-static void curl_aio_cancel(BlockDriverAI
Also the finished pointer is not used any more.
Signed-off-by: Fam Zheng
---
block/blkverify.c | 19 ---
1 file changed, 19 deletions(-)
diff --git a/block/blkverify.c b/block/blkverify.c
index 163064c..460393f 100644
--- a/block/blkverify.c
+++ b/block/blkverify.c
@@ -29,7 +29,
Just forward the request to bdrv_aio_cancel_async.
Signed-off-by: Fam Zheng
---
dma-helpers.c | 20
1 file changed, 4 insertions(+), 16 deletions(-)
diff --git a/dma-helpers.c b/dma-helpers.c
index 499b52b..5a46e5c 100644
--- a/dma-helpers.c
+++ b/dma-helpers.c
@@ -73,7 +73
Also drop the unused field "canceled".
Signed-off-by: Fam Zheng
---
block/iscsi.c | 17 ++---
1 file changed, 2 insertions(+), 15 deletions(-)
diff --git a/block/iscsi.c b/block/iscsi.c
index 3e19202..a0aca5f 100644
--- a/block/iscsi.c
+++ b/block/iscsi.c
@@ -88,7 +88,6 @@ typedef s
From: Liu Yuan
For a fifo read pattern, we only have one running aio (possible other cases that
has less number than num_children in the future), so we need to check if
.acb is NULL against bdrv_aio_cancel() to avoid segfault.
Cc: Eric Blake
Cc: Benoit Canet
Cc: Kevin Wolf
Cc: Stefan Hajnoczi
Also drop the now unused SheepdogAIOCB.finished field. Note that this
aio is internal to sheepdog driver and has NULL cb and opaque, and
should be unused at all.
Signed-off-by: Fam Zheng
---
block/sheepdog.c | 46 +++---
1 file changed, 19 insertions(+), 2
Also drop the now unused ->finished field.
Signed-off-by: Fam Zheng
---
block/qed.c | 21 -
1 file changed, 21 deletions(-)
diff --git a/block/qed.c b/block/qed.c
index ba395af..07cdb47 100644
--- a/block/qed.c
+++ b/block/qed.c
@@ -18,22 +18,8 @@
#include "qapi/qmp/qerror.
Before, we cancel all the child requests with bdrv_aio_cancel, then free
the acb..
Now we just kick off asynchronous cancellation of child requests and
return, we know quorum_aio_cb will be called later, so in the end
quorum_aio_finalize will take care of calling the caller's cb.
Signed-off-by: F
We know that either bh is scheduled or ide_issue_trim_cb will be called
again, so we just set i, j and ret to the right values. In both cases,
ide_trim_bh_cb will be called.
Also forward the cancellation to the iocb->aiocb which we get from
bdrv_aio_discard.
Signed-off-by: Fam Zheng
---
hw/ide/
And also drop the now unused "cancelled" field.
Signed-off-by: Fam Zheng
---
block/rbd.c | 23 +--
1 file changed, 1 insertion(+), 22 deletions(-)
diff --git a/block/rbd.c b/block/rbd.c
index ea969e7..349d465 100644
--- a/block/rbd.c
+++ b/block/rbd.c
@@ -77,7 +77,6 @@ typed
Now that all the implementations are converted to asynchronous version
and we can emulate synchronous cancellation with it. Let's drop the
unused member.
Signed-off-by: Fam Zheng
---
block.c | 24 ++--
include/block/aio.h | 1 -
2 files changed, 10 insertions(+),
Suggested-by: Benoît Canet
Signed-off-by: Fam Zheng
---
block.c | 8
block/archipelago.c | 4 ++--
block/blkdebug.c| 2 +-
block/blkverify.c | 2 +-
block/curl.c| 10 +-
block/iscsi.c | 6 +++---
block/linux-aio.c | 4 ++--
block/qed.c
Signed-off-by: Fam Zheng
---
block/win32-aio.c | 14 --
1 file changed, 14 deletions(-)
diff --git a/block/win32-aio.c b/block/win32-aio.c
index 5030e32..eed86f7 100644
--- a/block/win32-aio.c
+++ b/block/win32-aio.c
@@ -106,22 +106,8 @@ static void win32_aio_completion_cb(EventNotif
On Wed, 09/10 15:32, Benoît Canet wrote:
> The Wednesday 10 Sep 2014 à 11:08:48 (+0800), Fam Zheng wrote :
> > Signed-off-by: Fam Zheng
> > ---
> > qapi/block-core.json | 38 +++---
> > 1 file changed, 19 insertions(+), 19 deletions(-)
> >
> > diff --git a/qapi/bl
On Wed, 09/10 15:27, Benoît Canet wrote:
> The Wednesday 10 Sep 2014 à 11:08:46 (+0800), Fam Zheng wrote :
> > This is an analogue to Linux null_blk. It can be used for testing or
> > benchmarking block device emulation and general block layer
> > functionalities such as coroutines and throttling,
> > 主题: [Qemu-devel] [PATCH v8 00/30] modify boot order of guest, and take
> > effect after rebooting
> >
> > From: Gonglei
> >
> > Sometimes, we want to modify boot order of a guest, but no need to
> shutdown
> > it. We can call dynamic changing bootindex of a guest, which can be assured
> > taki
On 2014-09-11 07:06, Zhang Haoyu wrote:
> Currently, we call ioapic_service() immediately when we find the irq is still
> active during eoi broadcast. But for real hardware, there's some dealy between
> the EOI writing and irq delivery (system bus latency?). So we need to emulate
> this behavior. O
Reviewed-by: Benoît Canet
Signed-off-by: Fam Zheng
---
qapi/block-core.json | 10 +-
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/qapi/block-core.json b/qapi/block-core.json
index bf0cb23..35191b4 100644
--- a/qapi/block-core.json
+++ b/qapi/block-core.json
@@ -1147,11 +
This is an analogue to Linux null_blk. It can be used for testing or
benchmarking block device emulation and general block layer
functionalities such as coroutines and throttling, where disk IO is not
necessary or wanted.
Use null-aio:// for AIO version, and null-co:// for coroutine version.
Sign
v7: Add Benoît's rev-by line in patch 2.
Improved help text in patch 1. (Benoît)
v6: Don't inherit from BlockdevOptionsFile. (Stefan)
Use .bdrv_co_readv instead of .bdrv_read. (Kevin)
Sort items in qapi schema definitions in patch 2 & 3.
Fam Zheng (3):
block: Introduce "null" drive
On (Sun) 07 Sep 2014 [17:46:26], Zhang Haoyu wrote:
> Hi, Paolo, Amit,
> any ideas?
I'll check this, thanks for testing with Linux guests.
Amit
Signed-off-by: Fam Zheng
---
qapi/block-core.json | 38 +++---
1 file changed, 19 insertions(+), 19 deletions(-)
diff --git a/qapi/block-core.json b/qapi/block-core.json
index 35191b4..5adef27 100644
--- a/qapi/block-core.json
+++ b/qapi/block-core.json
@@ -1483,4
Il 11/09/2014 03:57, Michael R. Hines ha scritto:
>>
>
> Why does hotplugging use a different name?
>
> This also affects RDMA live migration - we are explicitly looking up
> "pc.ram" ram blocks and pinning them for memory registration with Linux.
Are we? I cannot see any code that special case
On 09/11/2014 02:22 PM, Paolo Bonzini wrote:
Il 11/09/2014 03:57, Michael R. Hines ha scritto:
Why does hotplugging use a different name?
This also affects RDMA live migration - we are explicitly looking up
"pc.ram" ram blocks and pinning them for memory registration with Linux.
Are we? I can
On 2014/9/11 14:27, Michael R. Hines wrote:
On 09/11/2014 02:22 PM, Paolo Bonzini wrote:
Il 11/09/2014 03:57, Michael R. Hines ha scritto:
Why does hotplugging use a different name?
This also affects RDMA live migration - we are explicitly looking up
"pc.ram" ram blocks and pinning them for me
On Wed, 09/10 10:13, Markus Armbruster wrote:
> Creating an anonymous BDS can't fail. Make that obvious.
>
> Signed-off-by: Markus Armbruster
> ---
> block.c | 26 +++---
> block/iscsi.c | 2 +-
> block/vvfat.c | 2 +-
> blockdev.c
301 - 341 of 341 matches
Mail list logo