Re: [Qemu-devel] [PATCH v5 1/3] qcow2: Add qcow2_shrink_l1_and_l2_table for qcow2 shrinking

2015-01-27 Thread Jun Li
On Thu, 01/22 14:14, Max Reitz wrote: > On 2015-01-19 at 08:16, Jun Li wrote: > >On Thu, 01/15 13:47, Max Reitz wrote: > >>On 2015-01-03 at 07:23, Jun Li wrote: > >>>On Fri, 11/21 11:56, Max Reitz wrote: > >>>>So, as for what I think we do need to d

Re: [Qemu-devel] [PATCH v5 1/3] qcow2: Add qcow2_shrink_l1_and_l2_table for qcow2 shrinking

2015-01-19 Thread Jun Li
On Thu, 01/15 13:47, Max Reitz wrote: > On 2015-01-03 at 07:23, Jun Li wrote: > >On Fri, 11/21 11:56, Max Reitz wrote: > >>So, as for what I think we do need to do when shrinking (and keep in mind: > >>The offset given to qcow2_truncate() is the guest size!

Re: [Qemu-devel] [PATCH v5 1/3] qcow2: Add qcow2_shrink_l1_and_l2_table for qcow2 shrinking

2015-01-03 Thread Jun Li
On Fri, 11/21 11:56, Max Reitz wrote: > On 2014-10-26 at 16:20, Jun Li wrote: > >This patch is the realization of new function qcow2_shrink_l1_and_l2_table. > >This function will shrink/discard l1 and l2 table when do qcow2 shrinking. > > > >Signed-off-by: Jun Li

[Qemu-devel] [PATCH v2] rbd: print a clear error message when write beyond EOF

2014-12-10 Thread Jun Li
Currently, as rbd driver do not support dynamic growth when write beyond EOF, so just print a clear error message. Signed-off-by: Jun Li --- v2: Just use rbd_aio_write to realize error detection. --- block/rbd.c | 4 1 file changed, 4 insertions(+) diff --git a/block/rbd.c b/block/rbd.c

Re: [Qemu-devel] [PATCH] rbd: print a clear error message when write beyond EOF

2014-12-10 Thread Jun Li
On Wed, 12/10 13:48, Josh Durgin wrote: > On 12/10/2014 07:47 AM, Jun Li wrote: > >Currently, as rbd driver do not support dynamic growth when write beyond EOF, > >so just print a clear error message. > > > >Signed-off-by: Jun Li > >--- > > block/rbd.c | 14

[Qemu-devel] [PATCH] rbd: print a clear error message when write beyond EOF

2014-12-10 Thread Jun Li
Currently, as rbd driver do not support dynamic growth when write beyond EOF, so just print a clear error message. Signed-off-by: Jun Li --- block/rbd.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/block/rbd.c b/block/rbd.c index 5b5a64a..65b01f0 100644 --- a/block/rbd.c

Re: [Qemu-devel] qcow2: Can create qcow2 image format on rbd server

2014-12-10 Thread Jun Li
On Mon, 12/08 15:49, Kevin Wolf wrote: > Am 08.12.2014 um 14:50 hat Jun Li geschrieben: > > On Mon, 12/08 11:07, Kevin Wolf wrote: > > > Am 05.12.2014 um 16:32 hat Jun Li geschrieben: > > > > Currently, qemu-img can not create qcow2 image format on rbd server. > &

Re: [Qemu-devel] qcow2: Can create qcow2 image format on rbd server

2014-12-10 Thread Jun Li
On Tue, 12/09 09:49, Stefan Hajnoczi wrote: > On Tue, Dec 9, 2014 at 3:52 AM, Josh Durgin wrote: > > On 12/08/2014 05:58 AM, Jun Li wrote: > >> > >> On Fri, 12/05 18:01, Max Reitz wrote: > >>> > >>> On 2014-12-05 at 16:32, Jun Li wrote: > >

Re: [Qemu-devel] [PATCH v3] qdev: Avoid type assertion in qdev_build_hotpluggable_device_list()

2014-12-08 Thread Jun Li
Ping, why does this patch has not been merged until now? Could anyone give some explanations? Thx. Regards, Jun Li On Wed, 11/05 15:03, Jun Li wrote: > Currently when *obj is not a TYPE_DEVICE, qemu will abort. This patch just > fixed it. When *obj is not a TYPE_DEVICE, just do not add

Re: [Qemu-devel] qcow2: Can create qcow2 image format on rbd server

2014-12-08 Thread Jun Li
On Fri, 12/05 18:01, Max Reitz wrote: > On 2014-12-05 at 16:32, Jun Li wrote: > >Currently, qemu-img can not create qcow2 image format on rbd server. Analysis > >the code as followings: > >when create qcow2 format image: > >qcow2_create2 > > bdrv_creat

Re: [Qemu-devel] qcow2: Can create qcow2 image format on rbd server

2014-12-08 Thread Jun Li
On Mon, 12/08 11:07, Kevin Wolf wrote: > Am 05.12.2014 um 16:32 hat Jun Li geschrieben: > > Currently, qemu-img can not create qcow2 image format on rbd server. > > Analysis > > the code as followings: > > when create qcow2 format image: > > qcow2_create2 >

Re: [Qemu-devel] qcow2: Can create qcow2 image format on rbd server

2014-12-06 Thread Jun Li
On Fri, 12/05 18:01, Max Reitz wrote: > On 2014-12-05 at 16:32, Jun Li wrote: > >Currently, qemu-img can not create qcow2 image format on rbd server. Analysis > >the code as followings: > >when create qcow2 format image: > >qcow2_create2 > > bdrv_creat

Re: [Qemu-devel] your mail

2014-12-06 Thread Jun Li
Please ignore it. Sorry... On Sat, 12/06 18:54, Jun Li wrote: > stefa...@redhat.com > Bcc: > Subject: Re: [Qemu-devel] qcow2: Can create qcow2 image format on rbd server > Reply-To: > In-Reply-To: <5481e4e7.9010...@redhat.com> > > On Fri, 12/05 18:01, Max Reitz wro

[Qemu-devel] (no subject)

2014-12-06 Thread Jun Li
stefa...@redhat.com Bcc: Subject: Re: [Qemu-devel] qcow2: Can create qcow2 image format on rbd server Reply-To: In-Reply-To: <5481e4e7.9010...@redhat.com> On Fri, 12/05 18:01, Max Reitz wrote: > On 2014-12-05 at 16:32, Jun Li wrote: > >Currently, qemu-img can not create qcow2

[Qemu-devel] qcow2: Can create qcow2 image format on rbd server

2014-12-05 Thread Jun Li
stions on howto realize a asynchronous rbd_resize. Thanks. Above analysis also based on stefan's hints. Thanks. Best Regards, Jun Li

[Qemu-devel] [PATCH] usb: delete redundant brackets in usb_host_handle_control()

2014-11-18 Thread Jun Li
When see usb codes, find there are redundant brackets !((udev->port->speedmask & USB_SPEED_MASK_SUPER)) here. So delete it. Signed-off-by: Jun Li --- hw/usb/host-libusb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/usb/host-libusb.c b/hw/usb/host-libu

[Qemu-devel] [PATCH] usb: delete error_report() for usb-bot

2014-11-16 Thread Jun Li
ned-off-by: Jun Li --- hw/usb/dev-storage.c | 1 - 1 file changed, 1 deletion(-) diff --git a/hw/usb/dev-storage.c b/hw/usb/dev-storage.c index 4539733..f386d62 100644 --- a/hw/usb/dev-storage.c +++ b/hw/usb/dev-storage.c @@ -424,7 +424,6 @@ static void usb_msd_handle_data(USBDevice *dev, USB

Re: [Qemu-devel] [PATCH v5 0/3] qcow2: Patch for shrinking qcow2 disk image

2014-11-10 Thread Jun Li
Ping Stefan and Kevin, Could anyone help to review this version of patch ? Thx. Regards, Jun Li On Sun, 10/26 23:20, Jun Li wrote: > v5: > Add qemu-iotests for qcow2 shrinking. Do some modifications based on MAX's > suggestions in v4. > > v4: > Add deal with C

Re: [Qemu-devel] [PATCH] snapshot: fixed bdrv_get_full_backing_filename can not get correct full_backing_filename

2014-11-10 Thread Jun Li
On Fri, 11/07 16:34, Max Reitz wrote: > On 2014-11-07 at 15:48, Jun Li wrote: > >When bs->filename and bs->backing_file are relative pathname and not under > >the > >same directory, path_combine() can not give the correct path for > >bs->backing_file. So ad

[Qemu-devel] [PATCH] snapshot: fixed bdrv_get_full_backing_filename can not get correct full_backing_filename

2014-11-07 Thread Jun Li
r directory This patch also fixes the following bug: https://bugzilla.redhat.com/show_bug.cgi?id=1161582#c2 Signed-off-by: Jun Li --- block.c | 28 +++- include/block/block.h | 2 ++ 2 files changed, 29 insertions(+), 1 deletion(-) diff --git a/block.c b/block.

[Qemu-devel] [PATCH v3] qdev: Avoid type assertion in qdev_build_hotpluggable_device_list()

2014-11-04 Thread Jun Li
nstance of type device Signed-off-by: Jun Li Reviewed-by: Paolo Bonzini --- v3: According to Andreas's suggestion, do some changes. As followings: 1, change the Subject to more meaningful. 2, use two "return 0" to return early avoid reindentation. And I have found in qcow2_gr

Re: [Qemu-devel] [PATCH v2] qdev: modify func qdev_build_hotpluggable_device_list

2014-11-04 Thread Jun Li
;return 0" is better, i will submit a new version. Thanks. > > > > BTW, for subject, i agree with you. > > Please use inline reply for mailing list discussions. Ok, got it. Thx. > > Fam > > > > > Jun Li > > 2014-11-5 上午2:39于 "Andreas Färber&qu

[Qemu-devel] [PATCH v2] qdev: modify func qdev_build_hotpluggable_device_list

2014-11-03 Thread Jun Li
nstance of type device Signed-off-by: Jun Li Reviewed-by: Paolo Bonzini --- v2: This version just do a little changes for the commit message. As following show: In v1, 1, boot qemu using cli: virtio-scsi-pci,id=scsi0 -enable-kvm In v2, 1, boot qemu using cli: $ /opt/qemu-git-arm/bin/qemu-sys

[Qemu-devel] [PATCH] qdev: modify func qdev_build_hotpluggable_device_list

2014-11-02 Thread Jun Li
using tab key(first input device_del, then press "Tab" key). (qemu) device_del After step2, qemu will abort. (qemu) device_del hw/core/qdev.c:930:qdev_build_hotpluggable_device_list: Object 0x563a2460 is not an instance of type device Signed-off-by: Jun Li --- hw/core/q

[Qemu-devel] [PATCH v5 2/3] qcow2: add update refcount table realization for update_refcount

2014-10-26 Thread Jun Li
When every item of refcount block is NULL, free refcount block and reset the corresponding item of refcount table with NULL. At the same time, put this cluster to s->free_cluster_index. Signed-off-by: Jun Li --- v5: Just instead write_reftable_entry with bdrv_pwrite_sync.

[Qemu-devel] [PATCH v5 1/3] qcow2: Add qcow2_shrink_l1_and_l2_table for qcow2 shrinking

2014-10-26 Thread Jun Li
This patch is the realization of new function qcow2_shrink_l1_and_l2_table. This function will shrink/discard l1 and l2 table when do qcow2 shrinking. Signed-off-by: Jun Li --- v5: Do some modifications based on MAX's suggestion. Thanks for MAX. In v5, do l2 shrinking firstly, then

[Qemu-devel] [PATCH v5 0/3] qcow2: Patch for shrinking qcow2 disk image

2014-10-26 Thread Jun Li
efcount blocks in function update_refcount. Thanks. Jun Li (3): qcow2: Add qcow2_shrink_l1_and_l2_table for qcow2 shrinking qcow2: add update refcount table realization for update_refcount qcow2: Add qemu-iotests for qcow2 shrinking block/qcow2-clu

[Qemu-devel] [PATCH v5 3/3] qcow2: Add qemu-iotests for qcow2 shrinking

2014-10-26 Thread Jun Li
Add qemu-iotests for qcow2 shrinking. e.g: $ ./check -qcow2 110 Signed-off-by: Jun Li --- tests/qemu-iotests/110 | 76 ++ tests/qemu-iotests/110.out | 13 tests/qemu-iotests/group | 1 + 3 files changed, 90 insertions(+) create mode

Re: [Qemu-devel] [PATCH v4 1/2] qcow2: Add qcow2_shrink_l1_and_l2_table for qcow2 shrinking

2014-10-22 Thread Jun Li
On Mon, 10/20 13:47, Max Reitz wrote: > On 2014-10-14 at 19:53, Jun Li wrote: > >This patch is the realization of new function qcow2_shrink_l1_and_l2_table. > >This function will shrink/discard l1 and l2 table when do qcow2 shrinking. > > > >Signed-off-by: Jun Li > &

Re: [Qemu-devel] [PATCH v3 1/2] qcow2: Add qcow2_shrink_l1_and_l2_table for qcow2 shrinking

2014-10-14 Thread Jun Li
Please ignore this patch, I have submit v4. Thx. On Mon, 10/13 13:04, Jun Li wrote: > This patch is the realization of new function qcow2_shrink_l1_and_l2_table. > This function will shrink/discard l1 and l2 table when do qcow2 shrinking. > > Signed-off-by: Jun Li > --- >

Re: [Qemu-devel] [PATCH v3 2/2] qcow2: add update refcount table realization for update_refcount

2014-10-14 Thread Jun Li
Please ignore this patch, I have submit v4. thx. On Mon, 10/13 13:04, Jun Li wrote: > When every item of refcount block is NULL, free refcount block and reset the > corresponding item of refcount table with NULL. At the same time, put this > cluster to s->free_cluster_index. >

Re: [Qemu-devel] [PATCH v3 0/2] qcow2: Patch for shrinking qcow2 disk image

2014-10-14 Thread Jun Li
Please ignore this patch, I have submit a new version. On Mon, 10/13 13:04, Jun Li wrote: > This is the third version for qcow2 shrinking. In this version, fixed host > cluster leak when shrinking a disk image. Such as: > Step 1, > # /opt/qemu-git-arm/bin/qemu-img info /home/li

[Qemu-devel] [PATCH v4 2/2] qcow2: add update refcount table realization for update_refcount

2014-10-14 Thread Jun Li
When every item of refcount block is NULL, free refcount block and reset the corresponding item of refcount table with NULL. At the same time, put this cluster to s->free_cluster_index. Signed-off-by: Jun Li --- v4: Do not change anything for this commit id. v3: Add handle self-describ

[Qemu-devel] [PATCH v4 0/2] qcow2: Patch for shrinking qcow2 disk image

2014-10-14 Thread Jun Li
file block/qcow2.c, just using ftruncate to fix host cluster leak. In file block/qcow2-cluster.c, just re-copy qcow2_grow_l1_table to realize qcow2_shrink_l1_and_l2_table. In file block/qcow2-refcount.c, also update the realization to handle self-describing refcount blocks in function

[Qemu-devel] [PATCH v4 1/2] qcow2: Add qcow2_shrink_l1_and_l2_table for qcow2 shrinking

2014-10-14 Thread Jun Li
This patch is the realization of new function qcow2_shrink_l1_and_l2_table. This function will shrink/discard l1 and l2 table when do qcow2 shrinking. Signed-off-by: Jun Li --- v4: Add deal with COW clusters in l2 table. When using COW, some of (l2_entry >> s->cluster_bits) will larg

[Qemu-devel] [PATCH v3 2/2] qcow2: add update refcount table realization for update_refcount

2014-10-12 Thread Jun Li
When every item of refcount block is NULL, free refcount block and reset the corresponding item of refcount table with NULL. At the same time, put this cluster to s->free_cluster_index. Signed-off-by: Jun Li --- This version adding handle self-describing refcount blocks. --- block/qc

[Qemu-devel] [PATCH v3 1/2] qcow2: Add qcow2_shrink_l1_and_l2_table for qcow2 shrinking

2014-10-12 Thread Jun Li
This patch is the realization of new function qcow2_shrink_l1_and_l2_table. This function will shrink/discard l1 and l2 table when do qcow2 shrinking. Signed-off-by: Jun Li --- Compared to v2, v3 fixed host cluster leak. --- block/qcow2-cluster.c | 173

[Qemu-devel] [PATCH v3 0/2] qcow2: Patch for shrinking qcow2 disk image

2014-10-12 Thread Jun Li
t re-copy qcow2_grow_l1_table to realize qcow2_shrink_l1_and_l2_table. In file block/qcow2-refcount.c, also update the realization to handle self-describing refcount blocks in function update_refcount. Thanks. Jun Li (2): qcow2: Add qcow2_shrink_l1_and_l2_table for qcow2 shrinking qcow2: a

[Qemu-devel] [PATCH v2] Modify qemu_opt_rename to realize renaming all items in opts

2014-09-23 Thread Jun Li
/show_bug.cgi?id=1145586 Signed-off-by: Jun Li Reviewed-by: Eric Blake --- blockdev.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/blockdev.c b/blockdev.c index b361fbb..ed95b76 100644 --- a/blockdev.c +++ b/blockdev.c @@ -536,8 +536,8 @@ static void qemu_opt_rename

Re: [Qemu-devel] [PATCH] Modify qemu_opt_rename to realize renaming all items in opts

2014-09-23 Thread Jun Li
On Tue, 09/23 10:47, Eric Blake wrote: > On 09/23/2014 07:13 AM, Jun Li wrote: > > Add realization of rename all items in opts for qemu_opt_rename. > > e.g: > > When add bps twice in command line, need to rename all bps to > > throttling.bps-total. > > > >

[Qemu-devel] [PATCH] Modify qemu_opt_rename to realize renaming all items in opts

2014-09-23 Thread Jun Li
Add realization of rename all items in opts for qemu_opt_rename. e.g: When add bps twice in command line, need to rename all bps to throttling.bps-total. Signed-off-by: Jun Li --- This patch solved following bug: Bug 1145586 - qemu-kvm will give strange hint when add bps twice for a drive

Re: [Qemu-devel] [PATCH v2] qcow2: add update refcount table realization for update_refcount

2014-09-13 Thread Jun Li
On Fri, 09/05 16:33, Stefan Hajnoczi wrote: > On Mon, Sep 01, 2014 at 06:52:48PM +0800, Jun Li wrote: > > How does this patch handle self-describing refcount blocks? I think > they will keep the refcount block alive forever because your code will > not decide to free them. &g

Re: [Qemu-devel] [PATCH v2] qcow2: add update refcount table realization for update_refcount

2014-09-09 Thread Jun Li
On Tue, 09/09 10:21, Kevin Wolf wrote: > Am 09.09.2014 um 04:52 hat Jun Li geschrieben: > > On Fri, 09/05 12:21, Kevin Wolf wrote: > > > Am 01.09.2014 um 12:52 hat Jun Li geschrieben: > > > > When every item of refcount block is NULL, free refcoun

Re: [Qemu-devel] [PATCH v2] qcow2: add update refcount table realization for update_refcount

2014-09-08 Thread Jun Li
On Fri, 09/05 12:21, Kevin Wolf wrote: > Am 01.09.2014 um 12:52 hat Jun Li geschrieben: > > When every item of refcount block is NULL, free refcount block and reset the > > corresponding item of refcount table with NULL. > > > > Signed-off-by: Jun Li > > The co

Re: [Qemu-devel] [PATCH v2] qcow2: add update refcount table realization for update_refcount

2014-09-01 Thread Jun Li
On Mon, 09/01 13:11, Benoît Canet wrote: > The Monday 01 Sep 2014 à 18:52:48 (+0800), Jun Li wrote : > > When every item of refcount block is NULL, free refcount block and reset the > > corresponding item of refcount table with NULL. > > > > Signed-off-by: Jun Li

Re: [Qemu-devel] [PATCH] qcow2: add update refcount table realization for update_refcount

2014-09-01 Thread Jun Li
Please ignore it. You could review v2 of this patch directly. Thx. On Mon, 09/01 01:22, Jun Li wrote: > When every item of refcount block is NULL, free refcount block and reset the > corresponding item of refcount table with NULL. > > Signed-off-by: Jun Li > --- > block/qco

[Qemu-devel] [PATCH v2] qcow2: add update refcount table realization for update_refcount

2014-09-01 Thread Jun Li
When every item of refcount block is NULL, free refcount block and reset the corresponding item of refcount table with NULL. Signed-off-by: Jun Li --- The v2 do following change to modify some potential issue. +--- Here should start from "0". | for

[Qemu-devel] [PATCH] qcow2: add update refcount table realization for update_refcount

2014-08-31 Thread Jun Li
When every item of refcount block is NULL, free refcount block and reset the corresponding item of refcount table with NULL. Signed-off-by: Jun Li --- block/qcow2-refcount.c | 31 +++ 1 file changed, 31 insertions(+) diff --git a/block/qcow2-refcount.c b/block/qcow2

Re: [Qemu-devel] [PATCH v2] qcow2: Add bdrv_discard support

2014-08-24 Thread Jun Li
rd can not release the free cluster on host. Best Regards, Jun Li

Re: [Qemu-devel] [PATCH v3] snapshot: fixed bdrv_get_full_backing_filename can not get correct full_backing_filename

2014-05-25 Thread Jun Li
please ignore this one. On 05/18/2014 06:34 PM, Jun Li wrote: On 05/12/2014 11:15 PM, Eric Blake wrote: On 05/10/2014 10:35 AM, Jun Li wrote: From: Jun Li I see three different "[PATCH v3]" mails with this subject. To make sure we are reviewing the right version, it might help

Re: [Qemu-devel] [PATCH v3] snapshot: fixed bdrv_get_full_backing_filename can not get correct full_backing_filename

2014-05-25 Thread Jun Li
On 05/12/2014 11:15 PM, Eric Blake wrote: On 05/10/2014 10:35 AM, Jun Li wrote: From: Jun Li I see three different "[PATCH v3]" mails with this subject. To make sure we are reviewing the right version, it might help to bump to version 4. Yes, I have send v4 of this patch and c

Re: [Qemu-devel] [PATCH v3] Add remove_boot_device_path() function for hot-unplug device

2014-05-22 Thread Jun Li
On 05/21/2014 04:13 PM, Andreas Färber wrote: Am 19.05.2014 17:57, schrieb Michael S. Tsirkin: On Mon, May 19, 2014 at 05:31:43PM +0200, Andreas Färber wrote: Hi, Am 19.05.2014 17:03, schrieb Jun Li: Add remove_boot_device_path() function to remove bootindex when hot-unplug a device. This

[Qemu-devel] [PATCH v4] Add remove_boot_device_path() function for hot-unplug device

2014-05-21 Thread Jun Li
Add remove_boot_device_path() function to remove bootindex when hot-unplug a device. Signed-off-by: Jun Li --- hw/block/virtio-blk.c| 1 + hw/i386/kvm/pci-assign.c | 1 + hw/misc/vfio.c | 1 + hw/net/e1000.c | 1 + hw/net/eepro100.c| 1 + hw/net/ne2000.c

Re: [Qemu-devel] [PATCH v3] Add remove_boot_device_path() function for hot-unplug device

2014-05-21 Thread Jun Li
Hi Andreas, On 05/19/2014 11:31 PM, Andreas Färber wrote: Hi, Am 19.05.2014 17:03, schrieb Jun Li: Add remove_boot_device_path() function to remove bootindex when hot-unplug a device. This patch fixed virtio-blk/virtio-net/scsi-disk/scsi-generic device. Signed-off-by: Jun Li --- This patch

[Qemu-devel] [PATCH v3] Add remove_boot_device_path() function for hot-unplug device

2014-05-19 Thread Jun Li
Add remove_boot_device_path() function to remove bootindex when hot-unplug a device. This patch fixed virtio-blk/virtio-net/scsi-disk/scsi-generic device. Signed-off-by: Jun Li --- This patch also fixed bug1086603, ref: https://bugzilla.redhat.com/show_bug.cgi?id=1086603 This version of patch

Re: [Qemu-devel] [PATCH v2] Add remove_boot_device_path() function for hot-unplug device

2014-05-19 Thread Jun Li
On 05/19/2014 03:18 PM, Markus Armbruster wrote: Jun Li writes: On 05/15/2014 11:07 PM, Michael S. Tsirkin wrote: On Wed, Apr 16, 2014 at 10:20:57PM +0800, Jun Li wrote: [...] diff --git a/vl.c b/vl.c index 9975e5a..1713c68 100644 --- a/vl.c +++ b/vl.c @@ -1184,6 +1184,22 @@ void

Re: [Qemu-devel] [PATCH v3] snapshot: fixed bdrv_get_full_backing_filename can not get correct full_backing_filename

2014-05-18 Thread Jun Li
On 05/12/2014 11:15 PM, Eric Blake wrote: On 05/10/2014 10:35 AM, Jun Li wrote: From: Jun Li I see three different "[PATCH v3]" mails with this subject. To make sure we are reviewing the right version, it might help to bump to version 4. Yes, I have send v4 of this patch and c

[Qemu-devel] [PATCH v4] snapshot: fixed bdrv_get_full_backing_filename can not get correct full_backing_filename

2014-05-18 Thread Jun Li
orrect path for $BASE_IMG. In this patch, will check the backing_filename is a symlink or not firstly, then return the full(absolute) path via realpath. Signed-off-by: Jun Li --- This is v4 of the patch. This version is the same with v3. Only difference is the commit description. What does this

Re: [Qemu-devel] [PATCH v4] snapshot: fixed bdrv_get_full_backing_filename can not get correct full_backing_filename

2014-05-18 Thread Jun Li
please ignore this one. On 05/18/2014 05:01 PM, Jun Li wrote: This patch fixed bdrv_get_full_backing_filename can not calculate the correct full path name for backing_file via path_combine. Such as: create a snapshot chain: $BASE_IMG<-sn1<-sn2 backing file is : /home/wookpecker/img.qco

[Qemu-devel] [PATCH v4] snapshot: fixed bdrv_get_full_backing_filename can not get correct full_backing_filename

2014-05-18 Thread Jun Li
2 when create sn2, path_combine can not got a correct path for $BASE_IMG. In this patch, will check the backing_filename is a symlink or not firstly, then return the full(absolute) path via realpath. Signed-off-by: Jun Li --- This is v4 of the patch. This version is the same with v3. Only differe

Re: [Qemu-devel] [PATCH v2] qcow2: Patch for shrinking qcow2 disk image

2014-05-17 Thread Jun Li
On 05/15/2014 08:36 AM, Max Reitz wrote: On 09.05.2014 17:20, Jun Li wrote: As the realization of raw shrinking, so when do qcow2 shrinking, do not *when doing check l1 entries. When resize to size1(size1 < "disk size"), the custemer *customer Sorry ~ :-) knows this wil

Re: [Qemu-devel] [PATCH v3] snapshot: fixed bdrv_get_full_backing_filename can not get correct full_backing_filename

2014-05-17 Thread Jun Li
On 05/14/2014 09:05 PM, Fam Zheng wrote: On Wed, 05/14 14:40, Stefan Hajnoczi wrote: On Sun, May 11, 2014 at 12:35:57AM +0800, Jun Li wrote: From: Jun Li This patch fixed the following bug: https://bugzilla.redhat.com/show_bug.cgi?id=1084302 . path_combine can not calculate the correct

Re: [Qemu-devel] [PATCH v2] Add remove_boot_device_path() function for hot-unplug device

2014-05-17 Thread Jun Li
On 05/15/2014 11:07 PM, Michael S. Tsirkin wrote: On Wed, Apr 16, 2014 at 10:20:57PM +0800, Jun Li wrote: Add remove_boot_device_path() function to remove bootindex when hot-unplug a device. This patch fixed virtio-blk/virtio-net/scsi-disk/scsi-generic device. So it has fixed bug1086603, ref

Re: [Qemu-devel] [PATCH v2] Add remove_boot_device_path() function for hot-unplug device

2014-05-12 Thread Jun Li
On 05/11/2014 05:17 PM, Marcel Apfelbaum wrote: On Sun, 2014-05-11 at 11:07 +0800, lijun wrote: On 04/22/2014 05:21 PM, Marcel Apfelbaum wrote: On Wed, 2014-04-16 at 22:20 +0800, Jun Li wrote: Add remove_boot_device_path() function to remove bootindex when hot-unplug a device. This patch

[Qemu-devel] [PATCH v3] snapshot: fixed bdrv_get_full_backing_filename can not get correct full_backing_filename

2014-05-10 Thread Jun Li
mp/sn1 sn2 : /home/woodpecker/tmp/sn2 when create sn2, path_combine can not got a correct path for $BASE_IMG. In this patch, will check the backing_filename is a symlink or not firstly, then return the full(absolute) path via realpath. Signed-off-by: Jun Li --- block.c | 18 +-

[Qemu-devel] [PATCH v3] snapshot: fixed bdrv_get_full_backing_filename can not get correct full_backing_filename

2014-05-10 Thread Jun Li
From: Jun Li This patch fixed the following bug: https://bugzilla.redhat.com/show_bug.cgi?id=1084302 . path_combine can not calculate the correct full path name for backing_file. Such as: create a snapshot chain: sn2->sn1->$BASE_IMG backing file is : /home/wookpecker/img.qcow2 sn1 :

[Qemu-devel] [PATCH v3] snapshot: fixed bdrv_get_full_backing_filename can not get correct full_backing_filename

2014-05-10 Thread Jun Li
mp/sn1 sn2 : /home/woodpecker/tmp/sn2 when create sn2, path_combine can not got a correct path for $BASE_IMG. In this patch, will check the backing_filename is a symlink or not firstly, then return the full(absolute) path via realpath. Signed-off-by: Jun Li --- block.c | 18 +-

[Qemu-devel] [PATCH v2] qcow2: Patch for shrinking qcow2 disk image

2014-05-09 Thread Jun Li
As the realization of raw shrinking, so when do qcow2 shrinking, do not check l1 entries. When resize to size1(size1 < "disk size"), the custemer knows this will destory the data. So no need to check the l1 entries which is used or not. This is v2 of the original patch. thx. Signe

[Qemu-devel] [PATCH] blockdev: insert blockdev into QemuOptsList when hotplug via blockdev-add

2014-04-20 Thread Jun Li
QemuOptsList. Signed-off-by: Jun Li --- blockdev.c | 16 1 file changed, 16 insertions(+) diff --git a/blockdev.c b/blockdev.c index 5dd01ea..b4d63e0 100644 --- a/blockdev.c +++ b/blockdev.c @@ -2270,10 +2270,13 @@ void qmp_block_job_complete(const char *device, Error **errp) void

[Qemu-devel] [PATCH] blockdev: insert blockdev into QemuOptsList when hotplug via blockdev-add

2014-04-20 Thread Jun Li
QemuOptsList. Signed-off-by: Jun Li --- blockdev.c | 16 1 file changed, 16 insertions(+) diff --git a/blockdev.c b/blockdev.c index 5dd01ea..b4d63e0 100644 --- a/blockdev.c +++ b/blockdev.c @@ -2270,10 +2270,13 @@ void qmp_block_job_complete(const char *device, Error **errp) void

[Qemu-devel] [PATCH v2] Add remove_boot_device_path() function for hot-unplug device

2014-04-16 Thread Jun Li
stion. Signed-off-by: Jun Li --- hw/block/virtio-blk.c | 1 + hw/net/virtio-net.c | 1 + hw/scsi/scsi-disk.c | 6 -- hw/scsi/scsi-generic.c | 3 +++ include/sysemu/sysemu.h | 2 ++ vl.c| 16 6 files changed, 27 insertions(+), 2 deletions(-)

[Qemu-devel] [PATCH] Add remove_boot_device_path() function for hot-unplug device

2014-04-13 Thread Jun Li
Add remove_boot_device_path() function to remove bootindex when hot-unplug a device. This patch fixed virtio-blk/virtio-net/scsi-disk/scsi-generic device. So it has fixed bug1086603, ref: https://bugzilla.redhat.com/show_bug.cgi?id=1086603 Signed-off-by: Jun Li --- hw/block/virtio-blk.c | 1

[Qemu-devel] [PATCH] Re: snapshot: fixed bdrv_get_full_backing_filename can not get correct full_backing_filename

2014-04-09 Thread Jun Li
g not coverd, please give me more suggestions. Thx. Signed-off-by: Jun Li --- block.c | 18 +- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/block.c b/block.c index 990a754..8566b75 100644 --- a/block.c +++ b/block.c @@ -304,10 +304,26 @@ void path_combine(char

[Qemu-devel] [PATCH] snapshot: fixed bdrv_get_full_backing_filename can not get correct full_backing_filename

2014-04-05 Thread Jun Li
mp/sn1 sn2 : /home/woodpecker/tmp/sn2 when create sn2, path_combine can not got a correct path for $BASE_IMG. Signed-off-by: Jun Li --- block.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block.c b/block.c index 990a754..2519f68 100644 --- a/block.c +++ b/block.c @@ -307,7

[Qemu-devel] [PATCH] snapshot: fixed bdrv_get_full_backing_filename can not get correct full_backing_filename

2014-04-05 Thread Jun Li
mp/sn1 sn2 : /home/woodpecker/tmp/sn2 when create sn2, path_combine can not got a correct path for $BASE_IMG. Signed-off-by: Jun Li --- block.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block.c b/block.c index 990a754..2519f68 100644 --- a/block.c +++ b/block.c @@ -307,7

[Qemu-devel] [PATCH] Re: [PATCH] qcow2: Patch for shrinking qcow2 disk image

2014-04-04 Thread Jun Li
t; > "virtual size". As this, when do qcow2 shrinking, we should to discard the unused clusters(reduce the refcount of the unused clusters, release these clusters). This is the update patch. thx. Signed-off-by: Jun Li --- block/qcow2-cluster.c | 16 +++- block/qco

[Qemu-devel] [PATCH] Re: [PATCH] qcow2: Patch for shrinking qcow2 disk image

2014-04-04 Thread Jun Li
t; > "virtual size". As this, when do qcow2 shrinking, we should to discard the unused clusters(reduce the refcount of the unused clusters, release these clusters). This is the update patch. thx. Signed-off-by: Jun Li --- block/qcow2-cluster.c | 16 +++- block/qco

[Qemu-devel] [PATCH] Patch for shrinking qcow2 disk image

2014-04-02 Thread Jun Li
Signed-off-by: Jun Li This patch can make sure the data still existing after shrinking. And only discard the unused (guest) clusters. If shrinking to the size which stored data, It will return an error and will not do any change. As this patch can support shrinking, so changed the func name of

[Qemu-devel] [PATCH] Patch for shrinking qcow2 disk image

2014-04-02 Thread Jun Li
Signed-off-by: Jun Li This patch can make sure the data still existing after shrinking. And only discard the unused (guest) clusters. If shrinking to the size which stored data, It will return an error and will not do any change. As this patch can support shrinking, so changed the func name of

[Qemu-devel] [PATCH] qcow2: Patch for shrinking qcow2 disk image

2014-04-02 Thread Jun Li
Signed-off-by: Jun Li This patch can make sure the data still existing after shrinking. And only discard the unused (guest) clusters. If shrinking to the size which stored data, It will return an error and will not do any change. As this patch can support shrinking, so changed the func name of

[Qemu-devel] [PATCH] qcow2: Patch for shrinking qcow2 disk image

2014-04-02 Thread Jun Li
Signed-off-by: Jun Li This patch can make sure the data still existing after shrinking. And only discard the unused (guest) clusters. If shrinking to the size which stored data, It will return an error and will not do any change. As this patch can support shrinking, so changed the func name of

[Qemu-devel] [PATCH] Patch for shrinking qcow2 disk image

2014-04-02 Thread Jun Li
Signed-off-by: Jun Li This patch can make sure the data still existing after shrinking. And only discard the unused (guest) clusters. If shrinking to the size which stored data, It will return an error and will not do any change. As this patch can support shrinking, so changed the func name of

[Qemu-devel] [PATCH] qcow2: Patch for shrinking qcow2 disk image

2014-04-01 Thread Jun Li
Signed-off-by: Jun Li This patch can make sure the data still existing after shrinking. And only discard the unused (guest) clusters. If shrinking to the size which stored data, It will return an error and will not do any change. As this patch can support shrinking, so changed the func name

[Qemu-devel] [PATCH] Modify qemu-img can not create local filename contain ":"

2014-03-03 Thread Jun Li
://server.domain.com:24007/testvol/dir/a.img file=gluster+rdma://1.2.3.4:24007/testvol/a.img So if only the path contain "://", the path maybe contain a protocol. So use strstr() to replace func strcspn(). Signed-off-by: Jun Li --- block.c | 6 +++--- 1 file changed, 3 insertions(+), 3