Re: [Qemu-block] [Qemu-devel] [PATCH v2 5/5] block: keep AioContext pointer in BlockBackend

2016-09-29 Thread Fam Zheng
On Thu, 09/29 09:47, Paolo Bonzini wrote: > > > On 29/09/2016 05:05, Fam Zheng wrote: > > > So whether we can move a certain BB from some context to another depends > > > on what the frontend supports, I don't think there is a generic answer > > > we can implement here in the generic BB code.

Re: [Qemu-block] [PATCH v3] block: Turn on "unmap" in active commit

2016-09-29 Thread Fam Zheng
On Thu, 09/29 13:41, Stefan Hajnoczi wrote: > On Tue, Sep 27, 2016 at 07:14:52PM +0800, Fam Zheng wrote: > > We already specified BDRV_O_UNMAP when opening images in 'qemu-img > > commit', but didn't turn on the "unmap" in the active commit job. This > > patch fixes that so that zeroed clusters in

Re: [Qemu-block] [Qemu-devel] [PATCH] qcow2: Support BDRV_REQ_MAY_UNMAP

2016-09-29 Thread Fam Zheng
On Thu, 09/29 12:39, Kevin Wolf wrote: > Am 29.09.2016 um 11:55 hat Fam Zheng geschrieben: > > On Thu, 09/29 11:29, Kevin Wolf wrote: > > > Am 28.09.2016 um 09:04 hat Fam Zheng geschrieben: > > > > Handling this is similar to what is done to the L2 entry in the case of > > > > compressed clusters.

Re: [Qemu-block] [Qemu-devel] [PATCH 2/3] fdc: Add a floppy drive qdev

2016-09-29 Thread John Snow
On 09/05/2016 11:43 AM, Kevin Wolf wrote: Floppy controllers automatically create two floppy drive devices in qdev now. (They always created two drives, but managed them only internally.) This appears to *actually* create and expose two drives by default, is this intentional? Previously,

Re: [Qemu-block] [PATCH 0/5] blockjobs: Fix transactional race condition

2016-09-29 Thread John Snow
On 09/29/2016 07:33 AM, Kevin Wolf wrote: Am 28.09.2016 um 14:16 hat Vladimir Sementsov-Ogievskiy geschrieben: I think jobs will need to remain "one coroutine, one job" for now, but there's no reason why drive-backup or blockdev-backup can't just create multiple jobs each if that's what they

Re: [Qemu-block] [Qemu-devel] block/ssh:Allow blockdev-add for ssh

2016-09-29 Thread Ashijeet Acharya
On Thu, Sep 29, 2016 at 8:32 PM, Kevin Wolf wrote: > Am 29.09.2016 um 16:07 hat Ashijeet Acharya geschrieben: >> Other than that I also asked if I have accidentally missed any other >> important field regarding the structure 'BlockdevOptionsSsh' I >> described in the previous

Re: [Qemu-block] [Qemu-devel] [PULL 00/18] Block layer patches

2016-09-29 Thread John Snow
On 09/29/2016 02:17 PM, Paolo Bonzini wrote: On 29/09/2016 19:02, John Snow wrote: On 09/29/2016 06:25 AM, Kevin Wolf wrote: John, can you have a look at the IDE code and check whether we can get rid of the deep recursion? It seems that the test issues a large request that is then split

Re: [Qemu-block] [Qemu-devel] [PULL 00/18] Block layer patches

2016-09-29 Thread Paolo Bonzini
On 29/09/2016 19:02, John Snow wrote: > > > On 09/29/2016 06:25 AM, Kevin Wolf wrote: >> John, can you have a look at the IDE code and check whether we can get >> rid of the deep recursion? It seems that the test issues a large request >> that is then split into many small requests. But it

Re: [Qemu-block] [Qemu-devel] [PATCH 1/5] blockjob: fix dead pointer in txn list

2016-09-29 Thread Eric Blake
On 08/08/2016 02:09 PM, John Snow wrote: > From: Vladimir Sementsov-Ogievskiy > > Though it is not intended to be reached through normal circumstances, > if we do not gracefully deconstruct the transaction QLIST, we may wind > up with stale pointers in the list. > >

Re: [Qemu-block] qdevification of xen_disk

2016-09-29 Thread Stefano Stabellini
Hi Kevin, I agree with you, and if you would be so kind to send the patches, even untested, they would be much appreciated. Anthony or I will make sure to test them appropriately and fix them, if they turn out to be incomplete or partially broken. Would that be OK? Cheers, Stefano P.S. FYI Xen

Re: [Qemu-block] [Qemu-devel] [PULL 00/18] Block layer patches

2016-09-29 Thread Peter Maydell
On 29 September 2016 at 03:25, Kevin Wolf wrote: > The series contains a patch that reduces the coroutine stack size, so I > guess it's not quite infinite, but pretty deep recursion anyway. I will > drop that final patch that reduces the stack size and hope that the rest > will

Re: [Qemu-block] [Qemu-devel] [PULL 00/18] Block layer patches

2016-09-29 Thread John Snow
On 09/29/2016 06:25 AM, Kevin Wolf wrote: John, can you have a look at the IDE code and check whether we can get rid of the deep recursion? It seems that the test issues a large request that is then split into many small requests. But it should be possible to do this iteratively rather than

[Qemu-block] qdevification of xen_disk

2016-09-29 Thread Kevin Wolf
Hi Stefano and all, while working on some part of the QEMU block layer infrastructure that requires going from a BlockBackend to the qdev DeviceState, I noticed that xen_disk is still not qdevified after all the years. It's the last device, and has been for a while, that is blocking the necessary

Re: [Qemu-block] [PATCH 0/3] fdc: Use separate qdev device for drives

2016-09-29 Thread Kevin Wolf
Am 05.09.2016 um 17:43 hat Kevin Wolf geschrieben: > We have been complaining for a long time about how the floppy controller and > floppy drives are combined in a single qdev device and how this makes the > device awkward to work with because it behaves different from all other block > devices. >

Re: [Qemu-block] [Qemu-devel] block/ssh:Allow blockdev-add for ssh

2016-09-29 Thread Kevin Wolf
Am 29.09.2016 um 16:07 hat Ashijeet Acharya geschrieben: > Other than that I also asked if I have accidentally missed any other > important field regarding the structure 'BlockdevOptionsSsh' I > described in the previous mail (I will post it here again for > convenience) > > { 'struct':

Re: [Qemu-block] [Qemu-devel] block/ssh:Allow blockdev-add for ssh

2016-09-29 Thread Ashijeet Acharya
On Thu, Sep 29, 2016 at 5:29 PM, Richard W.M. Jones wrote: > On Thu, Sep 29, 2016 at 01:36:35PM +0200, Kevin Wolf wrote: >> But the ssh client doesn't seem to support connection to that Unix domain >> socket, even if it would be possible to support in theory. And probably >>

Re: [Qemu-block] [Qemu-devel] [PATCH] block: modify top-id's comments

2016-09-29 Thread Eric Blake
On 09/28/2016 05:31 AM, Stefan Hajnoczi wrote: > On Wed, Sep 28, 2016 at 01:30:39PM +0800, Wang WeiWei wrote: > > Please send a proper commit message and commit description. "modify > top-id's comments" says almost nothing and there is no commit > description. I don't know why you are making

[Qemu-block] [PULL v2 00/17] Block layer patches

2016-09-29 Thread Kevin Wolf
The following changes since commit c640f2849ee8775fe1bbd7a2772610aa77816f9f: Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into staging (2016-09-28 23:02:56 +0100) are available in the git repository at: git://repo.or.cz/qemu/kevin.git tags/for-upstream for you to

Re: [Qemu-block] [Qemu-devel] [PATCH] qcow2: Support BDRV_REQ_MAY_UNMAP

2016-09-29 Thread Paolo Bonzini
On 29/09/2016 14:50, Paolo Bonzini wrote: > > > On 29/09/2016 14:48, Kevin Wolf wrote: >> Am 29.09.2016 um 14:14 hat Paolo Bonzini geschrieben: >>> On 29/09/2016 12:39, Kevin Wolf wrote: >> Because there is another check of pass-discard-request value in >> update_refcount: >>

Re: [Qemu-block] [Qemu-devel] [PATCH] qcow2: Support BDRV_REQ_MAY_UNMAP

2016-09-29 Thread Paolo Bonzini
On 29/09/2016 14:48, Kevin Wolf wrote: > Am 29.09.2016 um 14:14 hat Paolo Bonzini geschrieben: >> On 29/09/2016 12:39, Kevin Wolf wrote: > Because there is another check of pass-discard-request value in > update_refcount: > > if (refcount == 0 &&

Re: [Qemu-block] [Qemu-devel] [PATCH] qcow2: Support BDRV_REQ_MAY_UNMAP

2016-09-29 Thread Kevin Wolf
Am 29.09.2016 um 14:14 hat Paolo Bonzini geschrieben: > On 29/09/2016 12:39, Kevin Wolf wrote: > >> > Because there is another check of pass-discard-request value in > >> > update_refcount: > >> > > >> > if (refcount == 0 && s->discard_passthrough[type]) { > >> >

Re: [Qemu-block] [PATCH v3] block: Turn on "unmap" in active commit

2016-09-29 Thread Stefan Hajnoczi
On Tue, Sep 27, 2016 at 07:14:52PM +0800, Fam Zheng wrote: > We already specified BDRV_O_UNMAP when opening images in 'qemu-img > commit', but didn't turn on the "unmap" in the active commit job. This > patch fixes that so that zeroed clusters in top image can be discarded > which is desired in

Re: [Qemu-block] [PATCH 0/5] blockjobs: Fix transactional race condition

2016-09-29 Thread Stefan Hajnoczi
On Thu, Sep 29, 2016 at 01:33:07PM +0200, Kevin Wolf wrote: > Am 28.09.2016 um 14:16 hat Vladimir Sementsov-Ogievskiy geschrieben: > > >I think jobs will need to remain "one coroutine, one job" for now, > > >but there's no reason why drive-backup or blockdev-backup can't > > >just create multiple

Re: [Qemu-block] [Qemu-devel] [PATCH] qcow2: Support BDRV_REQ_MAY_UNMAP

2016-09-29 Thread Paolo Bonzini
On 29/09/2016 12:39, Kevin Wolf wrote: >> > >> > Because there is another check of pass-discard-request value in >> > update_refcount: >> > >> > if (refcount == 0 && s->discard_passthrough[type]) { >> > update_refcount_discard(bs, cluster_offset, s->cluster_size); >> >

Re: [Qemu-block] [Qemu-devel] block/ssh:Allow blockdev-add for ssh

2016-09-29 Thread Richard W.M. Jones
On Thu, Sep 29, 2016 at 01:36:35PM +0200, Kevin Wolf wrote: > But the ssh client doesn't seem to support connection to that Unix domain > socket, even if it would be possible to support in theory. And probably > none of the SSH libraries that we consider to use support it either (but > I haven't

Re: [Qemu-block] [Qemu-devel] block/ssh:Allow blockdev-add for ssh

2016-09-29 Thread Kevin Wolf
Am 29.09.2016 um 13:22 hat Daniel P. Berrange geschrieben: > On Thu, Sep 29, 2016 at 12:42:34PM +0200, Kevin Wolf wrote: > > Am 29.09.2016 um 10:07 hat Richard W.M. Jones geschrieben: > > > On Thu, Sep 29, 2016 at 01:05:48PM +0530, Ashijeet Acharya wrote: > > > > Hi all, > > > > > > > > I was

Re: [Qemu-block] [PATCH 0/5] blockjobs: Fix transactional race condition

2016-09-29 Thread Kevin Wolf
Am 28.09.2016 um 14:16 hat Vladimir Sementsov-Ogievskiy geschrieben: > >I think jobs will need to remain "one coroutine, one job" for now, > >but there's no reason why drive-backup or blockdev-backup can't > >just create multiple jobs each if that's what they need to do. > >(The backup job object

Re: [Qemu-block] [Qemu-devel] block/ssh:Allow blockdev-add for ssh

2016-09-29 Thread Daniel P. Berrange
On Thu, Sep 29, 2016 at 12:42:34PM +0200, Kevin Wolf wrote: > Am 29.09.2016 um 10:07 hat Richard W.M. Jones geschrieben: > > On Thu, Sep 29, 2016 at 01:05:48PM +0530, Ashijeet Acharya wrote: > > > Hi all, > > > > > > I was trying to convert SSH driver to support 'blockdev-add' and so > > > far I

Re: [Qemu-block] [Qemu-devel] block/ssh:Allow blockdev-add for ssh

2016-09-29 Thread Kevin Wolf
Am 29.09.2016 um 13:07 hat Daniel P. Berrange geschrieben: > On Thu, Sep 29, 2016 at 12:42:34PM +0200, Kevin Wolf wrote: > > Am 29.09.2016 um 10:07 hat Richard W.M. Jones geschrieben: > > > On Thu, Sep 29, 2016 at 01:05:48PM +0530, Ashijeet Acharya wrote: > > > > Hi all, > > > > > > > > I was

Re: [Qemu-block] [Qemu-devel] block/ssh:Allow blockdev-add for ssh

2016-09-29 Thread Daniel P. Berrange
On Thu, Sep 29, 2016 at 12:42:34PM +0200, Kevin Wolf wrote: > Am 29.09.2016 um 10:07 hat Richard W.M. Jones geschrieben: > > On Thu, Sep 29, 2016 at 01:05:48PM +0530, Ashijeet Acharya wrote: > > > Hi all, > > > > > > I was trying to convert SSH driver to support 'blockdev-add' and so > > > far I

Re: [Qemu-block] block/ssh:Allow blockdev-add for ssh

2016-09-29 Thread Kevin Wolf
Am 29.09.2016 um 10:07 hat Richard W.M. Jones geschrieben: > On Thu, Sep 29, 2016 at 01:05:48PM +0530, Ashijeet Acharya wrote: > > Hi all, > > > > I was trying to convert SSH driver to support 'blockdev-add' and so > > far I have tried to figure out what the struct 'BlockdevOptionsSsh' in > >

Re: [Qemu-block] [Qemu-devel] [PATCH] qcow2: Support BDRV_REQ_MAY_UNMAP

2016-09-29 Thread Kevin Wolf
Am 29.09.2016 um 11:55 hat Fam Zheng geschrieben: > On Thu, 09/29 11:29, Kevin Wolf wrote: > > Am 28.09.2016 um 09:04 hat Fam Zheng geschrieben: > > > Handling this is similar to what is done to the L2 entry in the case of > > > compressed clusters. > > > > > > Signed-off-by: Fam Zheng

Re: [Qemu-block] [Qemu-devel] RFC: handling image options with drive-mirror/drive-backup

2016-09-29 Thread Kevin Wolf
Am 29.09.2016 um 11:43 hat Daniel P. Berrange geschrieben: > On Thu, Sep 29, 2016 at 11:17:52AM +0200, Kevin Wolf wrote: > > Am 29.09.2016 um 11:09 hat Fam Zheng geschrieben: > > > On Thu, 09/29 09:51, Daniel P. Berrange wrote: > > > > On Thu, Sep 29, 2016 at 04:43:25PM +0800, Fam Zheng wrote: > >

Re: [Qemu-block] [PATCH v5 7/9] block: don't make snapshots for filters

2016-09-29 Thread Kevin Wolf
Am 28.09.2016 um 14:49 hat Pavel Dovgalyuk geschrieben: > > From: Kevin Wolf [mailto:kw...@redhat.com] > > Am 28.09.2016 um 11:32 hat Pavel Dovgalyuk geschrieben: > > > > From: Kevin Wolf [mailto:kw...@redhat.com] > > > > Am 27.09.2016 um 16:06 hat Pavel Dovgalyuk geschrieben: > > > > > > From:

Re: [Qemu-block] [Qemu-devel] RFC: handling image options with drive-mirror/drive-backup

2016-09-29 Thread Kashyap Chamarthy
On Thu, Sep 29, 2016 at 10:43:37AM +0100, Daniel P. Berrange wrote: > On Thu, Sep 29, 2016 at 11:17:52AM +0200, Kevin Wolf wrote: [...] > > Just to clarify what "not stable" means: Literally none of the > > blockdev-add commands that used to work when it was originally merged > > are still

[Qemu-block] block/ssh:Allow blockdev-add for ssh

2016-09-29 Thread Ashijeet Acharya
Hi all, I was trying to convert SSH driver to support 'blockdev-add' and so far I have tried to figure out what the struct 'BlockdevOptionsSsh' in block-core.json should look like, { 'struct': 'BlockdevOptionsSsh', 'data': { 'tcp': 'InetSocketAddress', 'path': 'str' } } Naive

Re: [Qemu-block] [Qemu-devel] [PULL 00/18] Block layer patches

2016-09-29 Thread Kevin Wolf
Am 28.09.2016 um 21:03 hat Peter Maydell geschrieben: > On 28 September 2016 at 02:37, Kevin Wolf wrote: > > Am 27.09.2016 um 21:42 hat Peter Maydell geschrieben: > >> On 27 September 2016 at 06:53, Kevin Wolf wrote: > >> > The following changes since commit

Re: [Qemu-block] [Qemu-devel] [PATCH] qcow2: Support BDRV_REQ_MAY_UNMAP

2016-09-29 Thread Fam Zheng
On Thu, 09/29 11:29, Kevin Wolf wrote: > Am 28.09.2016 um 09:04 hat Fam Zheng geschrieben: > > Handling this is similar to what is done to the L2 entry in the case of > > compressed clusters. > > > > Signed-off-by: Fam Zheng > > --- > > block/qcow2-cluster.c | 9 + > >

Re: [Qemu-block] [Qemu-devel] RFC: handling image options with drive-mirror/drive-backup

2016-09-29 Thread Kashyap Chamarthy
On Thu, Sep 29, 2016 at 09:51:09AM +0100, Daniel P. Berrange wrote: > On Thu, Sep 29, 2016 at 04:43:25PM +0800, Fam Zheng wrote: > > On Thu, 09/29 09:34, Daniel P. Berrange wrote: [...] > > > So my suggestion is that we deprecate "drive-mirror" and define a fixed > > > command

Re: [Qemu-block] [Qemu-devel] RFC: handling image options with drive-mirror/drive-backup

2016-09-29 Thread Daniel P. Berrange
On Thu, Sep 29, 2016 at 11:17:52AM +0200, Kevin Wolf wrote: > Am 29.09.2016 um 11:09 hat Fam Zheng geschrieben: > > On Thu, 09/29 09:51, Daniel P. Berrange wrote: > > > On Thu, Sep 29, 2016 at 04:43:25PM +0800, Fam Zheng wrote: > > > > On Thu, 09/29 09:34, Daniel P. Berrange wrote: > > > > > So my

Re: [Qemu-block] [Qemu-devel] RFC: handling image options with drive-mirror/drive-backup

2016-09-29 Thread Fam Zheng
On Thu, 09/29 10:15, Daniel P. Berrange wrote: > On Thu, Sep 29, 2016 at 05:09:20PM +0800, Fam Zheng wrote: > > On Thu, 09/29 09:51, Daniel P. Berrange wrote: > > > On Thu, Sep 29, 2016 at 04:43:25PM +0800, Fam Zheng wrote: > > > > On Thu, 09/29 09:34, Daniel P. Berrange wrote: > > > > > So my

Re: [Qemu-block] [Qemu-devel] RFC: handling image options with drive-mirror/drive-backup

2016-09-29 Thread Kevin Wolf
Am 29.09.2016 um 11:09 hat Fam Zheng geschrieben: > On Thu, 09/29 09:51, Daniel P. Berrange wrote: > > On Thu, Sep 29, 2016 at 04:43:25PM +0800, Fam Zheng wrote: > > > On Thu, 09/29 09:34, Daniel P. Berrange wrote: > > > > So my suggestion is that we deprecate "drive-mirror" and define a fixed > >

Re: [Qemu-block] [Qemu-devel] RFC: handling image options with drive-mirror/drive-backup

2016-09-29 Thread Fam Zheng
On Thu, 09/29 09:51, Daniel P. Berrange wrote: > On Thu, Sep 29, 2016 at 04:43:25PM +0800, Fam Zheng wrote: > > On Thu, 09/29 09:34, Daniel P. Berrange wrote: > > > So my suggestion is that we deprecate "drive-mirror" and define a fixed > > > command "drive-mirror-blockdev" (or "blockdev-mirror"

Re: [Qemu-block] [Qemu-devel] RFC: handling image options with drive-mirror/drive-backup

2016-09-29 Thread Daniel P. Berrange
On Thu, Sep 29, 2016 at 04:43:25PM +0800, Fam Zheng wrote: > On Thu, 09/29 09:34, Daniel P. Berrange wrote: > > I got a report that the LUKS block driver was not working in combination > > with the drive-mirror command and have been investigating possible fixes > > for this. > > > > The core

Re: [Qemu-block] [Qemu-devel] RFC: handling image options with drive-mirror/drive-backup

2016-09-29 Thread Fam Zheng
On Thu, 09/29 09:34, Daniel P. Berrange wrote: > I got a report that the LUKS block driver was not working in combination > with the drive-mirror command and have been investigating possible fixes > for this. > > The core problem here is dealing with the target image. If you try to > run with a

[Qemu-block] RFC: handling image options with drive-mirror/drive-backup

2016-09-29 Thread Daniel P. Berrange
I got a report that the LUKS block driver was not working in combination with the drive-mirror command and have been investigating possible fixes for this. The core problem here is dealing with the target image. If you try to run with a pre-created target that is a LUKS image, it will fail

Re: [Qemu-block] [PATCH] qcow2: Support BDRV_REQ_MAY_UNMAP

2016-09-29 Thread Fam Zheng
On Thu, 09/29 09:58, Paolo Bonzini wrote: > > > On 29/09/2016 04:21, Fam Zheng wrote: > > On Wed, 09/28 18:11, Max Reitz wrote: > >> Note that BDRV_REQ_MAY_UNMAP does not mean "Yes, please discard" but > >> just "You may discard if it's easier for you". But it's actually not > >> easier for us,

Re: [Qemu-block] block/ssh:Allow blockdev-add for ssh

2016-09-29 Thread Richard W.M. Jones
On Thu, Sep 29, 2016 at 01:05:48PM +0530, Ashijeet Acharya wrote: > Hi all, > > I was trying to convert SSH driver to support 'blockdev-add' and so > far I have tried to figure out what the struct 'BlockdevOptionsSsh' in > block-core.json should look like, > > { 'struct': 'BlockdevOptionsSsh', >

Re: [Qemu-block] [PATCH] qcow2: Support BDRV_REQ_MAY_UNMAP

2016-09-29 Thread Paolo Bonzini
On 29/09/2016 04:21, Fam Zheng wrote: > On Wed, 09/28 18:11, Max Reitz wrote: >> Note that BDRV_REQ_MAY_UNMAP does not mean "Yes, please discard" but >> just "You may discard if it's easier for you". But it's actually not >> easier for us, so I don't see why we're doing it. >> >> As far as I can

Re: [Qemu-block] [PATCH v2 5/5] block: keep AioContext pointer in BlockBackend

2016-09-29 Thread Paolo Bonzini
On 29/09/2016 05:05, Fam Zheng wrote: > > So whether we can move a certain BB from some context to another depends > > on what the frontend supports, I don't think there is a generic answer > > we can implement here in the generic BB code. NBD for instance allows > > any movement; but devices