Am 05.11.2015 um 06:42 hat Fam Zheng geschrieben:
> On Wed, 11/04 19:35, Kevin Wolf wrote:
> > Am 08.06.2015 um 07:56 hat Fam Zheng geschrieben:
> > > If guest discards a source cluster, mirroring with bdrv_aio_readv is
> > > overkill.
> > > Some protocols do zero upon discard, where it's best to
On 05/11/2015 06:00, Fam Zheng wrote:
> Previously we return -EIO blindly when anything goes wrong. Add a helper
> function to parse sense fields and try to make the return code more
> meaningful.
>
> This also fixes the default werror configuration (enospc) when we're
> using qcow2 on an iscsi
Am 03.11.2015 um 11:32 hat Alberto Garcia geschrieben:
> We are currently allowing snapshots in cases like this one:
>
>{ 'execute': 'blockdev-add', 'arguments':
> { 'options': { 'driver': 'qcow2',
> 'node-name': 'new0',
> 'file': {
On Tue, Nov 03, 2015 at 12:27:19PM -0500, John Snow wrote:
>
>
> On 11/03/2015 10:17 AM, Stefan Hajnoczi wrote:
> > On Fri, Oct 23, 2015 at 07:56:50PM -0400, John Snow wrote:
> >> @@ -1732,6 +1757,10 @@ static void
> >> block_dirty_bitmap_add_prepare(BlkActionState *common,
> >>
On 05/11/2015 18:37, Max Reitz wrote:
> $ x86_64-softmmu/qemu-system-x86_64 -qmp stdio \ -drive
> if=none,file=test.qcow2,id=drive0,node-name=node0 {"QMP":
> {"version": {"qemu": {"micro": 50, "minor": 4, "major": 2},
> "package": ""}, "capabilities": []}}
> {'execute':'qmp_capabilities'}
On Thu, Oct 29, 2015 at 10:14:23AM +0800, Fam Zheng wrote:
> BlockAIOCB *bdrv_aio_ioctl(BlockDriverState *bs,
> unsigned long int req, void *buf,
> BlockCompletionFunc *cb, void *opaque)
> {
> -BlockDriver *drv = bs->drv;
> +BlockAIOCBCoroutine *acb =
On 05.11.2015 18:15, Paolo Bonzini wrote:
>
>
> On 04/11/2015 19:57, Max Reitz wrote:
>> BdrvAioNotifier *ban, *ban_next;
>>
>> -if (bs->job) {
>> -block_job_cancel_sync(bs->job);
>> -}
>> +assert(!bs->job);
>>
>
> Who does this when ejecting a BDS from a BB?
On 04/11/2015 19:57, Max Reitz wrote:
> BdrvAioNotifier *ban, *ban_next;
>
> -if (bs->job) {
> -block_job_cancel_sync(bs->job);
> -}
> +assert(!bs->job);
>
Who does this when ejecting a BDS from a BB?
Paolo
On Thu, Oct 29, 2015 at 10:14:25AM +0800, Fam Zheng wrote:
> void bdrv_drain(BlockDriverState *bs)
> {
> +BdrvChild *child;
> bool busy = true;
>
> +if (bs->drv && bs->drv->bdrv_drain) {
> +bs->drv->bdrv_drain(bs);
> +}
> +QLIST_FOREACH(child, >children, next) {
>
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256
On 05/11/2015 18:44, Eric Blake wrote:
>>> If you test it with all jobs, then it's okay. It's a
>>> regression, but not introduced by your patch and apparently
>>> nobody noticed.
>>>
>>> Even if nobody noticed, I wonder if this "Node 'foo' is
From: Max Reitz
Signed-off-by: Max Reitz
Reviewed-by: Kevin Wolf
Signed-off-by: Kevin Wolf
---
blockdev.c | 23 +++
qapi/block-core.json | 16
qmp-commands.hx | 35
On 11/05/2015 05:47 AM, Stefan Hajnoczi wrote:
> On Tue, Nov 03, 2015 at 12:27:19PM -0500, John Snow wrote:
>>
>>
>> On 11/03/2015 10:17 AM, Stefan Hajnoczi wrote:
>>> On Fri, Oct 23, 2015 at 07:56:50PM -0400, John Snow wrote:
@@ -1732,6 +1757,10 @@ static void
From: Alberto Garcia
This function returns the reference count of a given BlockBackend.
For convenience, it returns 0 if the BlockBackend pointer is NULL.
Signed-off-by: Alberto Garcia
Reviewed-by: Max Reitz
Message-id:
From: Alberto Garcia
We will introduce the 'blockdev-snapshot' command that will require
its own struct for the parameters, so we need to rename this one in
order to avoid name clashes.
Signed-off-by: Alberto Garcia
Reviewed-by: Eric Blake
From: Max Reitz
blk_dev_change_media_cb() is called for all potential tray movements;
however, it is possible to request closing the tray but nothing actually
happening (on a floppy disk drive without a medium).
Thus, the actual tray status should be inquired before sending a
From: Alberto Garcia
One of the limitations of the 'blockdev-snapshot-sync' command is that
it does not allow passing BlockdevOptions to the newly created
snapshots, so they are always opened using the default values.
Extending the command to allow passing options is not a
From: Alberto Garcia
This patch removes the inner quotation marks in all cases like this:
cmd=" ... "${variable}" ... "
Signed-off-by: Alberto Garcia
Reviewed-by: Eric Blake
Signed-off-by: Kevin Wolf
---
From: Alberto Garcia
Signed-off-by: Alberto Garcia
Reviewed-by: Max Reitz
Reviewed-by: Jeff Cody
Signed-off-by: Kevin Wolf
---
tests/qemu-iotests/085 | 102
From: Alberto Garcia
Passing an empty string allows opening an image but not its backing
file. This was already described in the API documentation, only the
implementation was missing.
This is useful for creating snapshots using images opened with
blockdev-add, since they are
From: John Snow
The mirror job doesn't update its total length until
it has already started running, so we should translate
a zero-length job-len as meaning 0%.
Otherwise, we may get divide-by-zero faults.
Signed-off-by: John Snow
Reviewed-by: Jeff Cody
From: Alberto Garcia
throttle_group_unregister_bs() removes a BlockDriverState from its
throttling group and destroys the timers. This means that there must
be no pending throttled requests at that point (because it would be
impossible to complete them), so the caller has to
From: Max Reitz
Implement 'change' on block devices by calling blockdev-open-tray,
blockdev-remove-medium, blockdev-insert-medium (a variation of that
which does not need a node-name) and blockdev-close-tray.
Signed-off-by: Max Reitz
Signed-off-by: Kevin
From: Max Reitz
In order to open a BDS which inherits a BB's root state,
blk_get_open_flags_from_root_state() is used to inquire the flags to be
passed to bdrv_open(), and blk_apply_root_state() is used to apply the
remaining state after the BDS has been opened.
From: Max Reitz
Add an option to qmp_blockdev_change_medium() which allows changing the
read-only status of the block device whose medium is changed.
Some drives do not have a inherently fixed read-only status; for
instance, floppy disks can be set read-only or writable
From: Max Reitz
Expose the new read-only-mode option of 'blockdev-change-medium' for the
'change' HMP command.
Signed-off-by: Max Reitz
Reviewed-by: Kevin Wolf
Signed-off-by: Kevin Wolf
---
hmp-commands.hx | 20
From: Jeff Cody
Commit 934659c switched the iotests to run qemu-io from a bash subshell,
in order to catch segfaults. This method is incompatible with the
current valgrind_qemu_io() bash function.
Move the valgrind usage into the exec subshell in _qemu_io_wrapper(),
while
From: Alberto Garcia
This addresses scenarios like this one:
{ 'execute': 'blockdev-add', 'arguments':
{ 'options': { 'driver': 'qcow2',
'node-name': 'new0',
'file': { 'driver': 'file',
'filename':
From: Alberto Garcia
This test checks that it is not possible to create a snapshot if the
requested overlay node is a BDS which does not support backing images.
Signed-off-by: Alberto Garcia
Reviewed-by: Eric Blake
Signed-off-by: Kevin
From: Alberto Garcia
There's nothing preventing the target image from being used by other
operations during the 'drive-mirror' job, so we should block them all
until the job is done.
Signed-off-by: Alberto Garcia
Reviewed-by: Max Reitz
John Snow writes:
> On 11/05/2015 05:47 AM, Stefan Hajnoczi wrote:
>> On Tue, Nov 03, 2015 at 12:27:19PM -0500, John Snow wrote:
>>>
>>>
>>> On 11/03/2015 10:17 AM, Stefan Hajnoczi wrote:
On Fri, Oct 23, 2015 at 07:56:50PM -0400, John Snow wrote:
> @@ -1732,6 +1757,10
From: Max Reitz
Signed-off-by: Max Reitz
Signed-off-by: Kevin Wolf
---
tests/qemu-iotests/118 | 720 +
tests/qemu-iotests/118.out | 5 +
tests/qemu-iotests/group | 1 +
3 files
From: Alberto Garcia
The 'block-commit' command needs the overlay image of 'top' to
be opened in read-write mode in order to update the backing file
string. If 'top' is not the active layer or its backing file then its
overlay needs to be reopened during the block job.
This is
From: Max Reitz
Implement 'eject' by calling blockdev-open-tray and
blockdev-remove-medium.
Signed-off-by: Max Reitz
Signed-off-by: Kevin Wolf
---
blockdev.c | 11 +--
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git
On 11/05/2015 02:35 PM, Markus Armbruster wrote:
> John Snow writes:
>
>> On 11/05/2015 05:47 AM, Stefan Hajnoczi wrote:
>>> On Tue, Nov 03, 2015 at 12:27:19PM -0500, John Snow wrote:
On 11/03/2015 10:17 AM, Stefan Hajnoczi wrote:
> On Fri, Oct 23, 2015 at
From: Alberto Garcia
'block-commit' needs write access to two different nodes of the chain:
- 'base', because that's where the data is written to.
- the overlay of 'top', because it needs to update the backing file
string to point to 'base' after the operation.
Both images
From: Max Reitz
Signed-off-by: Max Reitz
Signed-off-by: Kevin Wolf
---
blockdev.c | 36
qapi/block-core.json | 32
qmp-commands.hx | 48
From: Max Reitz
Signed-off-by: Max Reitz
Signed-off-by: Kevin Wolf
---
blockdev.c | 51 +++
qapi/block-core.json | 16
qmp-commands.hx | 45
From: Max Reitz
And a helper function for that, which directly takes a pointer to the
BDS to be inserted instead of its node-name (which will be used for
implementing 'change' using blockdev-insert-medium).
Signed-off-by: Max Reitz
Signed-off-by: Kevin
When searching for contiguous zero clusters, we only need to check the
cluster type. Before this patch, an increasing offset (L2E_OFFSET_MASK)
was expected, so that the function never returned more than a single
zero cluster in practice. This patch fixes it to actually return as many
contiguous
From: Alberto Garcia
There are two ways to check for I/O limits in a BlockDriverState:
- bs->throttle_state: if this pointer is not NULL, it means that this
BDS is member of a throttling group, its ThrottleTimers structure
has been initialized and its I/O limits are ready
From: John Snow
If we create a buffer directly on the stack by using 12 bytes, there's
no guarantee the 64bit value we want to swap will be aligned, which
could cause errors with undefined behavior.
Spotted with clang -fsanitize=undefined and observed in iotests 15, 26,
44,
From: Max Reitz
Introduce a new QMP command 'blockdev-change-medium' which is intended
to replace the 'change' command for block devices. The existing function
qmp_change_blockdev() is accordingly renamed to
qmp_blockdev_change_medium().
Signed-off-by: Max Reitz
From: Max Reitz
Use separate code paths for the two overloaded functions of the 'change'
HMP command, and invoke the 'blockdev-change-medium' QMP command if used
on a block device (by calling qmp_blockdev_change_medium()).
Signed-off-by: Max Reitz
On 5 November 2015 at 18:17, Kevin Wolf wrote:
> The following changes since commit 8835b9df3bddf332c883c861d6a1defc12c4ebe9:
>
> Merge remote-tracking branch 'remotes/mdroth/tags/qga-pull-2015-11-04-tag'
> into staging (2015-11-05 10:52:35 +)
>
> are available in the git
From: Alberto Garcia
Signed-off-by: Alberto Garcia
Signed-off-by: Kevin Wolf
---
block.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/block.c b/block.c
index e9f40dc..eb8158a 100644
--- a/block.c
+++ b/block.c
From: Max Reitz
When inserting a BDS tree into a BB, we will need to add the root BDS to
this list. Since we will want to do that in the blockdev-insert-medium
implementation in blockdev.c, we will need access to it there.
This patch is not exactly elegant, but bdrv_states
From: Max Reitz
This function removes the BlockDriverState associated with the given
BlockBackend from that BB and sets the BDS pointer in the BB to NULL.
Signed-off-by: Max Reitz
Signed-off-by: Kevin Wolf
---
block/block-backend.c
From: Alberto Garcia
Signed-off-by: Alberto Garcia
Message-id:
57c3b0d4d0c73ddadd19e5bded9492c359cc4568.1446475331.git.be...@igalia.com
Reviewed-by: Max Reitz
Signed-off-by: Max Reitz
---
tests/qemu-iotests/139 |
From: Jeff Cody
Commit 934659c switched the iotests to run qemu and qemu-nbd from a bash
subshell, in order to catch segfaults. Unfortunately, this means the
process PID cannot be captured via '$!'. We stopped killing qemu and
qemu-nbd processes, leaving a lot of orphaned,
Use a transaction to request an incremental backup across two drives.
Coerce one of the jobs to fail, and then re-run the transaction.
Verify that no bitmap data was lost due to the partial transaction
failure.
To support the 'err-cancel' QMP argument name it's necessary for
transaction_action()
Add both transactional properties to the QMP transactional interface,
and add the BlockJobTxn that we create as a result of the err-cancel
property to the BlkActionState structure.
[split up from a patch originally by Stefan and Fam. --js]
Signed-off-by: Stefan Hajnoczi
From: Fam Zheng
Sometimes block jobs must execute as a transaction group. Finishing
jobs wait until all other jobs are ready to complete successfully.
Failure or cancellation of one job cancels the other jobs in the group.
Signed-off-by: Stefan Hajnoczi
From: Stefan Hajnoczi
The BlockJobTxn unit test verifies that both single jobs and pairs of
jobs behave as a transaction group. Either all jobs complete
successfully or the group is cancelled.
Signed-off-by: Stefan Hajnoczi
Reviewed-by: Max Reitz
Allow a BlockJobTxn to be passed into backup_run, which
will allow the job to join a transactional group if present.
Propagate this new parameter outward into new QMP helper
functions in blockdev.c to allow transaction commands to
pass forward their BlockJobTxn object in a forthcoming patch.
Test simple usage cases for using transactions to create
and synchronize incremental backups.
Signed-off-by: John Snow
Reviewed-by: Max Reitz
Reviewed-by: Stefan Hajnoczi
Signed-off-by: Stefan Hajnoczi
Reviewed-by:
These structures are misnomers, somewhat.
(1) BlockTransactionState is not state for a transaction,
but is rather state for a single transaction action.
Rename it "BlkActionState" to be more accurate.
(2) The BdrvActionOps describes operations for the BlkActionState,
above. This name
From: Fam Zheng
Reviewed-by: Max Reitz
Reviewed-by: John Snow
Signed-off-by: Fam Zheng
Signed-off-by: John Snow
---
include/block/blockjob.h | 20
1 file changed, 20 insertions(+)
Welcome to the Incremental Backup Transactions Newsletter!
What's new?
I replaced the per-action "transactional-cancel" parameter with
a per-transaction paremeter named "completion-mode" which is implemented
as an enum in case we want to add new behaviors in the future, such
as a "jobs only"
From: Fam Zheng
This will be reused by the coming new transactional completion code.
Signed-off-by: Fam Zheng
Reviewed-by: John Snow
Reviewed-by: Max Reitz
Signed-off-by: John Snow
---
block/backup.c |
This adds two qmp commands to transactions.
block-dirty-bitmap-add allows you to create a bitmap simultaneously
alongside a new full backup to accomplish a clean synchronization
point.
block-dirty-bitmap-clear allows you to reset a bitmap back to as-if
it were new, which can also be used
From: Fam Zheng
They are set when block_job_completed is called.
Signed-off-by: Fam Zheng
Reviewed-by: John Snow
Reviewed-by: Max Reitz
Signed-off-by: John Snow
---
blockjob.c | 3 +++
cvtnum() returns int64_t: we should not be storing this
result inside of an int.
In a few cases, we need an extra sprinkling of error handling
where we expect to pass this number on towards a function that
expects something smaller than int64_t.
Reported-by: Max Reitz
cvtnum returns an int64_t, not an int, so correct the lvalue types
wherever it is used. While we're at it, make the error messages more
meaningful and hopefully less confusing.
v4:
- Now missing ALL sweaters
v3:
- pulled a lot of loose yarn, now missing my sweater
(Updated patch 1 even
Reported-by: Max Reitz
Signed-off-by: John Snow
Reviewed-by: Eric Blake
Reviewed-by: Kevin Wolf
---
qemu-io-cmds.c | 53 ++---
1 file changed, 34 insertions(+), 19
Make sure there's not trailing garbage, e.g.
"64k-whatever-i-want-here"
Reported-by: Max Reitz
Signed-off-by: John Snow
Reviewed-by: Eric Blake
Reviewed-by: Kevin Wolf
---
qemu-io-cmds.c | 9 -
1 file changed,
From: Fam Zheng
Add reference count to block job, meanwhile move the ownership of the
reference to job->bs from the caller (which is released in two
completion callbacks) to the block job itself. It is necessary for
block_job_complete_sync to work, because block job shouldn't
recent libnfs versions support logging debug messages. Add
support for it in qemu through an URL parameter.
Example:
qemu -cdrom nfs://127.0.0.1/iso/my.iso?debug=2
---
v3->v4: revert to the initial version, but limit max debug level
v2->v3: use a per-drive option instead of a global one.
Switch over to the new .commit/.abort handlers for
cleaning up incremental bitmaps.
[split up from a patch originally by Stefan and Fam. --js]
Signed-off-by: Stefan Hajnoczi
Signed-off-by: Fam Zheng
Signed-off-by: John Snow
From: Fam Zheng
With job->completed and job->ret to replace BlockFinishData.
Signed-off-by: Fam Zheng
Signed-off-by: John Snow
---
blockjob.c | 28 +++-
1 file changed, 7 insertions(+), 21 deletions(-)
diff --git
Am 05.11.2015 um 06:00 schrieb Fam Zheng:
> Previously we return -EIO blindly when anything goes wrong. Add a helper
> function to parse sense fields and try to make the return code more
> meaningful.
>
> This also fixes the default werror configuration (enospc) when we're
> using qcow2 on an
On 11/05/2015 09:49 PM, Alberto Garcia wrote:
> On Fri 16 Oct 2015 10:57:45 AM CEST, Wen Congyang
> wrote:
>
>> The new QMP command name is x-blockdev-change. It justs for
>> adding/removing quorum's child now, and don't support all kinds of
>> children, all kinds of
From: Gonglei
Signed-off-by: Gonglei
---
hw/block/virtio-blk.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/hw/block/virtio-blk.c b/hw/block/virtio-blk.c
index 093e475..752586d 100644
--- a/hw/block/virtio-blk.c
+++
On Fri 16 Oct 2015 10:57:45 AM CEST, Wen Congyang wrote:
> The new QMP command name is x-blockdev-change. It justs for
> adding/removing quorum's child now, and don't support all kinds of
> children, all kinds of operations, nor all block drivers. So it is
> experimental
73 matches
Mail list logo