Re: [Qemu-devel] [PATCH V5 3/5] block: Enable the new throttling code in the block layer.

2013-08-14 Thread Fam Zheng
On Mon, 08/12 18:53, Benoît Canet wrote: Signed-off-by: Benoit Canet ben...@irqsave.net --- block.c | 349 ++--- block/qapi.c | 21 ++- blockdev.c| 100 +++-- include/block/block.h |

Re: [Qemu-devel] [PATCH V5 5/5] block: Add iops_sector_count to do the iops accounting for a given io size.

2013-08-14 Thread Fam Zheng
On Mon, 08/12 18:53, Benoît Canet wrote: This feature can be used in case where users are avoiding the iops limit by doing jumbo I/Os hammering the storage backend. You are accounting io ops by the op size: (unit = size / iops_sector_count), which is equivelant to bps. So I'm still not

Re: [Qemu-devel] [PATCH V5 3/5] block: Enable the new throttling code in the block layer.

2013-08-14 Thread Fam Zheng
On Wed, 08/14 17:31, Fam Zheng wrote: On Mon, 08/12 18:53, Benoît Canet wrote: Signed-off-by: Benoit Canet ben...@irqsave.net @@ -1262,7 +1260,7 @@ void qmp_block_set_io_throttle(const char *device, int64_t bps, int64_t bps_rd, int64_t bps_wr, int64_t iops

Re: [Qemu-devel] [PATCH] Introduce cache images for the QCOW2 format

2013-08-14 Thread Fam Zheng
On Wed, 08/14 13:28, Kaveh Razavi wrote: On 08/14/2013 12:53 AM, Alex Bligh wrote: What is this cache keyed on and how is it invalidated? Let's say a 2 VM on node X boot with backing file A. The first populates the cache, and the second utilises the cache. I then stop both VMs, delete the

Re: [Qemu-devel] [PATCH] Introduce cache images for the QCOW2 format

2013-08-14 Thread Fam Zheng
On Wed, 08/14 13:03, Alex Bligh wrote: On 14 Aug 2013, at 12:52, Fam Zheng wrote: Yes, this one sounds good to have. VMDK and VHDX have this kind of backing file status validation. ... though I'd prefer something safer than looking at mtime, for instance a sequence number

Re: [Qemu-devel] [PATCH v2 1/2] block: allow live commit of active image

2013-08-15 Thread Fam Zheng
On Tue, 07/30 14:53, Stefan Hajnoczi wrote: On Tue, Jul 30, 2013 at 03:17:47PM +0800, Fam Zheng wrote: for (sector_num = 0; sector_num end; sector_num += n) { -uint64_t delay_ns = 0; -bool copy; -wait: -/* Note that even when no rate limit is applied we

[Qemu-devel] [PATCH v3 1/2] block: allow live commit of active image

2013-08-15 Thread Fam Zheng
data in 'base' as it's the only remaining after commit, but we can't delete 'active' as it's referenced everywhere in the program. Guest writes to active device during the commit are tracked by dirty map and committed like block-mirror. Signed-off-by: Fam Zheng f...@redhat.com --- block.c

[Qemu-devel] [PATCH v3 0/2] block: allow commit active as top

2013-08-15 Thread Fam Zheng
it to the user to complete the job (upon user's complete command, also commit writes since ready and flushes before reporting completion) Fam Zheng (2): block: allow live commit of active image qemu-iotests: update test cases for commit active block.c| 102

[Qemu-devel] [PATCH v3 2/2] qemu-iotests: update test cases for commit active

2013-08-15 Thread Fam Zheng
Factor out commit test common logic into super class, and update test of committing the active image. Signed-off-by: Fam Zheng f...@redhat.com --- tests/qemu-iotests/040 | 73 +- 1 file changed, 31 insertions(+), 42 deletions(-) diff --git a/tests

Re: [Qemu-devel] [PATCH v2 1/4] vmdk: fix L1 and L2 table size in vmdk3 open

2013-08-18 Thread Fam Zheng
On Sun, 08/18 17:19, Paolo Bonzini wrote: Il 13/08/2013 03:21, Fam Zheng ha scritto: VMDK3 header has the field l1dir_size, but vmdk_open_vmdk3 hardcoded the value. This patch honors the header field. And the L2 table size is 4096 according to VMDK spec[1], instead of 1 9 (512

[Qemu-devel] [PATCH v3 0/4] vmdk: Support ESX files

2013-08-19 Thread Fam Zheng
it to vmfs_sparse which is better in representing its main usage nowadays. v3: Reorder patches to first move header check to vmdk_add_extent(). Fam Zheng (3): vmdk: Move l1_size check into vmdk_add_extent() vmdk: fix L1 and L2 table size in vmdk3 open vmdk: support vmfsSparse files

[Qemu-devel] [PATCH v3 2/4] vmdk: fix L1 and L2 table size in vmdk3 open

2013-08-19 Thread Fam Zheng
VMDK3 header has the field l1dir_size, but vmdk_open_vmdk3 hardcoded the value. This patch honors the header field. And the L2 table size is 4096 according to VMDK spec[1], instead of 1 9 (512). [1]: http://www.vmware.com/support/developer/vddk/vmdk_50_technote.pdf?src=vmdk Signed-off-by: Fam

[Qemu-devel] [PATCH v3 3/4] vmdk: support vmfsSparse files

2013-08-19 Thread Fam Zheng
, vmfsSparse files only work if opened through the descriptor file. Data files without descriptor files, as far as I could understand, are not supported by ESX. Signed-off-by: Paolo Bonzini pbonz...@redhat.com Signed-off-by: Fam Zheng f...@redhat.com -- v2: Rebase to patch 01. Change le64_to_cpu

[Qemu-devel] [PATCH v3 1/4] vmdk: Move l1_size check into vmdk_add_extent()

2013-08-19 Thread Fam Zheng
This header check is common to VMDK3 and VMDK4, so move it into vmdk_add_extent(). Signed-off-by: Fam Zheng f...@redhat.com --- block/vmdk.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/block/vmdk.c b/block/vmdk.c index 346bb5c..f8c0a4e 100644 --- a/block

[Qemu-devel] [PATCH v3 4/4] vmdk: support vmfs files

2013-08-19 Thread Fam Zheng
). Signed-off-by: Paolo Bonzini pbonz...@redhat.com Signed-off-by: Fam Zheng f...@redhat.com --- block/vmdk.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/block/vmdk.c b/block/vmdk.c index 3986d1d..63b489d 100644 --- a/block/vmdk.c +++ b/block/vmdk.c @@ -719,7 +719,7 @@ static

Re: [Qemu-devel] vmdk stream-optimised format

2013-08-19 Thread Fam Zheng
On Mon, 08/19 12:09, Alex Bligh wrote: I note some recent work on vmdk file support. Has anyone looked at supporting vmdk streaming format as an /output/ file format (I think we currently support it as an input format). This is what you need to use to upload a VM to vCenter. Currently the

Re: [Qemu-devel] vmdk stream-optimised format

2013-08-19 Thread Fam Zheng
On Mon, 08/19 12:50, Alex Bligh wrote: On 19 Aug 2013, at 12:23, Fam Zheng wrote: Yes, that would be something possible to do. Is it the only format to upload a VM to vCenter now, shouldn't normal VMDK be supported as well? Ian puts it better than I can: This format is only useful

[Qemu-devel] [PATCH v2] monitor: print the invalid char in error message

2013-08-19 Thread Fam Zheng
It's more friendly to print which char is invalid to user, especially when user tries to input a float value and expect the monitor to round it to int. Since we don't round float number when we look for a integer, telling which char is invalid is less confusing. Signed-off-by: Fam Zheng f

Re: [Qemu-devel] vmdk stream-optimised format

2013-08-20 Thread Fam Zheng
On Tue, 08/20 07:51, Alex Bligh wrote: On 20 Aug 2013, at 02:42, Fam Zheng wrote: OK, thanks for explaination. That sounds a valid use case for streamOptimized. However I am afraid QEMU and its users benefit not much from this feature anyway, because it's moving a VM away to VMware

[Qemu-devel] [PATCH] block: better error message for read only format name

2013-08-22 Thread Fam Zheng
When user tries to use read-only whitelist format in the command line option, failure message was 'foo' invalid format. It might be invalid only for writable, but valid for read-only, so it is confusing. Give the user easier to understand information. Signed-off-by: Fam Zheng f...@redhat.com

Re: [Qemu-devel] [RFC PATCH 3/4] qmp: Add snapshot= option to nbd-server-add

2013-08-22 Thread Fam Zheng
On Wed, 08/21 15:02, Stefan Hajnoczi wrote: On Mon, Jul 29, 2013 at 12:25:31PM +0800, Fam Zheng wrote: +/* create a point-in-time snapshot BDS from an existing BDS */ +static BlockDriverState *nbd_create_snapshot(BlockDriverState *orig_bs) +{ +int ret; +char filename[1024

Re: [Qemu-devel] [RFC PATCH 3/4] qmp: Add snapshot= option to nbd-server-add

2013-08-22 Thread Fam Zheng
On Thu, 08/22 11:22, Paolo Bonzini wrote: Il 22/08/2013 10:53, Fam Zheng ha scritto: This is handy but only works if the QEMU process has permission to create temporary files. Yes, this is a shortcut, it has this limitation, but the good side is it's easy to get and no other

Re: [Qemu-devel] [PATCH v5 0/8] Implement reference count for BlockDriverState [resend]

2013-08-22 Thread Fam Zheng
On Thu, 08/22 13:38, Stefan Hajnoczi wrote: On Fri, Aug 09, 2013 at 06:01:53PM +0800, Fam Zheng wrote: [resend to the correct list] BlockDriverState lifecycle management is needed by future features such as image fleecing and blockdev-add. This series adds reference count

[Qemu-devel] [PATCH v6 0/8] Implement reference count for BlockDriverState

2013-08-22 Thread Fam Zheng
BDS reference. 02: Fix leak of bs.opaque v3: 03: Removed unnecessary bdrv_close() call. v2: 05: Removed: block: use BlockDriverState refcnt for device attach/detach 07: Fix xen_disk blk_disconnect() as it depended on device attach refcnt. Fam Zheng (8): vvfat: use bdrv_new

[Qemu-devel] [PATCH v6 4/8] block: make bdrv_delete() static

2013-08-22 Thread Fam Zheng
-refcnt to 1, so all bdrv_unref() now actually delete the BDS. Signed-off-by: Fam Zheng f...@redhat.com --- block.c | 23 --- block/backup.c| 2 +- block/blkverify.c | 4 ++-- block/cow.c | 2 +- block/iscsi.c | 2 +- block/mirror.c

[Qemu-devel] [PATCH v6 6/8] xen_disk: simplify blk_disconnect with refcnt

2013-08-22 Thread Fam Zheng
We call bdrv_attach_dev when initializing whether or not bs is created locally, so call bdrv_detach_dev and let the refcnt handle the lifecycle. Signed-off-by: Fam Zheng f...@redhat.com --- hw/block/xen_disk.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/hw

[Qemu-devel] [PATCH v6 2/8] iscsi: use bdrv_new() instead of stack structure

2013-08-22 Thread Fam Zheng
BlockDriverState structure needs bdrv_new() to initialize refcnt, don't allocate a local structure variable and memset to 0, becasue with coming refcnt implementation, bdrv_unref will crash if bs-refcnt not initialized to 1. Signed-off-by: Fam Zheng f...@redhat.com --- block/iscsi.c | 16

[Qemu-devel] [PATCH v6 3/8] block: implement reference count for BlockDriverState

2013-08-22 Thread Fam Zheng
Introduce bdrv_ref/bdrv_unref to manage the lifecycle of BlockDriverState. They are unused for now but will used to replace bdrv_delete() later. Signed-off-by: Fam Zheng f...@redhat.com --- block.c | 21 + include/block/block.h | 2 ++ include/block

[Qemu-devel] [PATCH v6 5/8] migration: omit drive ref as we have bdrv_ref now

2013-08-22 Thread Fam Zheng
block-migration.c does not actually use DriveInfo anywhere. Hence it's safe to drive ref code, we really only care about referencing BDS. Signed-off-by: Fam Zheng f...@redhat.com --- block-migration.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/block-migration.c b

[Qemu-devel] [PATCH v6 1/8] vvfat: use bdrv_new() to allocate BlockDriverState

2013-08-22 Thread Fam Zheng
we need bdrv_new() to properly initialize BDS, don't allocate memory manually. Signed-off-by: Fam Zheng f...@redhat.com --- block/vvfat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/vvfat.c b/block/vvfat.c index cd3b8ed..a827d91 100644 --- a/block/vvfat.c +++ b

[Qemu-devel] [PATCH v6 7/8] nbd: use BlockDriverState refcnt

2013-08-22 Thread Fam Zheng
Previously, nbd calls drive_get_ref() on the drive of bs. A BDS doesn't always have associated dinfo, which nbd doesn't care either. We already have BDS ref count, so use it to make it safe for a BDS w/o blockdev. Signed-off-by: Fam Zheng f...@redhat.com --- blockdev-nbd.c | 10 +- nbd.c

[Qemu-devel] [PATCH v6 8/8] block: use BDS ref for block jobs

2013-08-22 Thread Fam Zheng
Block jobs used drive_get_ref(drive_get_by_blockdev(bs)) to avoid BDS being deleted. Now we have BDS reference count, and block jobs don't care about dinfo, so replace them to get cleaner code. It is also the safe way when BDS has no drive info. Signed-off-by: Fam Zheng f...@redhat.com

Re: [Qemu-devel] [PATCH v6 3/8] block: implement reference count for BlockDriverState

2013-08-25 Thread Fam Zheng
On Fri, 08/23 12:12, Jeff Cody wrote: On Fri, Aug 23, 2013 at 09:14:46AM +0800, Fam Zheng wrote: Introduce bdrv_ref/bdrv_unref to manage the lifecycle of BlockDriverState. They are unused for now but will used to replace bdrv_delete() later. Signed-off-by: Fam Zheng f...@redhat.com

Re: [Qemu-devel] [RFC PATCH 3/4] qmp: Add snapshot= option to nbd-server-add

2013-08-26 Thread Fam Zheng
On Thu, 08/22 11:22, Paolo Bonzini wrote: Il 22/08/2013 10:53, Fam Zheng ha scritto: This is handy but only works if the QEMU process has permission to create temporary files. Yes, this is a shortcut, it has this limitation, but the good side is it's easy to get and no other

Re: [Qemu-devel] Qemu Booting a PC without an MBR?

2013-08-30 Thread Fam Zheng
On Fri, 08/30 08:43, Peter Lieven wrote: On 30.08.2013 08:37, Paolo Bonzini wrote: Il 30/08/2013 08:28, Peter Lieven ha scritto: Hi all, today I had the second incidence of a migrated system (copied with DD) to qemu which won't boot. (stuck after booting from harddisk message). Looking

Re: [Qemu-devel] [PATCH V11 3/5] block: Enable the new throttling code in the block layer.

2013-09-01 Thread Fam Zheng
On Sun, 09/01 18:39, Benoît Canet wrote: Signed-off-by: Benoit Canet ben...@irqsave.net --- block.c | 338 + block/qapi.c | 21 ++- blockdev.c| 100 -- include/block/block.h |

Re: [Qemu-devel] [PATCH V11 4/5] block: Add support for throttling burst max in QMP and the command line.

2013-09-01 Thread Fam Zheng
On Sun, 09/01 18:39, Benoît Canet wrote: The max parameter of the leaky bucket throttling algorithm can be used to allow the guest to do bursts. The max value is a pool of I/O that the guest can use without being throttled at all. Throttling is triggered once this pool is empty. It would be

Re: [Qemu-devel] [PATCH V11 1/5] throttle: Add a new throttling API implementing continuous leaky bucket.

2013-09-01 Thread Fam Zheng
On Sun, 09/01 18:39, Benoît Canet wrote: Implement the continuous leaky bucket algorithm devised on IRC as a separate module. Signed-off-by: Benoit Canet ben...@irqsave.net --- include/qemu/throttle.h | 103 util/Makefile.objs |1 + util/throttle.c | 396

Re: [Qemu-devel] [PATCH v3 2/3] qcow2: Implement bdrv_amend_options

2013-09-01 Thread Fam Zheng
On Fri, 08/30 12:27, Max Reitz wrote: Implement bdrv_amend_options for compat, size, backing_file, backing_fmt and lazy_refcounts. Downgrading images from compat=1.1 to compat=0.10 is achieved through handling all incompatible flags accordingly, clearing all compatible and autoclear flags

Re: [Qemu-devel] [PATCH v5 2/2] vmdk: Optimize cluster allocation

2014-07-28 Thread Fam Zheng
On Mon, 07/28 16:11, Stefan Hajnoczi wrote: On Tue, May 27, 2014 at 04:49:22PM +0800, Fam Zheng wrote: +if (!bs-backing_hd) { +memset(whole_grain, 0, skip_start_sector BDRV_SECTOR_BITS); +memset(whole_grain + (skip_end_sector BDRV_SECTOR_BITS), 0

Re: [Qemu-devel] [PATCH 3/5] scsi-block: extract scsi_block_is_passthrough

2014-07-29 Thread Fam Zheng
On Mon, 07/28 17:08, Paolo Bonzini wrote: This will be used for both scsi_block_new_request and the scsi-block implementation of parse_cdb. Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- hw/scsi/scsi-disk.c | 38 ++ 1 file changed, 26

Re: [Qemu-devel] [PATCH for-2.2 v2 0/5] scsi: enable passthrough of vendor-specific commands

2014-07-29 Thread Fam Zheng
learning than reviewing for me, so take this with a grain of salt: Reviewed-by: Fam Zheng f...@redhat.com

Re: [Qemu-devel] [PATCH 1/2] block: fix overlapping multiwrite requests

2014-07-29 Thread Fam Zheng
On Tue, 07/29 13:41, Stefan Hajnoczi wrote: When request A is a strict subset of request B: s/subset/superset/ ? Fam

Re: [Qemu-devel] [PATCH v5 2/2] vmdk: Optimize cluster allocation

2014-07-29 Thread Fam Zheng
On Tue, 07/29 13:51, Stefan Hajnoczi wrote: On Tue, Jul 29, 2014 at 09:00:43AM +0800, Fam Zheng wrote: On Mon, 07/28 16:11, Stefan Hajnoczi wrote: On Tue, May 27, 2014 at 04:49:22PM +0800, Fam Zheng wrote: +if (!bs-backing_hd) { +memset(whole_grain, 0, skip_start_sector

[Qemu-devel] [PATCH v6 0/2] vmdk: Optimize cluster allocation

2014-07-30 Thread Fam Zheng
V6: Address Stefan's comments. See patch 02 for changelog. (Thanks for reviewing) Fam Zheng (2): qemu-iotests: Add data pattern in version3 VMDK sample image in 059 vmdk: Optimize cluster allocation block/vmdk.c | 222 + tests/qemu

[Qemu-devel] [PATCH v6 1/2] qemu-iotests: Add data pattern in version3 VMDK sample image in 059

2014-07-30 Thread Fam Zheng
It's possible that we diverge from the specification with our implementation. Having a reference image in the test cases may detect such problems when we introduce a bug that can read what it creates, but can't handle a real VMDK. Signed-off-by: Fam Zheng f...@redhat.com --- tests/qemu-iotests

[Qemu-devel] [PATCH v6 2/2] vmdk: Optimize cluster allocation

2014-07-30 Thread Fam Zheng
that this passes qemu-iotests for all VMDK subformats. Signed-off-by: Fam Zheng f...@redhat.com --- V6: Fix assertion condition. (Stefan) Fix spellings. (Stefan) --- block/vmdk.c | 222 +-- 1 file changed, 140 insertions(+), 82 deletions

Re: [Qemu-devel] [PATCH] vmdk: improve streamOptimized vmdk support

2014-07-30 Thread Fam Zheng
On Mon, 07/07 10:54, Milos Vyletel wrote: VMDK's streamOptimized format is different that regular sparse format. s/that/from/ L1(GD) and L2(GT) tables are not predefined but rather generated and written during image creation mainly because there is no way to tell how much space data will

Re: [Qemu-devel] [PATCH 1/4] docs: Expand the list of supported image elements with L1/L2 tables

2014-07-30 Thread Fam Zheng
On Thu, 07/24 16:32, Maria Kustova wrote: Signed-off-by: Maria Kustova mari...@catit.be --- tests/image-fuzzer/docs/image-fuzzer.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/image-fuzzer/docs/image-fuzzer.txt b/tests/image-fuzzer/docs/image-fuzzer.txt

Re: [Qemu-devel] [PATCH 2/4] runner: Make a copy of a test image for destructive test commands

2014-07-30 Thread Fam Zheng
On Thu, 07/24 16:32, Maria Kustova wrote: Signed-off-by: Maria Kustova mari...@catit.be --- tests/image-fuzzer/runner/runner.py | 16 ++-- 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/tests/image-fuzzer/runner/runner.py b/tests/image-fuzzer/runner/runner.py

[Qemu-devel] [PATCH] po: Add Chinese translation

2014-07-30 Thread Fam Zheng
Signed-off-by: Fam Zheng f...@redhat.com --- po/zh_CN.po | 86 + 1 file changed, 86 insertions(+) create mode 100644 po/zh_CN.po diff --git a/po/zh_CN.po b/po/zh_CN.po new file mode 100644 index 000..5724ef9 --- /dev/null +++ b/po

Re: [Qemu-devel] [PATCH] po: Add Chinese translation

2014-07-30 Thread Fam Zheng
On Thu, 07/31 10:44, Fam Zheng wrote: +#: ui/gtk.c:1783 +msgid _View +msgstr 试图(_V) Typo! Will post v2. Fam

[Qemu-devel] [PATCH v2] po: Add Chinese translation

2014-07-30 Thread Fam Zheng
Signed-off-by: Fam Zheng f...@redhat.com --- v2: Fix typo for _View. --- po/zh_CN.po | 86 + 1 file changed, 86 insertions(+) create mode 100644 po/zh_CN.po diff --git a/po/zh_CN.po b/po/zh_CN.po new file mode 100644 index 000

Re: [Qemu-devel] [PATCH v4 0/5] This series adds iotest case for IO throttling.

2014-07-31 Thread Fam Zheng
On Tue, 06/17 10:45, Fam Zheng wrote: On Thu, 06/05 16:47, Fam Zheng wrote: There is a change in qemu-io sub-commands aio_read and aio_write, which makes the aio requests accounted and the statistics reflected in blockstats. Note that IO throttling implementation allows overcommiting

Re: [Qemu-devel] [PATCH] po: Add Chinese translation

2014-07-31 Thread Fam Zheng
On Fri, 08/01 01:46, chen.fan.f...@cn.fujitsu.com wrote: Hi, I think this should be 视图. Yes, I have already posted V2. Please review. Thanks, Fam

Re: [Qemu-devel] [PATCH v2] vmdk: improve streamOptimized vmdk support

2014-08-04 Thread Fam Zheng
On Mon, 08/04 13:10, Milos Vyletel wrote: VMDK's streamOptimized format is different from regular sparse format. L1(GD) and L2(GT) tables are not predefined but rather generated and written during image creation mainly because there is no way to tell how much space data will occupy once they

Re: [Qemu-devel] [PATCH 1/7] qapi: add some enum tests

2014-08-04 Thread Fam Zheng
On Mon, 08/04 22:36, Eric Blake wrote: diff --git a/tests/Makefile b/tests/Makefile index 4b2e1bb..a5d82e1 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -190,7 +190,8 @@ $(foreach target,$(SYSEMU_TARGET_LIST), \ $(eval check-qtest-$(target)-y += tests/qom-test$(EXESUF)))

Re: [Qemu-devel] [PATCH 7/7] qapi: drop support for inline subtypes

2014-08-05 Thread Fam Zheng
On Mon, 08/04 22:36, Eric Blake wrote: diff --git a/tests/Makefile b/tests/Makefile index a5d82e1..c54d802 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -193,7 +193,8 @@ check-qapi-schema-y := $(addprefix tests/qapi-schema/, \ comments.json empty.json enum-empty.json

[Qemu-devel] [PATCH 1/2] block: Pass errp in blkconf_geometry

2014-08-05 Thread Fam Zheng
This allows us to pass error information to caller. Signed-off-by: Fam Zheng f...@redhat.com --- hw/block/block.c | 18 +- hw/block/virtio-blk.c| 7 +++ hw/ide/qdev.c| 11 --- hw/scsi/scsi-disk.c | 11 --- include/hw/block/block.h

[Qemu-devel] [PATCH 0/2] scsi: Change device init to realize

2014-08-05 Thread Fam Zheng
DeviceClass-init is the old interface, let's convert scsi devices to the new -realize API. A user visible change is the error message shown in qemu-iotests reference output, but I don't know what's the best way to retain it. So please review if and how this could be improved. Fam Fam Zheng (2

[Qemu-devel] [PATCH 2/2] scsi-bus: Convert DeviceClass init to realize

2014-08-05 Thread Fam Zheng
the callee's error_report is changed to error_segs. Signed-off-by: Fam Zheng f...@redhat.com --- hw/scsi/lsi53c895a.c | 2 ++ hw/scsi/scsi-bus.c | 64 ++--- hw/scsi/scsi-disk.c| 78 -- hw/scsi/scsi

Re: [Qemu-devel] [PATCH 2/2] scsi-bus: Convert DeviceClass init to realize

2014-08-05 Thread Fam Zheng
On Tue, 08/05 17:11, Fam Zheng wrote: Replace init/destroy with realize/unrealize in SCSIDeviceClass, which has errp as a parameter. So all the implementations now uses s/uses/use/ error_setg instead of error_report for reporting error. Also in lsi53c895a, report the error when

Re: [Qemu-devel] [PATCH v2] vmdk: improve streamOptimized vmdk support

2014-08-05 Thread Fam Zheng
On Tue, 08/05 12:44, Milos Vyletel wrote: On Tue, Aug 5, 2014 at 1:27 AM, Fam Zheng f...@redhat.com wrote: Does putting a monolithicSparse into the OVA work in this case? It does not. I did not try to import it to OVM but ESXi server complained about the format of vmdk in OVA archive (don't

[Qemu-devel] [PATCH v2 1/2] block: Pass errp in blkconf_geometry

2014-08-05 Thread Fam Zheng
This allows us to pass error information to caller. Signed-off-by: Fam Zheng f...@redhat.com --- hw/block/block.c | 18 +- hw/block/virtio-blk.c| 7 +++ hw/ide/qdev.c| 11 --- hw/scsi/scsi-disk.c | 11 --- include/hw/block/block.h

[Qemu-devel] [PATCH v2 0/2] scsi: Change device init to realize

2014-08-05 Thread Fam Zheng
if and how this could be improved. Fam Fam Zheng (2): block: Pass errp in blkconf_geometry scsi-bus: Convert DeviceClass init to realize hw/block/block.c | 18 +- hw/block/virtio-blk.c | 7 ++-- hw/ide/qdev.c | 11 -- hw/scsi/lsi53c895a.c | 2 ++ hw

[Qemu-devel] [PATCH v2 2/2] scsi-bus: Convert DeviceClass init to realize

2014-08-05 Thread Fam Zheng
in the callee, error_report is changed to error_setg. Signed-off-by: Fam Zheng f...@redhat.com --- hw/scsi/lsi53c895a.c | 2 ++ hw/scsi/scsi-bus.c | 64 ++--- hw/scsi/scsi-disk.c| 78 -- hw/scsi/scsi

[Qemu-devel] [RFC PATCH v2 00/10] virtio-scsi: Dataplane on single iothread

2014-08-05 Thread Fam Zheng
to be worked on top of this as well, but it's not thoroughly planned yet. Thanks, Fam Fam Zheng (10): virtio: Compile vring code unconditionally virtio-scsi: Split virtio_scsi_handle_cmd_req from virtio_scsi_handle_cmd virtio-scsi: Split virtio_scsi_handle_ctrl_req from

[Qemu-devel] [RFC PATCH v2 01/10] virtio: Compile vring code unconditionally

2014-08-05 Thread Fam Zheng
Because virtio-scsi dataplane will also use it. Signed-off-by: Fam Zheng f...@redhat.com --- hw/virtio/Makefile.objs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/virtio/Makefile.objs b/hw/virtio/Makefile.objs index ec9e855..a92582f 100644 --- a/hw/virtio/Makefile.objs

[Qemu-devel] [RFC PATCH v2 02/10] virtio-scsi: Split virtio_scsi_handle_cmd_req from virtio_scsi_handle_cmd

2014-08-05 Thread Fam Zheng
This is the common part to handle one cmd request. Refactor out for later usage of dataplane iothread code. Signed-off-by: Fam Zheng f...@redhat.com --- hw/scsi/virtio-scsi.c | 107 include/hw/virtio/virtio-scsi.h | 26 ++ 2 files

[Qemu-devel] [RFC PATCH v2 03/10] virtio-scsi: Split virtio_scsi_handle_ctrl_req from virtio_scsi_handle_ctrl

2014-08-05 Thread Fam Zheng
To share with dataplane code. Signed-off-by: Fam Zheng f...@redhat.com --- hw/scsi/virtio-scsi.c | 60 ++--- include/hw/virtio/virtio-scsi.h | 1 + 2 files changed, 34 insertions(+), 27 deletions(-) diff --git a/hw/scsi/virtio-scsi.c b/hw/scsi

[Qemu-devel] [RFC PATCH v2 07/10] virtio-scsi: Make virtio_scsi_push_event public

2014-08-05 Thread Fam Zheng
Later this will be called by dataplane code. Signed-off-by: Fam Zheng f...@redhat.com --- hw/scsi/virtio-scsi.c | 4 ++-- include/hw/virtio/virtio-scsi.h | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/hw/scsi/virtio-scsi.c b/hw/scsi/virtio-scsi.c index c5a6b63

[Qemu-devel] [RFC PATCH v2 06/10] virtio-scsi: Make virtio_scsi_free_req public

2014-08-05 Thread Fam Zheng
To share with dataplane code later. Signed-off-by: Fam Zheng f...@redhat.com --- hw/scsi/virtio-scsi.c | 2 +- include/hw/virtio/virtio-scsi.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/scsi/virtio-scsi.c b/hw/scsi/virtio-scsi.c index 4a65653..c5a6b63

[Qemu-devel] [RFC PATCH v2 05/10] virtio-scsi: Make virtio_scsi_init_req public

2014-08-05 Thread Fam Zheng
To share with datplane code later. Signed-off-by: Fam Zheng f...@redhat.com --- hw/scsi/virtio-scsi.c | 2 +- include/hw/virtio/virtio-scsi.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/scsi/virtio-scsi.c b/hw/scsi/virtio-scsi.c index cb2745d..4a65653 100644

[Qemu-devel] [RFC PATCH v2 04/10] virtio-scsi: Add VirtIOSCSIVring in VirtIOSCSIReq

2014-08-05 Thread Fam Zheng
Move VirtIOSCSIReq to header and add one field vring as a wrapper structure of Vring, VirtIOSCSIVring. This is necessary for coming dataplane code that runs uses vring on iothread. Signed-off-by: Fam Zheng f...@redhat.com --- include/hw/virtio/virtio-scsi.h | 14 ++ 1 file changed

[Qemu-devel] [RFC PATCH v2 10/10] virtio-scsi: Hook up with dataplane

2014-08-05 Thread Fam Zheng
-by: Fam Zheng f...@redhat.com --- hw/scsi/virtio-scsi.c | 74 --- 1 file changed, 71 insertions(+), 3 deletions(-) diff --git a/hw/scsi/virtio-scsi.c b/hw/scsi/virtio-scsi.c index 9e78e21..1f2a9b6 100644 --- a/hw/scsi/virtio-scsi.c +++ b/hw/scsi/virtio

[Qemu-devel] [RFC PATCH v2 08/10] virtio-scsi: Add 'iothread' property to virtio-scsi-pci

2014-08-05 Thread Fam Zheng
Similar to this property in virtio-blk for dataplane, add it as a QOM link in virtio-scsi and an alias in virtio-scsi-pci, in order to assign an iothread to the device. Other bus types can be added later. Signed-off-by: Fam Zheng f...@redhat.com --- hw/scsi/virtio-scsi.c | 11

[Qemu-devel] [RFC PATCH v2 09/10] virtio-scsi-dataplane: Code to run virtio-scsi on iothread

2014-08-05 Thread Fam Zheng
sure make all those called functions work with iothread, too. Signed-off-by: Fam Zheng f...@redhat.com --- hw/scsi/Makefile.objs | 2 +- hw/scsi/virtio-scsi-dataplane.c | 219 include/hw/virtio/virtio-scsi.h | 19 3 files changed, 239

Re: [Qemu-devel] [RFC PATCH v2 09/10] virtio-scsi-dataplane: Code to run virtio-scsi on iothread

2014-08-06 Thread Fam Zheng
On Wed, 08/06 10:45, Paolo Bonzini wrote: Il 06/08/2014 07:35, Fam Zheng ha scritto: ifeq ($(CONFIG_VIRTIO),y) -obj-y += virtio-scsi.o +obj-y += virtio-scsi.o virtio-scsi-dataplane.o obj-$(CONFIG_VHOST_SCSI) += vhost-scsi.o endif I first thought that this must be conditional

[Qemu-devel] [PATCH v3] po: Add Chinese translation

2014-08-06 Thread Fam Zheng
Signed-off-by: Fam Zheng f...@redhat.com Reviewed-by: Amos Kong ak...@redhat.com Reviewed-by: Dongsheng Song songdongsh...@live.cn Reviewed-by: Wei Huang wehu...@redhat.com --- v3: Add a missing space for msgid - Press Ctrl+Alt+G to release grab As pointed out by Amos. Meanwhile

[Qemu-devel] [PATCH] build-sys: Move qapi-{types, visit, event}.o into util-obj-y

2014-08-06 Thread Fam Zheng
These three objects are repeated in multiple times in Makefiles. Let's just add them to libqemuutil.a, and don't list explicitly elsewhere. Signed-off-by: Fam Zheng f...@redhat.com --- Makefile | 2 +- Makefile.objs | 10 ++ tests/Makefile | 2 +- 3 files changed, 4 insertions

Re: [Qemu-devel] [PATCH V5 2/5] runner: Tool for fuzz tests execution

2014-08-08 Thread Fam Zheng
On Wed, 08/06 17:12, Maria Kustova wrote: The purpose of the test runner is to prepare the test environment (e.g. create a work directory, a test image, etc), execute a program under test with parameters, indicate a test failure if the program was killed during the test execution and collect

Re: [Qemu-devel] [PATCH V5 2/5] runner: Tool for fuzz tests execution

2014-08-08 Thread Fam Zheng
On Fri, 08/08 12:58, M.Kustova wrote: On Fri, Aug 8, 2014 at 12:50 PM, Fam Zheng f...@redhat.com wrote: On Wed, 08/06 17:12, Maria Kustova wrote: The purpose of the test runner is to prepare the test environment (e.g. create a work directory, a test image, etc), execute a program under

[Qemu-devel] [PATCH] memory: Update obsolete comment about AddrRange field type

2014-08-10 Thread Fam Zheng
We are not 64 bit any more since 08dafab4 memory: use 128-bit integers for sizes and intermediates but the comment is forgotten to be updated. Signed-off-by: Fam Zheng f...@redhat.com --- memory.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/memory.c b/memory.c index

Re: [Qemu-devel] [PATCH 2/2] scsi-bus: Convert DeviceClass init to realize

2014-08-11 Thread Fam Zheng
On Thu, 08/07 16:25, Kevin Wolf wrote: Am 05.08.2014 um 11:11 hat Fam Zheng geschrieben: Replace init/destroy with realize/unrealize in SCSIDeviceClass, which has errp as a parameter. So all the implementations now uses error_setg instead of error_report for reporting error. Also

[Qemu-devel] [PATCH v3 0/2] scsi: Change device init to realize

2014-08-11 Thread Fam Zheng
to retain it. So please review if and how this could be improved. Fam Fam Zheng (2): block: Pass errp in blkconf_geometry scsi-bus: Convert DeviceClass init to realize hw/block/block.c | 18 +- hw/block/virtio-blk.c | 7 ++-- hw/ide/qdev.c | 11 -- hw/scsi

[Qemu-devel] [PATCH v3 2/2] scsi-bus: Convert DeviceClass init to realize

2014-08-11 Thread Fam Zheng
in the callee, error_report is changed to error_setg. Signed-off-by: Fam Zheng f...@redhat.com --- hw/scsi/lsi53c895a.c | 2 ++ hw/scsi/scsi-bus.c | 69 hw/scsi/scsi-disk.c| 78 -- hw/scsi/scsi

[Qemu-devel] [PATCH v3 1/2] block: Pass errp in blkconf_geometry

2014-08-11 Thread Fam Zheng
This allows us to pass error information to caller. Signed-off-by: Fam Zheng f...@redhat.com --- hw/block/block.c | 18 +- hw/block/virtio-blk.c| 7 +++ hw/ide/qdev.c| 11 --- hw/scsi/scsi-disk.c | 11 --- include/hw/block/block.h

Re: [Qemu-devel] disk image: self-organized format or raw file

2014-08-11 Thread Fam Zheng
On Mon, 08/11 19:38, 吴兴博 wrote: Hello, The introduction in the wiki page present several advantages of qcow2 [1]. But I'm a little confused. I really appreciate if any one can give me some help on this :). (1) Currently the raw format doesn't support COW. In other words, a raw image

Re: [Qemu-devel] the whole virtual machine hangs when IO does not come back!

2014-08-11 Thread Fam Zheng
On Mon, 08/11 15:21, Stefan Hajnoczi wrote: On Mon, Aug 11, 2014 at 04:33:21PM +0800, Bin Wu wrote: Hi, I tested the reliability of qemu in the IPSAN environment as follows: (1) create one VM on a X86 server which is connected to an IPSAN, and the VM has only one system volume which is

Re: [Qemu-devel] [PATCH v3 2/2] scsi-bus: Convert DeviceClass init to realize

2014-08-11 Thread Fam Zheng
On Mon, 08/11 15:32, Stefan Hajnoczi wrote: On Mon, Aug 11, 2014 at 04:45:18PM +0800, Fam Zheng wrote: diff --git a/tests/qemu-iotests/051.out b/tests/qemu-iotests/051.out index d7b0f50..f6d9dc1 100644 --- a/tests/qemu-iotests/051.out +++ b/tests/qemu-iotests/051.out @@ -122,7 +122,7

[Qemu-devel] [PATCH v4 0/2] scsi: Change device init to realize

2014-08-11 Thread Fam Zheng
messages dropped. Fam Fam Zheng (2): block: Pass errp in blkconf_geometry scsi-bus: Convert DeviceClass init to realize hw/block/block.c | 18 +- hw/block/virtio-blk.c | 7 ++-- hw/ide/qdev.c | 11 -- hw/scsi/lsi53c895a.c | 1 + hw/scsi/scsi-bus.c

[Qemu-devel] [PATCH v4 1/2] block: Pass errp in blkconf_geometry

2014-08-11 Thread Fam Zheng
This allows us to pass error information to caller. Reviewed-by: Andreas Färber afaer...@suse.de Reviewed-by: Stefan Hajnoczi stefa...@redhat.com Signed-off-by: Fam Zheng f...@redhat.com --- hw/block/block.c | 18 +- hw/block/virtio-blk.c| 7 +++ hw/ide/qdev.c

[Qemu-devel] [PATCH v4 2/2] scsi-bus: Convert DeviceClass init to realize

2014-08-11 Thread Fam Zheng
returning it, because in the callee, error_report is changed to error_setg. And the callers don't have the right locations (e.g. -drive if=scsi). Signed-off-by: Fam Zheng f...@redhat.com --- hw/scsi/lsi53c895a.c | 1 + hw/scsi/scsi-bus.c | 70 - hw

Re: [Qemu-devel] the whole virtual machine hangs when IO does notcome back!

2014-08-11 Thread Fam Zheng
On Tue, 08/12 10:09, Zhang Haoyu wrote: Hi, I tested the reliability of qemu in the IPSAN environment as follows: (1) create one VM on a X86 server which is connected to an IPSAN, and the VM has only one system volume which is on the IPSAN; (2) disconnect the network between

Re: [Qemu-devel] disk image: self-organized format or raw file

2014-08-12 Thread Fam Zheng
On Tue, 08/12 06:46, 吴兴博 wrote: Hi Fam, It's glad to hear you, It is said in this post that All files systems that support inodes (ext2/3/4, xfs, btfs, etc) support files with holes while creating the files... [

Re: [Qemu-devel] disk image: self-organized format or raw file

2014-08-12 Thread Fam Zheng
On Tue, 08/12 08:03, 吴兴博 wrote: I carefully read your reply and thought of it carefully. I'm sorry that when I said I get it I actually meant I believe you but not I understand it. The problem would not come from cp or rsync -- It's not their fault. They just have no way to make it right.

Re: [Qemu-devel] disk image: self-organized format or raw file

2014-08-12 Thread Fam Zheng
On Tue, 08/12 12:22, Xingbo Wu wrote: On Tue, Aug 12, 2014 at 11:30 AM, Eric Blake ebl...@redhat.com wrote: On 08/12/2014 08:14 AM, 吴兴博 wrote: However FVD seems to have been ignored by community. Care to give a pointer to a URL describing the FVD format?

Re: [Qemu-devel] [PATCH v2] block.curl: adding 'curltimeout' option

2014-08-12 Thread Fam Zheng
-system-x86_64 -drive file=/tmp/test.qcow2 @end example Reviewed-by: Fam Zheng f...@redhat.com

Re: [Qemu-devel] [PATCH] ide: Add resize callback to ide/core

2014-08-12 Thread Fam Zheng
= 0; +dev-conf.secs = 0; + +blkconf_geometry(dev-conf, dev-chs_trans, 65536, 16, 255); blkconf_geometry could return -1 for invalid CHS values that but shouldn't hurt as far as I can see: Reviewed-by: Fam Zheng f...@redhat.com +bdrv_get_geometry(s-bs, nb_sectors); + +s

Re: [Qemu-devel] [PATCH 1/2] runner: Add an argument for test duration

2014-08-17 Thread Fam Zheng
Modulus the above two minor issues, Reviewed-by: Fam Zheng f...@redhat.com

<    7   8   9   10   11   12   13   14   15   16   >