Re: [Qemu-block] [Qemu-devel] [PATCH v2] spec/qcow2: bitmaps: zero bitmap table offset

2016-07-01 Thread Vladimir Sementsov-Ogievskiy
On 01.07.2016 11:12, Kevin Wolf wrote: Am 30.06.2016 um 19:23 hat Denis V. Lunev geschrieben: On 06/30/2016 07:40 PM, John Snow wrote: On 06/30/2016 05:12 AM, Denis V. Lunev wrote: On 06/30/2016 10:34 AM, Vladimir Sementsov-Ogievskiy wrote: After loading bitmap from image and setting IN_USE

Re: [Qemu-block] [Qemu-devel] [PATCH v2] spec/qcow2: bitmaps: zero bitmap table offset

2016-07-01 Thread Kevin Wolf
Am 30.06.2016 um 19:23 hat Denis V. Lunev geschrieben: > On 06/30/2016 07:40 PM, John Snow wrote: > > > >On 06/30/2016 05:12 AM, Denis V. Lunev wrote: > >>On 06/30/2016 10:34 AM, Vladimir Sementsov-Ogievskiy wrote: > >>>After loading bitmap from image and setting IN_USE flag in it's header, >

[Qemu-block] [PATCH v3 07/11] backup: Add 'job-id' parameter to 'blockdev-backup' and 'drive-backup'

2016-07-01 Thread Alberto Garcia
This patch adds a new optional 'job-id' parameter to 'blockdev-backup' and 'drive-backup', allowing the user to specify the ID of the block job to be created. The HMP 'drive_backup' command remains unchanged. Signed-off-by: Alberto Garcia Reviewed-by: Max Reitz

[Qemu-block] [PATCH v3 05/11] blockjob: Add 'job_id' parameter to block_job_create()

2016-07-01 Thread Alberto Garcia
When a new job is created, the job ID is taken from the device name of the BDS. This patch adds a new 'job_id' parameter to let the caller provide one instead. This patch also verifies that the ID is always unique and well-formed. This causes problems in a couple of places where no ID is being

[Qemu-block] [PATCH v3 04/11] block: Use block_job_get() in find_block_job()

2016-07-01 Thread Alberto Garcia
find_block_job() looks for a block backend with a specified name, checks whether it has a block job and acquires its AioContext. We want to identify jobs by their ID and not by the block backend they're attached to, so this patch ignores the backends altogether and gets the job directly. Apart

[Qemu-block] [PATCH v3 10/11] qemu-img: Set the ID of the block job in img_commit()

2016-07-01 Thread Alberto Garcia
img_commit() creates a block job without an ID. This is no longer allowed now that we require it to be unique and well-formed. We were solving this by having a fallback in block_job_create(), but now that we extended the API of commit_active_start() we can finally set an explicit ID and revert

[Qemu-block] [PATCH v3 11/11] blockjob: Update description of the 'device' field in the QMP API

2016-07-01 Thread Alberto Garcia
The 'device' field in all BLOCK_JOB_* events and 'block-job-*' command is no longer the device name, but the ID of the job. This patch updates the documentation to clarify that. Signed-off-by: Alberto Garcia --- docs/qmp-events.txt | 12 qapi/block-core.json | 35

[Qemu-block] [PATCH v3 00/11] Allow creating block jobs with a user-defined ID

2016-07-01 Thread Alberto Garcia
Hi all, block jobs are currently identified by the name of the block backend of the BDS where the job was started. The problem with this is that you cannot have block jobs on nodes where there is no such name. This series turns the 'id' field of the BlockJob structure into an actual ID, it

[Qemu-block] [PATCH v3 03/11] blockjob: Add block_job_get()

2016-07-01 Thread Alberto Garcia
Currently the way to look for a specific block job is to iterate the list manually using block_job_next(). Since we want to be able to identify a job primarily by its ID it makes sense to have a function that does just that. Signed-off-by: Alberto Garcia Reviewed-by: Max Reitz

[Qemu-block] [PATCH v3 01/11] stream: Fix prototype of stream_start()

2016-07-01 Thread Alberto Garcia
'stream-start' has a parameter called 'backing-file', which is the string to be written to bs->backing when the job finishes. In the stream_start() implementation it is called 'backing_file_str', but it the prototype in the header file it is called 'base_id'. This patch fixes it so the name is

[Qemu-block] [PATCH v3 08/11] stream: Add 'job-id' parameter to 'block-stream'

2016-07-01 Thread Alberto Garcia
This patch adds a new optional 'job-id' parameter to 'block-stream', allowing the user to specify the ID of the block job to be created. The HMP 'block_stream' command remains unchanged. Signed-off-by: Alberto Garcia Reviewed-by: Max Reitz ---

Re: [Qemu-block] [Qemu-devel] [PATCH v2 02/15] blockjob: Decouple the ID from the device name in the BlockJob struct

2016-07-01 Thread John Snow
On 06/30/2016 09:03 AM, Alberto Garcia wrote: > On Wed 29 Jun 2016 07:20:55 PM CEST, Max Reitz wrote: > I thought adding a new 'ID' field was simpler. The device name is > still a device name (where it makes sense). The default ID is > guaranteed to be valid and guaranteed not to

[Qemu-block] [PATCH v3 02/11] blockjob: Update description of the 'id' field

2016-07-01 Thread Alberto Garcia
The 'id' field of the BlockJob structure will be able to hold any ID, not only a device name. This patch updates the description of that field and the error messages where it is being used. Soon we'll add the ability to set an arbitrary ID when creating a block job. Signed-off-by: Alberto Garcia