Re: [Qemu-devel] qcow2 lock

2019-09-09 Thread Vladimir Sementsov-Ogievskiy
09.09.2019 15:57, Kevin Wolf wrote: > Am 09.09.2019 um 14:16 hat Vladimir Sementsov-Ogievskiy geschrieben: >> 09.09.2019 13:47, Kevin Wolf wrote: >>> Am 09.09.2019 um 12:13 hat Vladimir Sementsov-Ogievskiy geschrieben: Hi! I have a (may be stupid) question: what is BDRVQcow2State.loc

Re: [Qemu-devel] qcow2 lock

2019-09-09 Thread Kevin Wolf
Am 09.09.2019 um 14:16 hat Vladimir Sementsov-Ogievskiy geschrieben: > 09.09.2019 13:47, Kevin Wolf wrote: > > Am 09.09.2019 um 12:13 hat Vladimir Sementsov-Ogievskiy geschrieben: > >> Hi! > >> > >> I have a (may be stupid) question: what is BDRVQcow2State.lock for and > >> when should it be locke

Re: [Qemu-devel] qcow2 lock

2019-09-09 Thread Vladimir Sementsov-Ogievskiy
09.09.2019 13:47, Kevin Wolf wrote: > Am 09.09.2019 um 12:13 hat Vladimir Sementsov-Ogievskiy geschrieben: >> Hi! >> >> I have a (may be stupid) question: what is BDRVQcow2State.lock for and when >> should it be locked? >> >> >> I faced SIGSEGV here: >> >> #0 qcow2_process_discards (bs=bs@entry=0

Re: [Qemu-devel] qcow2 lock

2019-09-09 Thread Vladimir Sementsov-Ogievskiy
09.09.2019 13:47, Kevin Wolf wrote: > Am 09.09.2019 um 12:13 hat Vladimir Sementsov-Ogievskiy geschrieben: >> Hi! >> >> I have a (may be stupid) question: what is BDRVQcow2State.lock for and when >> should it be locked? >> >> >> I faced SIGSEGV here: >> >> #0 qcow2_process_discards (bs=bs@entry=0

Re: [Qemu-devel] qcow2 lock

2019-09-09 Thread Kevin Wolf
Am 09.09.2019 um 12:13 hat Vladimir Sementsov-Ogievskiy geschrieben: > Hi! > > I have a (may be stupid) question: what is BDRVQcow2State.lock for and when > should it be locked? > > > I faced SIGSEGV here: > > #0 qcow2_process_discards (bs=bs@entry=0x564b93bc8000, ret=ret@entry=0) at > block

[Qemu-devel] qcow2 lock

2019-09-09 Thread Vladimir Sementsov-Ogievskiy
Hi! I have a (may be stupid) question: what is BDRVQcow2State.lock for and when should it be locked? I faced SIGSEGV here: #0 qcow2_process_discards (bs=bs@entry=0x564b93bc8000, ret=ret@entry=0) at block/qcow2-refcount.c:737 #1 0x564b90e9f15f in qcow2_cluster_discard (bs=bs@entry=0x564b

[Qemu-devel] qcow2 and rbd driver question

2019-04-01 Thread Stefano Garzarella
Hi Kevin, I'm working on an issue where I'm not able to create a qcow2 image with the rbd driver (https://bugzilla.redhat.com/show_bug.cgi?id=1171007). What I found is the following: - when qcow2 uses the rbd driver, the new file is created (rbd_create) with the size equals to 0. (qemu_opt_get_s

[Qemu-devel] qcow2 performance improve [discuss]

2018-07-27 Thread yang.bin18
When use cluster_size=1M qcow2 newly created to test "32k rand write" in the VM,We get low performance within VM。But there are huge “write” requests in HOST which falls into qemu stack of"perform_cow". We found three scene to use cow. 1. write cluster have snapshot

Re: [Qemu-devel] qcow2 autoloading bitmaps

2018-01-16 Thread Vladimir Sementsov-Ogievskiy
16.01.2018 00:26, John Snow wrote: On 01/11/2018 10:15 AM, Vladimir Sementsov-Ogievskiy wrote: 11.01.2018 17:43, Eric Blake wrote: On 01/11/2018 08:26 AM, Vladimir Sementsov-Ogievskiy wrote: # @autoload: the bitmap will be automatically loaded when the image it is stored #    in is o

Re: [Qemu-devel] qcow2 autoloading bitmaps

2018-01-15 Thread John Snow
On 01/11/2018 10:15 AM, Vladimir Sementsov-Ogievskiy wrote: > 11.01.2018 17:43, Eric Blake wrote: >> On 01/11/2018 08:26 AM, Vladimir Sementsov-Ogievskiy wrote: >> >>> # @autoload: the bitmap will be automatically loaded when the image it >>> is stored >>> #    in is opened. This flag may

Re: [Qemu-devel] qcow2 autoloading bitmaps

2018-01-11 Thread Vladimir Sementsov-Ogievskiy
11.01.2018 17:43, Eric Blake wrote: On 01/11/2018 08:26 AM, Vladimir Sementsov-Ogievskiy wrote: # @autoload: the bitmap will be automatically loaded when the image it is stored #    in is opened. This flag may only be specified for persistent #    bitmaps. Default is false for b

Re: [Qemu-devel] qcow2 autoloading bitmaps

2018-01-11 Thread Eric Blake
On 01/11/2018 08:26 AM, Vladimir Sementsov-Ogievskiy wrote: > # @autoload: the bitmap will be automatically loaded when the image it > is stored > #    in is opened. This flag may only be specified for persistent > #    bitmaps. Default is false for block-dirty-bitmap-add. > (Since

[Qemu-devel] qcow2 autoloading bitmaps

2018-01-11 Thread Vladimir Sementsov-Ogievskiy
Hi all! I've just noted that there is an unfortunate contradiction between qcow2 spec and qapi. In qcow2 we have: 1: auto  The bitmap must reflect all changes of the virtual  disk by any application that would write to this qcow2  file (including writes, snapshot switching, etc.). The  type of

Re: [Qemu-devel] qcow2 not cleaning up during image create failure

2017-07-14 Thread Eric Blake
On 07/14/2017 06:57 AM, Fam Zheng wrote: > On Fri, 07/14 12:00, Daniel P. Berrange wrote: >> I've just been looking at the qcow2 image creation code, and found that >> if any method in qcow2_create2() returns an error, then we'll report that, >> but leave the newly created image file on disk in som

Re: [Qemu-devel] qcow2 not cleaning up during image create failure

2017-07-14 Thread Daniel P. Berrange
On Fri, Jul 14, 2017 at 07:57:43PM +0800, Fam Zheng wrote: > On Fri, 07/14 12:00, Daniel P. Berrange wrote: > > I've just been looking at the qcow2 image creation code, and found that > > if any method in qcow2_create2() returns an error, then we'll report that, > > but leave the newly created imag

Re: [Qemu-devel] qcow2 not cleaning up during image create failure

2017-07-14 Thread Fam Zheng
On Fri, 07/14 12:00, Daniel P. Berrange wrote: > I've just been looking at the qcow2 image creation code, and found that > if any method in qcow2_create2() returns an error, then we'll report that, > but leave the newly created image file on disk in some partially initialized > state. A user may un

[Qemu-devel] qcow2 not cleaning up during image create failure

2017-07-14 Thread Daniel P. Berrange
I've just been looking at the qcow2 image creation code, and found that if any method in qcow2_create2() returns an error, then we'll report that, but leave the newly created image file on disk in some partially initialized state. A user may unwittingly use this file later with undefined behaviour.

Re: [Qemu-devel] QCOW2 support for LZO compression

2017-06-26 Thread Laszlo Ersek
On 06/26/17 22:30, Denis V. Lunev wrote: > 3. > > _zstd is multi-threaded, and it’s dangerous_ > > libzstd is single-threaded. > There is a multi-thread extension, which is enabled in the CLI, but not > in the library. > There is also an experimental target which makes it possible to produc

Re: [Qemu-devel] QCOW2 support for LZO compression

2017-06-26 Thread Denis V. Lunev
On 06/26/2017 11:54 PM, Peter Lieven wrote: > >> Am 26.06.2017 um 22:30 schrieb Denis V. Lunev : >> >>> On 06/26/2017 11:28 AM, Kevin Wolf wrote: >>> [ Cc: qemu-devel; don't post to qemu-block only! ] >>> >>> Am 26.06.2017 um 09:57 hat Peter Lieven geschrieben: Hi, I am currently wor

Re: [Qemu-devel] QCOW2 support for LZO compression

2017-06-26 Thread Peter Lieven
> Am 26.06.2017 um 22:30 schrieb Denis V. Lunev : > >> On 06/26/2017 11:28 AM, Kevin Wolf wrote: >> [ Cc: qemu-devel; don't post to qemu-block only! ] >> >> Am 26.06.2017 um 09:57 hat Peter Lieven geschrieben: >>> Hi, >>> >>> I am currently working on optimizing speed for compressed QCOW2 >>>

Re: [Qemu-devel] QCOW2 support for LZO compression

2017-06-26 Thread Denis V. Lunev
On 06/26/2017 11:28 AM, Kevin Wolf wrote: > [ Cc: qemu-devel; don't post to qemu-block only! ] > > Am 26.06.2017 um 09:57 hat Peter Lieven geschrieben: >> Hi, >> >> I am currently working on optimizing speed for compressed QCOW2 >> images. We use them for templates and would also like to use them f

Re: [Qemu-devel] QCOW2 support for LZO compression

2017-06-26 Thread Richard W.M. Jones
On Mon, Jun 26, 2017 at 12:12:05PM +0100, Daniel P. Berrange wrote: > On Mon, Jun 26, 2017 at 10:28:38AM +0200, Kevin Wolf wrote: > > [ Cc: qemu-devel; don't post to qemu-block only! ] > > > > Am 26.06.2017 um 09:57 hat Peter Lieven geschrieben: > > > Hi, > > > > > > I am currently working on opt

Re: [Qemu-devel] QCOW2 support for LZO compression

2017-06-26 Thread Peter Lieven
Am 26.06.2017 um 13:21 schrieb Kevin Wolf: Am 26.06.2017 um 12:08 hat Peter Lieven geschrieben: Am 26.06.2017 um 11:57 schrieb Kevin Wolf: Am 26.06.2017 um 11:20 hat Peter Lieven geschrieben: So he chose a different algorithm (zstd). When I asked, he posted a comparison of algorithms (however

Re: [Qemu-devel] QCOW2 support for LZO compression

2017-06-26 Thread Kevin Wolf
Am 26.06.2017 um 12:08 hat Peter Lieven geschrieben: > Am 26.06.2017 um 11:57 schrieb Kevin Wolf: > >Am 26.06.2017 um 11:20 hat Peter Lieven geschrieben: > >>>So he chose a different algorithm (zstd). When I asked, he posted a > >>>comparison of algorithms (however a generic one and not measured in

Re: [Qemu-devel] QCOW2 support for LZO compression

2017-06-26 Thread Daniel P. Berrange
On Mon, Jun 26, 2017 at 10:28:38AM +0200, Kevin Wolf wrote: > [ Cc: qemu-devel; don't post to qemu-block only! ] > > Am 26.06.2017 um 09:57 hat Peter Lieven geschrieben: > > Hi, > > > > I am currently working on optimizing speed for compressed QCOW2 > > images. We use them for templates and would

Re: [Qemu-devel] QCOW2 support for LZO compression

2017-06-26 Thread Peter Lieven
Am 26.06.2017 um 12:16 schrieb Laszlo Ersek: On 06/26/17 11:33, Denis V. Lunev wrote: On 06/26/2017 12:20 PM, Peter Lieven wrote: Am 26.06.2017 um 10:28 schrieb Kevin Wolf: [ Cc: qemu-devel; don't post to qemu-block only! ] Am 26.06.2017 um 09:57 hat Peter Lieven geschrieben: Hi, I am curre

Re: [Qemu-devel] QCOW2 support for LZO compression

2017-06-26 Thread Denis V. Lunev
On 06/26/2017 01:16 PM, Laszlo Ersek wrote: > On 06/26/17 11:33, Denis V. Lunev wrote: >> On 06/26/2017 12:20 PM, Peter Lieven wrote: >>> Am 26.06.2017 um 10:28 schrieb Kevin Wolf: [ Cc: qemu-devel; don't post to qemu-block only! ] Am 26.06.2017 um 09:57 hat Peter Lieven geschrieben:

Re: [Qemu-devel] QCOW2 support for LZO compression

2017-06-26 Thread Peter Lieven
Am 26.06.2017 um 12:15 schrieb Denis V. Lunev: On 06/26/2017 01:04 PM, Daniel P. Berrange wrote: On Mon, Jun 26, 2017 at 11:20:33AM +0200, Peter Lieven wrote: Am 26.06.2017 um 10:28 schrieb Kevin Wolf: [ Cc: qemu-devel; don't post to qemu-block only! ] Am 26.06.2017 um 09:57 hat Peter Lieven

Re: [Qemu-devel] QCOW2 support for LZO compression

2017-06-26 Thread Peter Lieven
Am 26.06.2017 um 12:12 schrieb Daniel P. Berrange: On Mon, Jun 26, 2017 at 12:08:01PM +0200, Peter Lieven wrote: Am 26.06.2017 um 11:57 schrieb Kevin Wolf: Am 26.06.2017 um 11:20 hat Peter Lieven geschrieben: So he chose a different algorithm (zstd). When I asked, he posted a comparison of alg

Re: [Qemu-devel] QCOW2 support for LZO compression

2017-06-26 Thread Laszlo Ersek
On 06/26/17 11:33, Denis V. Lunev wrote: > On 06/26/2017 12:20 PM, Peter Lieven wrote: >> >> Am 26.06.2017 um 10:28 schrieb Kevin Wolf: >>> [ Cc: qemu-devel; don't post to qemu-block only! ] >>> >>> Am 26.06.2017 um 09:57 hat Peter Lieven geschrieben: Hi, I am currently working on op

Re: [Qemu-devel] QCOW2 support for LZO compression

2017-06-26 Thread Denis V. Lunev
On 06/26/2017 01:04 PM, Daniel P. Berrange wrote: > On Mon, Jun 26, 2017 at 11:20:33AM +0200, Peter Lieven wrote: >> Am 26.06.2017 um 10:28 schrieb Kevin Wolf: >>> [ Cc: qemu-devel; don't post to qemu-block only! ] >>> >>> Am 26.06.2017 um 09:57 hat Peter Lieven geschrieben: Hi, I am

Re: [Qemu-devel] QCOW2 support for LZO compression

2017-06-26 Thread Daniel P. Berrange
On Mon, Jun 26, 2017 at 12:08:01PM +0200, Peter Lieven wrote: > Am 26.06.2017 um 11:57 schrieb Kevin Wolf: > > Am 26.06.2017 um 11:20 hat Peter Lieven geschrieben: > > > > So he chose a different algorithm (zstd). When I asked, he posted a > > > > comparison of algorithms (however a generic one and

Re: [Qemu-devel] QCOW2 support for LZO compression

2017-06-26 Thread Peter Lieven
Am 26.06.2017 um 11:57 schrieb Kevin Wolf: Am 26.06.2017 um 11:20 hat Peter Lieven geschrieben: So he chose a different algorithm (zstd). When I asked, he posted a comparison of algorithms (however a generic one and not measured in the context of qemu) that suggests that LZO would be slightly fa

Re: [Qemu-devel] QCOW2 support for LZO compression

2017-06-26 Thread Daniel P. Berrange
On Mon, Jun 26, 2017 at 11:20:33AM +0200, Peter Lieven wrote: > > Am 26.06.2017 um 10:28 schrieb Kevin Wolf: > > [ Cc: qemu-devel; don't post to qemu-block only! ] > > > > Am 26.06.2017 um 09:57 hat Peter Lieven geschrieben: > > > Hi, > > > > > > I am currently working on optimizing speed for co

Re: [Qemu-devel] QCOW2 support for LZO compression

2017-06-26 Thread Kevin Wolf
Am 26.06.2017 um 11:20 hat Peter Lieven geschrieben: > >So he chose a different algorithm (zstd). When I asked, he posted a > >comparison of algorithms (however a generic one and not measured in the > >context of qemu) that suggests that LZO would be slightly faster, but > >have a considerable wors

Re: [Qemu-devel] QCOW2 support for LZO compression

2017-06-26 Thread Peter Lieven
Am 26.06.2017 um 11:33 schrieb Denis V. Lunev: On 06/26/2017 12:20 PM, Peter Lieven wrote: Am 26.06.2017 um 10:28 schrieb Kevin Wolf: [ Cc: qemu-devel; don't post to qemu-block only! ] Am 26.06.2017 um 09:57 hat Peter Lieven geschrieben: Hi, I am currently working on optimizing speed for com

Re: [Qemu-devel] QCOW2 support for LZO compression

2017-06-26 Thread Denis V. Lunev
On 06/26/2017 12:20 PM, Peter Lieven wrote: > > Am 26.06.2017 um 10:28 schrieb Kevin Wolf: >> [ Cc: qemu-devel; don't post to qemu-block only! ] >> >> Am 26.06.2017 um 09:57 hat Peter Lieven geschrieben: >>> Hi, >>> >>> I am currently working on optimizing speed for compressed QCOW2 >>> images. We

Re: [Qemu-devel] QCOW2 support for LZO compression

2017-06-26 Thread Peter Lieven
Am 26.06.2017 um 10:28 schrieb Kevin Wolf: [ Cc: qemu-devel; don't post to qemu-block only! ] Am 26.06.2017 um 09:57 hat Peter Lieven geschrieben: Hi, I am currently working on optimizing speed for compressed QCOW2 images. We use them for templates and would also like to use them for backups,

Re: [Qemu-devel] QCOW2 support for LZO compression

2017-06-26 Thread Kevin Wolf
[ Cc: qemu-devel; don't post to qemu-block only! ] Am 26.06.2017 um 09:57 hat Peter Lieven geschrieben: > Hi, > > I am currently working on optimizing speed for compressed QCOW2 > images. We use them for templates and would also like to use them for > backups, but the latter is almost infeasible

Re: [Qemu-devel] [qcow2] how to avoid qemu doing lseek(SEEK_DATA/SEEK_HOLE)?

2017-02-08 Thread Stephane Chazelas
2017-02-08 15:27:11 +0100, Max Reitz: [...] > A bit of a stupid question, but: How is your performance when using > detect-zeroes=off? [...] I did try that. See: } Note that passing detect-zeroes=off or detect-zeroes=unmap (with } discard) doesn't help (even though FALLOC_FL_PUNCH_HOLE is } suppo

Re: [Qemu-devel] [qcow2] how to avoid qemu doing lseek(SEEK_DATA/SEEK_HOLE)?

2017-02-08 Thread Max Reitz
On 08.02.2017 15:06, Stephane Chazelas wrote: > 2017-02-08 00:43:18 +0100, Max Reitz: > [...] >> OTOH, it may make sense to offer a way for the user to disable >> lseek(SEEK_{DATA,HOLE}) in our "file" block driver. That way your issue >> would be solved, too, I guess. I'll look into it. > [...] >

Re: [Qemu-devel] [qcow2] how to avoid qemu doing lseek(SEEK_DATA/SEEK_HOLE)?

2017-02-08 Thread Stephane Chazelas
2017-02-08 00:43:18 +0100, Max Reitz: [...] > Therefore, the patch as it is makes sense. The fact that said lseek() is > slow on ZFS is (in my humble opinion) the ZFS driver's problem that > needs to be fixed there. [...] For the record, I've mentioned the qemu performance implication at https://g

Re: [Qemu-devel] [qcow2] how to avoid qemu doing lseek(SEEK_DATA/SEEK_HOLE)?

2017-02-08 Thread Stephane Chazelas
2017-02-08 00:43:18 +0100, Max Reitz: [...] > OTOH, it may make sense to offer a way for the user to disable > lseek(SEEK_{DATA,HOLE}) in our "file" block driver. That way your issue > would be solved, too, I guess. I'll look into it. [...] Thanks Max, Yes, that would work for me and other users

Re: [Qemu-devel] [qcow2] how to avoid qemu doing lseek(SEEK_DATA/SEEK_HOLE)?

2017-02-07 Thread Max Reitz
Hi, I've been thinking about the issue but I'm not sure I've come to a resolution you'll like much. I'm not really in favor of optimizing code for ZFS, especially if that means worse code for every other case. I think it very much makes sense to assume that lseek(SEEK_{DATA,HOLE}) is faster than

Re: [Qemu-devel] [qcow2] how to avoid qemu doing lseek(SEEK_DATA/SEEK_HOLE)?

2017-02-02 Thread Stephane Chazelas
2017-02-02 16:23:53 +0100, Laszlo Ersek: [...] > You didn't mention what qcow2 features you use -- vmstate, snapshots, > backing files (chains of them), compression? > > Since commit 2928abce6d1d only modifies "block/qcow2.c", you could > switch / convert the images to "raw". "raw" still benefits

Re: [Qemu-devel] [qcow2] how to avoid qemu doing lseek(SEEK_DATA/SEEK_HOLE)?

2017-02-02 Thread Laszlo Ersek
On 02/02/17 13:30, Stephane Chazelas wrote: > Hello, > > since qemu-2.7.0, doing synchronised I/O in a VM (tested with > Ubuntu 16.04 amd64 VM) while the disk is backed by a qcow2 > file sitting on a ZFS filesystem (zfs on Linux on Debian jessie > (PVE)), the performances are dreadful: > > # tim

[Qemu-devel] [qcow2] how to avoid qemu doing lseek(SEEK_DATA/SEEK_HOLE)?

2017-02-02 Thread Stephane Chazelas
Hello, since qemu-2.7.0, doing synchronised I/O in a VM (tested with Ubuntu 16.04 amd64 VM) while the disk is backed by a qcow2 file sitting on a ZFS filesystem (zfs on Linux on Debian jessie (PVE)), the performances are dreadful: # time dd if=/dev/zero count=1000 of=b oflag=dsync 1000+0 record

Re: [Qemu-devel] qcow2 resize with snapshots

2016-05-17 Thread Kevin Wolf
Am 16.05.2016 um 08:33 hat zhangzhiming geschrieben: > hi, i read some source code by your tips, and i have some conclusions: > > 1. Old version of QCOW2 image does not store the total size of snapshot, so, > we > can’t > add the function to the old version of QEMU, and the function of QCOW

Re: [Qemu-devel] qcow2 resize with snapshots

2016-05-15 Thread zhangzhiming
hi, i read some source code by your tips, and i have some conclusions: 1. Old version of QCOW2 image does not store the total size of snapshot, so, we can’t add the function to the old version of QEMU, and the function of QCOW2 resize with snapshots will be limited in V3 image or it w

Re: [Qemu-devel] qcow2 resize with snapshots

2016-05-06 Thread zhangzhiming
sorry, i forgot to cc qemu-bl...@nongnu.org . zhangzhiming zhangzhimin...@meituan.com > On May 7, 2016, at 10:47 AM, zhangzhiming wrote: > > thank you for your reply, and i am glad to join to the development of qemu. > i will try my best to finish this new functi

Re: [Qemu-devel] qcow2 resize with snapshots

2016-05-06 Thread zhangzhiming
thank you for your reply, and i am so sorry, there are some problems with my email @163.com , it returned me some error and i thought that my email send failed. so, really sorry. this is my second email. i will use this one. zhangzhiming zhangzhimin...@meituan.com > On May 6,

Re: [Qemu-devel] qcow2 resize with snapshots

2016-05-06 Thread zhangzhiming
thank you for your reply, and i am glad to join to the development of qemu. i will try my best to finish this new function. have a good day! zhangzhiming zhangzhimin...@meituan.com > On May 3, 2016, at 4:44 PM, Kevin Wolf wrote: > > [ Cc: qemu-block ] > > Am 29.04.2016 um 10:59 hat zhangzm

Re: [Qemu-devel] qcow2 resize with snapshots

2016-05-06 Thread Kevin Wolf
Am 06.05.2016 um 07:57 hat zhangzhiming geschrieben: > hi, i want to implement the function of qcow2 resize which has snapshots. > each snapshot of qcow2 will have a separate total size, and when apply a > snapshot, > the image can be shrunk, and the total size of image will change after apply >

[Qemu-devel] qcow2 resize with snapshots

2016-05-05 Thread zhangzhiming
hi, i want to implement the function of qcow2 resize which has snapshots. each snapshot of qcow2 will have a separate total size, and when apply a snapshot, the image can be shrunk, and the total size of image will change after apply to a snapshot with different size. now, there is a disk_size v

Re: [Qemu-devel] qcow2 resize with snapshots

2016-05-03 Thread Kevin Wolf
[ Cc: qemu-block ] Am 29.04.2016 um 10:59 hat zhangzm geschrieben: > hi, i want to implement the function of qcow2 resize which has > snapshots. > > each snapshot of qcow2 will have a separate total size, and when apply > a snapshot, the image can be shrunk, and the total size of image will > chan

[Qemu-devel] qcow2 resize with snapshots

2016-04-29 Thread zhangzm
hi, i want to implement the function of qcow2 resize which has snapshots. each snapshot of qcow2 will have a separate total size, and when apply a snapshot, the image can be shrunk, and the total size of image will change after apply to a snapshot with different size. now, there is a disk_si

[Qemu-devel] qcow2 resize with snapshots

2016-04-29 Thread zhangzm
hi, i want to implement the function of qcow2 resize which has snapshots. each snapshot of qcow2 will have a separate total size, and when apply a snapshot, the image can be shrunk, and the total size of image will change after apply to a snapshot with different size. now, there is a disk_si

[Qemu-devel] qcow2 corruption analysis tool

2016-04-18 Thread John Snow
This may not be particularly exciting, but I recently had occasion to learn some of the specifics of the qcow2 file format. Instead of augmenting the existing qemu-img check tool, I took the chance to write a little standalone tool as a learning exercise. I have polished up the fruits of my labor

Re: [Qemu-devel] QCow2 compression

2016-03-04 Thread mgreger
Eric Blake wrote: > [any way you could convince your mailer to not break threading?] > > On 03/03/2016 09:24 PM, mgre...@cinci.rr.com wrote: > >> > >> The zeros are not part of the compressed data, though, that's why the > >> Compressed Cluster Descriptor indicates a shorter size. Had ano

Re: [Qemu-devel] QCow2 compression

2016-03-04 Thread Eric Blake
[any way you could convince your mailer to not break threading?] On 03/03/2016 09:24 PM, mgre...@cinci.rr.com wrote: >> >> The zeros are not part of the compressed data, though, that's why the >> Compressed Cluster Descriptor indicates a shorter size. Had another >> compressed cluster been writt

Re: [Qemu-devel] QCow2 compression

2016-03-03 Thread mgreger
> > I have for example a compressed cluster with an L2 entry value of 4A > > C0 00 00 00 3D 97 50. This would lead me to believe the cluster starts > > at offset 0x3D9750 and has a length of 0x2B 512-byte sectors (or 0x2B > > times 0x200 = 0x5600). Added to the offset this would give an end for

Re: [Qemu-devel] QCow2 compression

2016-02-29 Thread Eric Blake
On 02/29/2016 07:01 AM, Kevin Wolf wrote: >> I have for example a compressed cluster with an L2 entry value of 4A >> C0 00 00 00 3D 97 50. This would lead me to believe the cluster starts >> at offset 0x3D9750 and has a length of 0x2B 512-byte sectors (or 0x2B >> times 0x200 = 0x5600). Added to the

Re: [Qemu-devel] QCow2 compression

2016-02-29 Thread Eric Blake
On 02/29/2016 07:59 AM, Eric Blake wrote: >> an L2 entry value of 4A C0 00 00 00 3D 97 50. > > So with default 64k clusters, x = 62 - (16 - 8) = 54. Bits 0-54 are the > host cluster offset, or 0x003d9750, but that is in terms of host > sectors. The comment in block/qcow2.c is telling, and perha

Re: [Qemu-devel] QCow2 compression

2016-02-29 Thread Eric Blake
On 02/26/2016 10:00 PM, mgre...@cinci.rr.com wrote: > Hello, I am hoping someone here can help me. I am implementing QCow2 support > for a PC emulator project and have a couple questions regarding compression I > haven't been able to figure out on my own. [Can you convince your mailer to wrap lo

Re: [Qemu-devel] QCow2 compression

2016-02-29 Thread Kevin Wolf
[ Cc: qemu-block ] Am 27.02.2016 um 06:00 hat mgre...@cinci.rr.com geschrieben: > Hello, I am hoping someone here can help me. I am implementing QCow2 > support for a PC emulator project and have a couple questions > regarding compression I haven't been able to figure out on my own. > > First som

[Qemu-devel] QCow2 compression

2016-02-26 Thread mgreger
Hello, I am hoping someone here can help me. I am implementing QCow2 support for a PC emulator project and have a couple questions regarding compression I haven't been able to figure out on my own. First some background: I am using the information I found at https://people.gnome.org/~markmc/qco

Re: [Qemu-devel] qcow2 snapshot + resize

2016-01-18 Thread lihuiba
>I guess the only thing that would need to implement something new is >qcow2_snapshot_goto(), which currently refuses to load a snapshot that >has a different disk size. >Once this is done, just removing the check in qcow2_truncate() should be >okay. Thanks! I'll see what I can do, later.

Re: [Qemu-devel] qcow2 snapshot + resize

2016-01-14 Thread Kevin Wolf
Am 06.01.2016 um 17:30 hat Max Reitz geschrieben: > On 06.01.2016 17:28, Eric Blake wrote: > > On 01/06/2016 09:20 AM, Max Reitz wrote: > > > >>> If I take a snapshot while the guest sees a 1G disk, then resize the > >>> disk to 2G, then roll back to the point in time of the snapshot, I'd > >>> ex

Re: [Qemu-devel] qcow2 snapshot + resize

2016-01-06 Thread Max Reitz
On 06.01.2016 17:28, Eric Blake wrote: > On 01/06/2016 09:20 AM, Max Reitz wrote: > >>> If I take a snapshot while the guest sees a 1G disk, then resize the >>> disk to 2G, then roll back to the point in time of the snapshot, I'd >>> expect the disk to roll back to 1G in size. Anything else is li

Re: [Qemu-devel] qcow2 snapshot + resize

2016-01-06 Thread Eric Blake
On 01/06/2016 09:20 AM, Max Reitz wrote: >> If I take a snapshot while the guest sees a 1G disk, then resize the >> disk to 2G, then roll back to the point in time of the snapshot, I'd >> expect the disk to roll back to 1G in size. Anything else is likely to >> confuse the guest. And that's what

Re: [Qemu-devel] qcow2 snapshot + resize

2016-01-06 Thread Max Reitz
On 06.01.2016 16:04, Eric Blake wrote: > On 01/05/2016 07:50 PM, lihuiba wrote: >> At 2016-01-05 21:55:56, "Eric Blake" wrote: >>> On 01/05/2016 05:10 AM, lihuiba wrote: >>> >> In our production environment, we need to extend a qcow2 image with >> snapshots in it. >>> > The thing is th

Re: [Qemu-devel] qcow2 snapshot + resize

2016-01-06 Thread Eric Blake
On 01/05/2016 07:50 PM, lihuiba wrote: > At 2016-01-05 21:55:56, "Eric Blake" wrote: >> On 01/05/2016 05:10 AM, lihuiba wrote: >> > In our production environment, we need to extend a qcow2 image with > snapshots in it. >> The thing is that one would need to update all the inactive L1

Re: [Qemu-devel] qcow2 snapshot + resize

2016-01-05 Thread lihuiba
At 2016-01-05 21:55:56, "Eric Blake" wrote: >On 01/05/2016 05:10 AM, lihuiba wrote: > In our production environment, we need to extend a qcow2 image with snapshots in it. > >>> The thing is that one would need to update all the inactive L1 tables. I >>> don't think it should be too diffi

Re: [Qemu-devel] qcow2 snapshot + resize

2016-01-05 Thread John Snow
On 01/05/2016 08:55 AM, Eric Blake wrote: > On 01/05/2016 05:10 AM, lihuiba wrote: > In our production environment, we need to extend a qcow2 image with snapshots in it. > >>> The thing is that one would need to update all the inactive L1 tables. I >>> don't think it should be too dif

Re: [Qemu-devel] qcow2 snapshot + resize

2016-01-05 Thread Eric Blake
On 01/05/2016 05:10 AM, lihuiba wrote: >>> In our production environment, we need to extend a qcow2 image with >>> snapshots in it. >> The thing is that one would need to update all the inactive L1 tables. I >> don't think it should be too difficult, it's just that apparently so far >> nobody eve

Re: [Qemu-devel] qcow2 snapshot + resize

2016-01-05 Thread lihuiba
Max, I'll see what I can do, and give you my plan. Thanks! >On 29.12.2015 10:38, lihuiba wrote: >> Hi, >> >> In our production environment, we need to extend a qcow2 image with >> snapshots in it. This feature, however, is not implemented yet. >> >> So I want to ask, if this feature is und

Re: [Qemu-devel] qcow2 snapshot + resize

2016-01-04 Thread Max Reitz
On 29.12.2015 10:38, lihuiba wrote: > Hi, > > In our production environment, we need to extend a qcow2 image with > snapshots in it. This feature, however, is not implemented yet. > > So I want to ask, if this feature is under active development? No, it is not. > How can I > help with this fea

[Qemu-devel] qcow2 snapshot + resize

2015-12-29 Thread lihuiba
Hi, In our production environment, we need to extend a qcow2 image with snapshots in it. This feature, however, is not implemented yet. So I want to ask, if this feature is under active development? How can I help with this feature? It seems that, this feature is not too difficult as long

Re: [Qemu-devel] qcow2 corruption repair can not proceed due to bad snapshot

2015-11-23 Thread Max Reitz
On 20.11.2015 20:33, Brian Taber wrote: > I recently ran across an issue (completely my own fault) that others > have encountered with varying details/success in fixing. I had a VM > stuck in shutdown (windoze asking/waiting to kill a program) that I > thought was already down when I created a sna

[Qemu-devel] qcow2 corruption repair can not proceed due to bad snapshot

2015-11-20 Thread Brian Taber
I recently ran across an issue (completely my own fault) that others have encountered with varying details/success in fixing. I had a VM stuck in shutdown (windoze asking/waiting to kill a program) that I thought was already down when I created a snapshot on the 3 disks attached to the VM. After

Re: [Qemu-devel] qcow2 problem: while a qcow2 image run out of disk space the guest paused

2015-04-27 Thread tu bo
Kevin Wolf To:Alexandre DERUMIER Cc:chenxg , stefanha , m...@linux.vnet.ibm.com, Bo Tu/China/IBM@IBMCN, borntrae...@de.ibm.com, Holger Wolf , qemu-devel Date:04/17/2015 03:57 PM Subject:Re: [Qemu-devel] qcow2 problem: while a qcow2 image run out of disk space the guest paused.

Re: [Qemu-devel] qcow2 problem: while a qcow2 image run out of disk space the guest paused.

2015-04-17 Thread Kevin Wolf
; m...@linux.vnet.ibm.com, t...@cn.ibm.com, borntrae...@de.ibm.com, "Holger > Wolf" , "qemu-devel" > Envoyé: Vendredi 17 Avril 2015 04:22:57 > Objet: [Qemu-devel] qcow2 problem: while a qcow2 image run out of disk space > the guest paused. > > Hi Kevin,

Re: [Qemu-devel] qcow2 problem: while a qcow2 image run out of disk space the guest paused.

2015-04-16 Thread Alexandre DERUMIER
bm.com, "Holger Wolf" , "qemu-devel" Envoyé: Vendredi 17 Avril 2015 04:22:57 Objet: [Qemu-devel] qcow2 problem: while a qcow2 image run out of disk space the guest paused. Hi Kevin, While installing a guest into a qcow2 image if the qcow2 image run out of disk space, the

[Qemu-devel] qcow2 problem: while a qcow2 image run out of disk space the guest paused.

2015-04-16 Thread chenxg
Hi Kevin, While installing a guest into a qcow2 image if the qcow2 image run out of disk space, the guest will stop work and change state to paused without messages. When we tried to free up disk space in the host and the virsh resume to work. The guest then got I/O errors but later on QEMU

Re: [Qemu-devel] qcow2 problem in CentOS

2014-12-23 Thread Paolo Bonzini
On 23/12/2014 11:32, Halsey Pian wrote: > QCOW2 feature included in Qemu-2.1.2 version works fine in Fedora, but > there is issue in CentOS 6.5/7. > > We can create a qcow2 img file using qemu-img in CentOS > >> qemu-img create –f qcow2 test.qcow2 10G > > Then using qemu-system-x86_64 or virt

[Qemu-devel] qcow2 problem in CentOS

2014-12-23 Thread Halsey Pian
Hi All, QCOW2 feature included in Qemu-2.1.2 version works fine in Fedora, but there is issue in CentOS 6.5/7. We can create a qcow2 img file using qemu-img in CentOS > qemu-img create -f qcow2 test.qcow2 10G Then using qemu-system-x86_64 or virt-manager to install one VM to this

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. > > > > Analysis > > > > the code as

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: > > Currently, qemu-img can not create qcow2 image

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

2014-12-09 Thread Josh Durgin
On 12/09/2014 01:49 AM, 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: Currently, qemu-img can not create qcow2 image format on rbd server. Analysis

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

2014-12-09 Thread Stefan Hajnoczi
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: Currently, qemu-img can not create qcow2 image format on rbd server. Analysis the code as followi

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

2014-12-08 Thread Josh Durgin
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: 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_create_file(filename, opt

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

2014-12-08 Thread Kevin Wolf
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. > > > Analysis > > > the code as followings: > > > when create qcow2 format image: >

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_create_file(filename, opts, &local_err); --> Here

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 > > bdrv_create_file(filename, opts, &lo

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

2014-12-08 Thread Kevin Wolf
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 > bdrv_create_file(filename, opts, &local_err); --> Here will create a 0 size > file(e.g: f

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_create_file(filename, opts, &local_err); --> Here

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

2014-12-05 Thread Max Reitz
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_create_file(filename, opts, &local_err); --> Here will create a 0 size file(e.g: file1) on rbd serv

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

2014-12-05 Thread Jun Li
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_create_file(filename, opts, &local_err); --> Here will create a 0 size file(e.g: file1) on rbd server. ... ret = bdrv_pwrite(bs, 0, heade

Re: [Qemu-devel] qcow2, lazy_refcounts and killing qemu

2014-09-08 Thread Max Reitz
On 08.09.2014 09:16, Markus Armbruster wrote: "Richard W.M. Jones" writes: On Fri, Sep 05, 2014 at 04:39:51PM +0100, Stefan Hajnoczi wrote: Did you try older QEMU versions? I'm curious if this is something that crept in later or is fundamentally broken in lazy_refcounts=on. At your promptin

Re: [Qemu-devel] qcow2, lazy_refcounts and killing qemu

2014-09-08 Thread Stefan Hajnoczi
On Fri, Sep 05, 2014 at 06:41:37PM +0100, Richard W.M. Jones wrote: > On Fri, Sep 05, 2014 at 04:39:51PM +0100, Stefan Hajnoczi wrote: > > Did you try older QEMU versions? I'm curious if this is something that > > crept in later or is fundamentally broken in lazy_refcounts=on. > > At your prompti

  1   2   3   >