Re: [Qemu-block] [PATCH v7 3/8] mirror: Do zero write on target if sectors not allocated

2015-11-05 Thread Kevin Wolf
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

Re: [Qemu-block] [PATCH v3] iscsi: Translate scsi sense into error code

2015-11-05 Thread Paolo Bonzini
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

Re: [Qemu-block] [PATCH v3 0/3] Disallow snapshots if the overlay doesn't support backing files

2015-11-05 Thread Kevin Wolf
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': {

Re: [Qemu-block] [Qemu-devel] [PATCH v10 12/14] block: add transactional properties

2015-11-05 Thread Stefan Hajnoczi
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, > >>

Re: [Qemu-block] [PATCH v6 14/15] block: Rewrite bdrv_close_all()

2015-11-05 Thread Paolo Bonzini
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'}

Re: [Qemu-block] [PATCH v2 6/9] block: Emulate bdrv_ioctl with bdrv_aio_ioctl and track both

2015-11-05 Thread Stefan Hajnoczi
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 =

Re: [Qemu-block] [PATCH v6 14/15] block: Rewrite bdrv_close_all()

2015-11-05 Thread Max Reitz
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?

Re: [Qemu-block] [PATCH v6 14/15] block: Rewrite bdrv_close_all()

2015-11-05 Thread Paolo Bonzini
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

Re: [Qemu-block] [PATCH v2 8/9] block: Introduce BlockDriver.bdrv_drain callback

2015-11-05 Thread Stefan Hajnoczi
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) { >

Re: [Qemu-block] [PATCH v6 14/15] block: Rewrite bdrv_close_all()

2015-11-05 Thread Paolo Bonzini
-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

[Qemu-block] [PULL 06/37] blockdev: Add blockdev-close-tray

2015-11-05 Thread Kevin Wolf
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

Re: [Qemu-block] [Qemu-devel] [PATCH v10 12/14] block: add transactional properties

2015-11-05 Thread John Snow
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

[Qemu-block] [PULL 34/37] block: Add blk_get_refcnt()

2015-11-05 Thread Kevin Wolf
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:

[Qemu-block] [PULL 18/37] block: rename BlockdevSnapshot to BlockdevSnapshotSync

2015-11-05 Thread Kevin Wolf
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

[Qemu-block] [PULL 11/37] block: Inquire tray state before tray-moved events

2015-11-05 Thread Kevin Wolf
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

[Qemu-block] [PULL 20/37] block: add a 'blockdev-snapshot' QMP command

2015-11-05 Thread Kevin Wolf
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

[Qemu-block] [PULL 29/37] block: Remove inner quotation marks in iotest 085

2015-11-05 Thread Kevin Wolf
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 ---

[Qemu-block] [PULL 21/37] block: add tests for the 'blockdev-snapshot' command

2015-11-05 Thread 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

[Qemu-block] [PULL 19/37] block: support passing 'backing': '' to 'blockdev-add'

2015-11-05 Thread Kevin Wolf
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

[Qemu-block] [PULL 25/37] qemu-img: add check for zero-length job len

2015-11-05 Thread Kevin Wolf
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

[Qemu-block] [PULL 26/37] throttle: Check for pending requests in throttle_group_unregister_bs()

2015-11-05 Thread Kevin Wolf
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

[Qemu-block] [PULL 10/37] blockdev: Implement change with basic operations

2015-11-05 Thread Kevin Wolf
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

[Qemu-block] [PULL 04/37] block: Add functions for inheriting a BBRS

2015-11-05 Thread Kevin Wolf
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.

[Qemu-block] [PULL 14/37] blockdev: read-only-mode for blockdev-change-medium

2015-11-05 Thread Kevin Wolf
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

[Qemu-block] [PULL 15/37] hmp: Add read-only-mode option to change command

2015-11-05 Thread Kevin Wolf
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

[Qemu-block] [PULL 32/37] qemu-iotests: fix -valgrind option for check

2015-11-05 Thread Kevin Wolf
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

[Qemu-block] [PULL 28/37] block: Disallow snapshots if the overlay doesn't support backing files

2015-11-05 Thread Kevin Wolf
From: Alberto Garcia This addresses scenarios like this one: { 'execute': 'blockdev-add', 'arguments': { 'options': { 'driver': 'qcow2', 'node-name': 'new0', 'file': { 'driver': 'file', 'filename':

[Qemu-block] [PULL 30/37] block: test 'blockdev-snapshot' using a file BDS as the overlay

2015-11-05 Thread Kevin Wolf
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

[Qemu-block] [PULL 33/37] mirror: block all operations on the target image during the job

2015-11-05 Thread Kevin Wolf
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

Re: [Qemu-block] [Qemu-devel] [PATCH v10 12/14] block: add transactional properties

2015-11-05 Thread Markus Armbruster
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

[Qemu-block] [PULL 16/37] iotests: Add test for change-related QMP commands

2015-11-05 Thread Kevin Wolf
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

[Qemu-block] [PULL 23/37] qemu-iotests: Test the reopening of overlay_bs in 'block-commit'

2015-11-05 Thread Kevin Wolf
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

[Qemu-block] [PULL 09/37] blockdev: Implement eject with basic operations

2015-11-05 Thread Kevin Wolf
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

Re: [Qemu-block] [Qemu-devel] [PATCH v10 12/14] block: add transactional properties

2015-11-05 Thread John Snow
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

[Qemu-block] [PULL 22/37] commit: reopen overlay_bs before base

2015-11-05 Thread Kevin Wolf
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

[Qemu-block] [PULL 05/37] blockdev: Add blockdev-open-tray

2015-11-05 Thread Kevin Wolf
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

[Qemu-block] [PULL 07/37] blockdev: Add blockdev-remove-medium

2015-11-05 Thread Kevin Wolf
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

[Qemu-block] [PULL 08/37] blockdev: Add blockdev-insert-medium

2015-11-05 Thread Kevin Wolf
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

[Qemu-block] [PULL 37/37] qcow2: Fix qcow2_get_cluster_offset() for zero clusters

2015-11-05 Thread Kevin Wolf
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

[Qemu-block] [PULL 27/37] throttle: Use bs->throttle_state instead of bs->io_limits_enabled

2015-11-05 Thread Kevin Wolf
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

[Qemu-block] [PULL 24/37] qcow2: avoid misaligned 64bit bswap

2015-11-05 Thread Kevin Wolf
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,

[Qemu-block] [PULL 12/37] qmp: Introduce blockdev-change-medium

2015-11-05 Thread Kevin Wolf
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

[Qemu-block] [PULL 13/37] hmp: Use blockdev-change-medium for change command

2015-11-05 Thread Kevin Wolf
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

Re: [Qemu-block] [Qemu-devel] [PULL 00/37] Block layer patches

2015-11-05 Thread Peter Maydell
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

[Qemu-block] [PULL 01/37] block: Don't call blk_bs() twice in bdrv_lookup_bs()

2015-11-05 Thread Kevin Wolf
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

[Qemu-block] [PULL 03/37] block: Make bdrv_states public

2015-11-05 Thread Kevin Wolf
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

[Qemu-block] [PULL 02/37] block: Add blk_remove_bs()

2015-11-05 Thread Kevin Wolf
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

[Qemu-block] [PULL 36/37] iotests: Add tests for the x-blockdev-del command

2015-11-05 Thread Kevin Wolf
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 |

[Qemu-block] [PULL 31/37] qemu-iotests: fix cleanup of background processes

2015-11-05 Thread Kevin Wolf
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,

[Qemu-block] [PATCH v11 13/14] iotests: 124 - transactional failure test

2015-11-05 Thread John Snow
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()

[Qemu-block] [PATCH v11 12/14] block: add transactional properties

2015-11-05 Thread John Snow
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

[Qemu-block] [PATCH v11 09/14] block: Add block job transactions

2015-11-05 Thread John Snow
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

[Qemu-block] [PATCH v11 14/14] tests: add BlockJobTxn unit test

2015-11-05 Thread John Snow
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

[Qemu-block] [PATCH v11 11/14] block: Add BlockJobTxn support to backup_run

2015-11-05 Thread John Snow
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.

[Qemu-block] [PATCH v11 02/14] iotests: add transactional incremental backup test

2015-11-05 Thread John Snow
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:

[Qemu-block] [PATCH v11 03/14] block: rename BlkTransactionState and BdrvActionOps

2015-11-05 Thread John Snow
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

[Qemu-block] [PATCH v11 06/14] blockjob: Add .commit and .abort block job actions

2015-11-05 Thread John Snow
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(+)

[Qemu-block] [PATCH v11 00/14] block: incremental backup transactions using BlockJobTxn

2015-11-05 Thread John Snow
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"

[Qemu-block] [PATCH v11 04/14] backup: Extract dirty bitmap handling as a separate function

2015-11-05 Thread John Snow
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 |

[Qemu-block] [PATCH v11 01/14] qapi: Add transaction support to block-dirty-bitmap operations

2015-11-05 Thread John Snow
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

[Qemu-block] [PATCH v11 07/14] blockjob: Add "completed" and "ret" in BlockJob

2015-11-05 Thread John Snow
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 +++

[Qemu-block] [PATCH v4 1/3] qemu-io: fix cvtnum lval types

2015-11-05 Thread John Snow
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

[Qemu-block] [PATCH v4 0/3] qemu-io: clean up cvtnum usage

2015-11-05 Thread John Snow
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

[Qemu-block] [PATCH v4 3/3] qemu-io: Correct error messages

2015-11-05 Thread John Snow
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

[Qemu-block] [PATCH v4 2/3] qemu-io: Check for trailing chars

2015-11-05 Thread John Snow
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,

[Qemu-block] [PATCH v11 05/14] blockjob: Introduce reference count and fix reference to job->bs

2015-11-05 Thread John Snow
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

[Qemu-block] [PATCH V4] block/nfs: add support for setting debug level

2015-11-05 Thread Peter Lieven
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.

[Qemu-block] [PATCH v11 10/14] block/backup: Rely on commit/abort for cleanup

2015-11-05 Thread John Snow
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

[Qemu-block] [PATCH v11 08/14] blockjob: Simplify block_job_finish_sync

2015-11-05 Thread 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

Re: [Qemu-block] [PATCH v3] iscsi: Translate scsi sense into error code

2015-11-05 Thread Peter Lieven
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

Re: [Qemu-block] [PATCH v6 3/4] qmp: add monitor command to add/remove a child

2015-11-05 Thread Wen Congyang
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

[Qemu-block] [PATCH] virtio-blk: trivial code optimization

2015-11-05 Thread arei.gonglei
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 +++

Re: [Qemu-block] [PATCH v6 3/4] qmp: add monitor command to add/remove a child

2015-11-05 Thread Alberto Garcia
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