[Qemu-block] [RFC PATCH 12/16] iotests: Add qbm format to 041

2016-01-26 Thread Fam Zheng
Though a number of test cases dosn't apply because of cluster size and blkdebug limitation, mirroring qbm can be covered by all other cases. Signed-off-by: Fam Zheng --- tests/qemu-iotests/041 | 18 -- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git

[Qemu-block] [RFC PATCH 07/16] block: Only swap non-persistent dirty bitmaps

2016-01-26 Thread Fam Zheng
Persistent dirty bitmaps are special because they're tightly associated with, or even belonging to the driver, swapping them doesn't make much sense. Because this has nothing to do with backward compatibility, it's okay to just let them stay with the old BDS. Signed-off-by: Fam Zheng

[Qemu-block] [RFC PATCH 13/16] iotests: Add qbm to case 097

2016-01-26 Thread Fam Zheng
The output of "qemu-img map" will be slightly different for qbm because the data image paths are not $TEST_IMG, but the pattern is predicatable enough so we can just filter it out. Signed-off-by: Fam Zheng --- tests/qemu-iotests/095 | 2 +- tests/qemu-iotests/097 | 4 +++- 2

Re: [Qemu-block] [PATCH] nvme: generate OpenFirmware device path in the "bootorder" fw_cfg file

2016-01-26 Thread Gonglei (Arei)
> > Subject: [PATCH] nvme: generate OpenFirmware device path in the "bootorder" > fw_cfg file > > Background on QEMU boot indices > --- > > Normally, the "bootindex" property is configured for bootable devices > with: > > DEVICE_instance_init() >

[Qemu-block] [PATCH v4 02/10] qemu-img: add support for --object command line arg

2016-01-26 Thread Daniel P. Berrange
Allow creation of user creatable object types with qemu-img via a new --object command line arg. This will be used to supply passwords and/or encryption keys to the various block driver backends via the recently added 'secret' object type. # printf letmein > mypasswd.txt # qemu-img info

[Qemu-block] [PATCH v4 05/10] qemu-io: allow specifying image as a set of options args

2016-01-26 Thread Daniel P. Berrange
Currently qemu-io allows an image filename to be passed on the command line, but unless using the JSON format, it does not have a way to set any options except the format eg qemu-io https://127.0.0.1/images/centos7.iso qemu-io /home/berrange/demo.qcow2 This adds a --image-opts arg that

[Qemu-block] [PATCH v4 07/10] qemu-img: allow specifying image as a set of options args

2016-01-26 Thread Daniel P. Berrange
Currently qemu-img allows an image filename to be passed on the command line, but unless using the JSON format, it does not have a way to set any options except the format eg qemu-img info https://127.0.0.1/images/centos7.iso This adds a --image-opts arg that indicates that the positional

[Qemu-block] [PATCH v4 04/10] qemu-io: add support for --object command line arg

2016-01-26 Thread Daniel P. Berrange
Allow creation of user creatable object types with qemu-io via a new --object command line arg. This will be used to supply passwords and/or encryption keys to the various block driver backends via the recently added 'secret' object type. # printf letmein > mypasswd.txt # qemu-io --object

[Qemu-block] [PATCH v4 09/10] qemu-nbd: use no_argument/required_argument constants

2016-01-26 Thread Daniel P. Berrange
When declaring the 'struct option' array, use the standard constants no_argument/required_argument, instead of magic values 0 and 1. Reviewed-by: Eric Blake Signed-off-by: Daniel P. Berrange --- qemu-nbd.c | 47

[Qemu-block] [PATCH v4 10/10] qemu-io: use no_argument/required_argument constants

2016-01-26 Thread Daniel P. Berrange
When declaring the 'struct option' array, use the standard constants no_argument/required_argument, instead of magic values 0 and 1. Reviewed-by: Eric Blake Signed-off-by: Daniel P. Berrange --- qemu-io.c | 30 +++--- 1 file

Re: [Qemu-block] [Patch v12 resend 05/10] docs: block replication's description

2016-01-26 Thread Stefan Hajnoczi
On Mon, Jan 04, 2016 at 02:03:16PM +0800, Wen Congyang wrote: > On 12/23/2015 05:26 PM, Stefan Hajnoczi wrote: > > On Wed, Dec 02, 2015 at 01:31:46PM +0800, Wen Congyang wrote: > >> +== Failure Handling == > >> +There are 6 internal errors when block replication is running: > >> +1. I/O error on

Re: [Qemu-block] [Patch v12 resend 08/10] Implement new driver for block replication

2016-01-26 Thread Stefan Hajnoczi
On Mon, Jan 04, 2016 at 01:50:40PM +0800, Wen Congyang wrote: > On 12/23/2015 05:47 PM, Stefan Hajnoczi wrote: > > On Wed, Dec 02, 2015 at 01:37:25PM +0800, Wen Congyang wrote: > >> +/* > >> + * Only write to active disk if the sectors have > >> + * already been allocated in active

Re: [Qemu-block] [PATCH v2 05/13] block: Hide HBitmap in block dirty bitmap interface

2016-01-26 Thread Vladimir Sementsov-Ogievskiy
On 20.01.2016 09:11, Fam Zheng wrote: HBitmap is an implementation detail of block dirty bitmap that should be hidden from users. Introduce a BdrvDirtyBitmapIter to encapsulate the underlying HBitmapIter. A small difference in the interface is, before, an HBitmapIter is initialized in place,

Re: [Qemu-block] [Qemu-devel] [PATCH v2 11/13] hbitmap: serialization

2016-01-26 Thread John Snow
On 01/20/2016 01:11 AM, Fam Zheng wrote: > From: Vladimir Sementsov-Ogievskiy > > Functions to serialize / deserialize(restore) HBitmap. HBitmap should be > saved to linear sequence of bits independently of endianness and bitmap > array element (unsigned long) size.

Re: [Qemu-block] [Qemu-devel] [PATCH v2 12/13] block: BdrvDirtyBitmap serialization interface

2016-01-26 Thread John Snow
On 01/20/2016 01:11 AM, Fam Zheng wrote: > From: Vladimir Sementsov-Ogievskiy > > Several functions to provide necessary access to BdrvDirtyBitmap for > block-migration.c > > Signed-off-by: Vladimir Sementsov-Ogievskiy > [Add the "finish"

Re: [Qemu-block] [RFC PATCH 01/16] doc: Add QBM format specification

2016-01-26 Thread Eric Blake
On 01/26/2016 03:38 AM, Fam Zheng wrote: > Signed-off-by: Fam Zheng > --- > docs/specs/qbm.md | 118 > ++ > 1 file changed, 118 insertions(+) > create mode 100644 docs/specs/qbm.md > > diff --git a/docs/specs/qbm.md

Re: [Qemu-block] [RFC PATCH 02/16] block: Set dirty before doing write

2016-01-26 Thread Eric Blake
On 01/26/2016 03:38 AM, Fam Zheng wrote: > So that driver can write the dirty bits into persistent dirty bitmaps in > the write callback. > > Signed-off-by: Fam Zheng > --- > block/io.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) Reviewed-by: Eric Blake

Re: [Qemu-block] [RFC PATCH 03/16] block: Allow .bdrv_close callback to release dirty bitmaps

2016-01-26 Thread Eric Blake
On 01/26/2016 03:38 AM, Fam Zheng wrote: > If the driver owns some dirty bitmaps, this assertion will fail. > > The correct place to release them is in bdrv_close, so move the > assertion one line down. > > Signed-off-by: Fam Zheng > --- > block.c | 3 ++- > 1 file changed, 2

[Qemu-block] [PATCH v3 13/19] sparc: disable floppy DMA

2016-01-26 Thread Hervé Poussineau
All functions relative to DMA (DMA_*() functions) are stubs on sparc platform. Disable the DMA in the floppy controller, instead of calling these stubs. Signed-off-by: Hervé Poussineau --- hw/block/fdc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/block/fdc.c

Re: [Qemu-block] [Qemu-devel] [PATCH v5 00/12] Dirty bitmaps migration

2016-01-26 Thread John Snow
On 01/26/2016 03:45 AM, Vladimir Sementsov-Ogievskiy wrote: > On 03.06.2015 01:17, John Snow wrote: >> >> On 05/28/2015 04:56 PM, Denis V. Lunev wrote: >>> On 28/05/15 23:09, John Snow wrote: On 05/26/2015 10:51 AM, Denis V. Lunev wrote: > On 26/05/15 17:48, Denis V. Lunev wrote: >>

[Qemu-block] [PATCH] nvme: generate OpenFirmware device path in the "bootorder" fw_cfg file

2016-01-26 Thread Laszlo Ersek
Background on QEMU boot indices --- Normally, the "bootindex" property is configured for bootable devices with: DEVICE_instance_init() device_add_bootindex_property(..., "bootindex", ...) object_property_add(..., device_get_bootindex,

[Qemu-block] [PATCH v2 3/5] block: allow backup_start to return job references

2016-01-26 Thread John Snow
backup_start picks up a reference to return the job it created to a caller. callers are updated to put down the reference when they are finished. This is particularly interesting for transactions where backup jobs pick up an implicit reference to the job. Previously, we check to see if the job

[Qemu-block] [PATCH v2 1/5] block: Allow mirror_start to return job references

2016-01-26 Thread John Snow
Pick up an extra reference in mirror_start_job to allow callers of mirror_start and commit_active_start to get a reference to the job they have created. Phase out callers from fishing the job out of bs->job -- use the return value instead. Callers of mirror_start_job and commit_active_start are

[Qemu-block] [PATCH v2 4/5] block/backup: Pack Notifier within BackupBlockJob

2016-01-26 Thread John Snow
Instead of relying on peeking at bs->job, we want to explicitly get a reference to the job that was involved in this notifier callback. Pack the Notifier inside of the BackupBlockJob so we can use container_of to get a reference back to the BackupBlockJob object. This cuts out one more case

Re: [Qemu-block] [Qemu-devel] [PATCH v5 00/12] Dirty bitmaps migration

2016-01-26 Thread Fam Zheng
On Tue, 01/26 17:57, John Snow wrote: > Can we implement a function that, in the event of a disaster, compares > the current state of the drive with the last known good incremental and > populates a bitmap based on the difference? > > Actually, we probably really want this feature around

Re: [Qemu-block] [Qemu-devel] [PATCH v2 4/5] block/backup: Pack Notifier within BackupBlockJob

2016-01-26 Thread Fam Zheng
On Tue, 01/26 18:54, John Snow wrote: > Instead of relying on peeking at bs->job, we want to explicitly get > a reference to the job that was involved in this notifier callback. > > Pack the Notifier inside of the BackupBlockJob so we can use > container_of to get a reference back to the

Re: [Qemu-block] [Qemu-devel] [PATCH v2 5/5] blockjob: add Job parameter to BlockCompletionFunc

2016-01-26 Thread Fam Zheng
On Tue, 01/26 18:54, John Snow wrote: > It will no longer be sufficient to rely on the opaque parameter > containing a BDS, and there's no way to reliably include a > self-reference to the job we're creating, so always pass the Job > object forward to any callbacks. > > Signed-off-by: John Snow

[Qemu-block] [RFC PATCH 15/16] iotests: Add qbm specific test case 140

2016-01-26 Thread Fam Zheng
Signed-off-by: Fam Zheng --- tests/qemu-iotests/140 | 80 + tests/qemu-iotests/140.out | 145 + tests/qemu-iotests/common | 6 ++ tests/qemu-iotests/group | 1 + 4 files changed, 232 insertions(+)