Re: [Qemu-block] [PATCH v5] raw_bsd: add offset and size options

2016-10-25 Thread Tomáš Golembiovský
I should test my code more before submitting it to ML. I have found two bugs in the patch. On Sun, 23 Oct 2016 16:54:37 +0200 Tomáš Golembiovský wrote: > +static int raw_read_options(QDict *options, BlockDriverState *bs, > +BDRVRawState *s, Error **errp) > +{ > +

Re: [Qemu-block] [PATCH v3 5/5] qapi: allow blockdev-add for ssh

2016-10-25 Thread Eric Blake
On 10/17/2016 12:32 PM, Ashijeet Acharya wrote: > Introduce new object 'BlockdevOptionsSsh' in qapi/block-core.json to > support blockdev-add for SSH network protocol driver. Use only 'struct > InetSocketAddress' since SSH only supports connection over TCP. > > Signed-off-by: Ashijeet Acharya

Re: [Qemu-block] [PATCH v4 5/5] qapi: allow blockdev-add for ssh

2016-10-25 Thread Eric Blake
On 10/25/2016 08:04 AM, Ashijeet Acharya wrote: > Introduce new object 'BlockdevOptionsSsh' in qapi/block-core.json to > support blockdev-add for SSH network protocol driver. Use only 'struct > InetSocketAddress' since SSH only supports connection over TCP. > > Signed-off-by: Ashijeet Acharya

Re: [Qemu-block] [PATCH v2 2/2] qapi: allow blockdev-add for NFS

2016-10-25 Thread Eric Blake
On 10/24/2016 02:27 PM, Ashijeet Acharya wrote: > Introduce new object 'BlockdevOptionsNFS' in qapi/block-core.json to > support blockdev-add for NFS network protocol driver. Also make a new > struct NFSServer to support tcp connection. > > Signed-off-by: Ashijeet Acharya

Re: [Qemu-block] [PATCH 2/7] blockjobs: Allow creating internal jobs

2016-10-25 Thread Jeff Cody
On Thu, Oct 13, 2016 at 06:56:57PM -0400, John Snow wrote: > Add the ability to create jobs without an ID. > > Signed-off-by: John Snow > --- > block/backup.c| 2 +- > block/commit.c| 2 +- > block/mirror.c| 3 ++- > block/stream.c

Re: [Qemu-block] [PATCH 4/7] blockjob: centralize QMP event emissions

2016-10-25 Thread Jeff Cody
On Thu, Oct 13, 2016 at 06:56:59PM -0400, John Snow wrote: > There's no reason to leave this to blockdev; we can do it in blockjobs > directly and get rid of an extra callback for most users. > > All non-internal events, even those created outside of QMP, will > consistently emit events. > >

Re: [Qemu-block] [PATCH 3/7] Replication/Blockjobs: Create replication jobs as internal

2016-10-25 Thread Jeff Cody
On Thu, Oct 13, 2016 at 06:56:58PM -0400, John Snow wrote: > Bubble up the internal interface to commit and backup jobs, then switch > replication tasks over to using this methodology. > > Signed-off-by: John Snow > --- > block/backup.c| 3 ++- > block/mirror.c

Re: [Qemu-block] [PATCH 5/7] Blockjobs: Internalize user_pause logic

2016-10-25 Thread Jeff Cody
On Thu, Oct 13, 2016 at 06:57:00PM -0400, John Snow wrote: > BlockJobs will begin hiding their state in preparation for some > refactorings anyway, so let's internalize the user_pause mechanism > instead of leaving it to callers to correctly manage. > > Signed-off-by: John Snow

Re: [Qemu-block] [PATCH 0/7] blockjobs: preliminary refactoring work, Pt 1

2016-10-25 Thread Jeff Cody
On Fri, Oct 14, 2016 at 02:32:55PM -0400, John Snow wrote: > > > On 10/13/2016 06:56 PM, John Snow wrote: > >This is a follow-up to patches 1-6 of: > >[PATCH v2 00/11] blockjobs: Fix transactional race condition > > > >That series started trying to refactor blockjobs with the goal of >

Re: [Qemu-block] [PATCH 7/7] blockjobs: fix documentation

2016-10-25 Thread Jeff Cody
On Thu, Oct 13, 2016 at 06:57:02PM -0400, John Snow wrote: > (Trivial) > > Fix wrong function names in documentation. > > Signed-off-by: John Snow > --- > include/block/blockjob_int.h | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git

Re: [Qemu-block] [PATCH RFC 4/7] replication: Split out backup_do_checkpoint() from secondary_do_checkpoint()

2016-10-25 Thread Changlong Xie
On 10/20/2016 09:57 PM, zhanghailiang wrote: The helper backup_do_checkpoint() will be used for primary related codes. Here we split it out from secondary_do_checkpoint(). Besides, it is unnecessary to call backup_do_checkpoint() in replication starting and normally stop replication path.

Re: [Qemu-block] [PATCH RFC 0/7] COLO block replication supports shared disk case

2016-10-25 Thread Changlong Xie
I did't review p5/p6, I think you can merge p5/p6 into a single one. Also don't forget update qapi/block-core.json with p3. Thanks -Xie On 10/20/2016 09:57 PM, zhanghailiang wrote: COLO block replication doesn't support the shared disk case, Here we try to implement it. Just as the

[Qemu-block] [PATCH v6] raw_bsd: add offset and size options

2016-10-25 Thread Tomáš Golembiovský
Added two new options 'offset' and 'size'. This makes it possible to use only part of the file as a device. This can be used e.g. to limit the access only to single partition in a disk image or use a disk inside a tar archive (like OVA). When 'size' is specified we do our best to honour it.

Re: [Qemu-block] [PATCH RFC 3/7] replication: add shared-disk and shared-disk-id options

2016-10-25 Thread Changlong Xie
On 10/20/2016 09:57 PM, zhanghailiang wrote: We use these two options to identify which disk is shared Signed-off-by: zhanghailiang Signed-off-by: Wen Congyang Signed-off-by: Zhang Chen ---

Re: [Qemu-block] [PATCH v5 08/13] qapi: Allow blockdev-add for NBD

2016-10-25 Thread Eric Blake
On 10/25/2016 08:11 AM, Max Reitz wrote: > Signed-off-by: Max Reitz > --- > qapi/block-core.json | 25 ++--- > 1 file changed, 22 insertions(+), 3 deletions(-) > > diff --git a/qapi/block-core.json b/qapi/block-core.json > index 97b1205..4b4a74c 100644 >

Re: [Qemu-block] [Qemu-devel] [PATCH v8 15/36] qdev: Add "lock-mode" to block device options

2016-10-25 Thread Fam Zheng
On Sat, 10/22 02:11, Max Reitz wrote: > On 30.09.2016 14:09, Fam Zheng wrote: > > Signed-off-by: Fam Zheng > > --- > > hw/core/qdev-properties.c| 10 ++ > > include/hw/block/block.h | 1 + > > include/hw/qdev-properties.h | 3 +++ > > 3 files changed, 14

Re: [Qemu-block] [PATCH v8 03/36] block: Introduce image file locking

2016-10-25 Thread Fam Zheng
On Fri, 10/21 23:04, Max Reitz wrote: > > +ImageLockMode bdrv_lock_mode_from_flags(int flags) > > +{ > > +if (flags & BDRV_O_NO_LOCK) { > > +return IMAGE_LOCK_MODE_NOLOCK; > > +} else if (flags & BDRV_O_SHARED_LOCK) { > > +return IMAGE_LOCK_MODE_SHARED; > > +} else if

Re: [Qemu-block] [PATCH v8 00/36] block: Image locking series

2016-10-25 Thread Fam Zheng
On Mon, 10/24 12:11, Kevin Wolf wrote: > Am 22.10.2016 um 03:00 hat Max Reitz geschrieben: > > > > > > I personally still don't like making locking a qdev property very much > > because it doesn't make sense to me*. But I remember Kevin had his > > reasons (even though I can no longer remember

Re: [Qemu-block] [Qemu-devel] Assertion failure on qcow2 disk with cluster_size != 64k

2016-10-25 Thread Kevin Wolf
Am 25.10.2016 um 01:06 hat Ed Swierk geschrieben: > On Mon, Oct 24, 2016 at 2:21 PM, Eric Blake wrote: > > How are you getting max_transfer == 65536? I can't reproduce it with > > the following setup: > > > > $ qemu-img create -f qcow2 -o cluster_size=1M file 10M > > $ qemu-io

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

2016-10-25 Thread Kevin Wolf
Am 24.10.2016 um 20:44 hat John Snow geschrieben: > On 10/24/2016 07:37 AM, Kevin Wolf wrote: > >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

Re: [Qemu-block] [PATCH v8 00/36] block: Image locking series

2016-10-25 Thread Fam Zheng
On Tue, 10/25 09:06, Richard W.M. Jones wrote: > On Tue, Oct 25, 2016 at 03:09:51PM +0800, Fam Zheng wrote: > > On Mon, 10/24 12:11, Kevin Wolf wrote: > > > Am 22.10.2016 um 03:00 hat Max Reitz geschrieben: > > > > > > > > > > > > I personally still don't like making locking a qdev property very

[Qemu-block] [PATCH v5 3/4] fdc: Move qdev properties to FloppyDrive

2016-10-25 Thread Kevin Wolf
This makes the FloppyDrive qdev object actually useful: Now that it has all properties that don't belong to the controller, you can actually use '-device floppy' and get a working result. Command line semantics is consistent with CD-ROM drives: By default you get a single empty floppy drive. You

[Qemu-block] [PATCH v5 4/4] qemu-iotests: Test creating floppy drives

2016-10-25 Thread Kevin Wolf
This tests the different supported methods to create floppy drives and how they interact. Signed-off-by: Kevin Wolf --- tests/qemu-iotests/172 | 246 ++ tests/qemu-iotests/172.out | 1170 tests/qemu-iotests/group |

Re: [Qemu-block] [PATCH v8 00/36] block: Image locking series

2016-10-25 Thread Kevin Wolf
Am 24.10.2016 um 20:03 hat Max Reitz geschrieben: > On 24.10.2016 12:11, Kevin Wolf wrote: > > [...] > > > Now, the big question is how to translate this into file locking. This > > could become a little tricky. I had a few thoughts involving another > > lock on byte 2, but none of them actually

Re: [Qemu-block] [PATCH RFC 1/7] docs/block-replication: Add description for shared-disk case

2016-10-25 Thread Changlong Xie
On 10/20/2016 09:57 PM, zhanghailiang wrote: Introuduce the scenario of shared-disk block replication and how to use it. Signed-off-by: zhanghailiang Signed-off-by: Wen Congyang Signed-off-by: Zhang Chen ---

[Qemu-block] [PATCH v5 2/4] fdc: Add a floppy drive qdev

2016-10-25 Thread Kevin Wolf
Floppy controllers automatically create two floppy drive devices in qdev now. (They always created two drives, but managed them only internally.) Signed-off-by: Kevin Wolf Reviewed-by: John Snow --- hw/block/fdc.c | 151

[Qemu-block] [PATCH real v5 0/4] fdc: Use separate qdev device for drives

2016-10-25 Thread Kevin Wolf
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. The latest reason to complain was when I noticed that using

[Qemu-block] [PATCH v5 1/4] fdc: Add a floppy qbus

2016-10-25 Thread Kevin Wolf
This adds a qbus to the floppy controller that should contain the floppy drives eventually. At the moment it just exists and is empty. Signed-off-by: Kevin Wolf Reviewed-by: John Snow --- hw/block/fdc.c | 40 +++- 1 file

Re: [Qemu-block] [Qemu-devel] [PATCH v14 02/21] qdict: implement a qdict_crumple method for un-flattening a dict

2016-10-25 Thread Markus Armbruster
Max Reitz writes: > On 21.10.2016 11:58, Markus Armbruster wrote: >> "Daniel P. Berrange" writes: >> >>> On Tue, Oct 18, 2016 at 04:32:13PM +0200, Markus Armbruster wrote: "Daniel P. Berrange" writes: > The

Re: [Qemu-block] [PATCH v3 2/5] util/qemu-sockets: Make inet_connect_saddr() public

2016-10-25 Thread Kevin Wolf
Am 17.10.2016 um 19:32 hat Ashijeet Acharya geschrieben: > Make inet_connect_saddr() in util/qemu-sockets.c public in order to be > able to use it with InetSocketAddress sockets outside of > util/qemu-sockets.c independently. > > Signed-off-by: Ashijeet Acharya

Re: [Qemu-block] [PATCH v8 00/36] block: Image locking series

2016-10-25 Thread Richard W.M. Jones
On Tue, Oct 25, 2016 at 03:09:51PM +0800, Fam Zheng wrote: > On Mon, 10/24 12:11, Kevin Wolf wrote: > > Am 22.10.2016 um 03:00 hat Max Reitz geschrieben: > > > > > > > > > I personally still don't like making locking a qdev property very much > > > because it doesn't make sense to me*. But I

Re: [Qemu-block] [PATCH RFC 3/7] replication: add shared-disk and shared-disk-id options

2016-10-25 Thread Changlong Xie
On 10/20/2016 09:57 PM, zhanghailiang wrote: We use these two options to identify which disk is shared Signed-off-by: zhanghailiang Signed-off-by: Wen Congyang Signed-off-by: Zhang Chen ---

Re: [Qemu-block] [PATCH RFC 2/7] block-backend: Introduce blk_root() helper

2016-10-25 Thread Changlong Xie
I know you need blk->root in the next patch, but we strongly don't recommend your current solution. Please refer Kevin's cf2ab8fc 1409 /* XXX Ugly way to get blk->root, but that's a feature, not a bug. This 1410 * hack makes it obvious that vhdx_write_header() bypasses the

Re: [Qemu-block] [PATCH 4/4] block: Cater to iscsi with non-power-of-2 discard

2016-10-25 Thread Eric Blake
On 10/25/2016 09:20 AM, Peter Lieven wrote: >> The firmware is probably technically buggy for advertising too large of >> a minimum granularity, if it can piece together smaller requests into a >> larger discard. If discards need to happen at a smaller granularity, >> the firmware (or kernel

Re: [Qemu-block] [Qemu-devel] [PATCH v14 02/21] qdict: implement a qdict_crumple method for un-flattening a dict

2016-10-25 Thread Markus Armbruster
"Daniel P. Berrange" writes: > On Tue, Oct 25, 2016 at 12:03:33PM +0200, Markus Armbruster wrote: >> Max Reitz writes: >> >> > On 21.10.2016 11:58, Markus Armbruster wrote: >> >> "Daniel P. Berrange" writes: >> >> >> >>> On Tue,

[Qemu-block] [PATCH v5 01/13] block/nbd: Drop trailing "." in error messages

2016-10-25 Thread Max Reitz
Reviewed-by: Eric Blake Reviewed-by: Kevin Wolf Signed-off-by: Max Reitz --- block/nbd.c | 4 ++-- tests/qemu-iotests/051.out| 4 ++-- tests/qemu-iotests/051.pc.out | 4 ++-- 3 files changed, 6 insertions(+), 6

[Qemu-block] [PATCH v5 05/13] block/nbd: Add nbd_has_filename_options_conflict()

2016-10-25 Thread Max Reitz
Right now, we have four possible options that conflict with specifying an NBD filename, and a future patch will add another one ("address"). This future option is a nested QDict that is flattened at this point, requiring us to test each option whether its key has an "address." prefix. Therefore,

[Qemu-block] [PATCH v4 3/5] block/ssh: Add InetSocketAddress and accept it

2016-10-25 Thread Ashijeet Acharya
Add InetSocketAddress compatibility to SSH driver. Add a new option "server" to the SSH block driver which then accepts a InetSocketAddress. "host" and "port" are supported as legacy options and are mapped to their InetSocketAddress representation. Signed-off-by: Ashijeet Acharya

Re: [Qemu-block] [Qemu-devel] Assertion failure on qcow2 disk with cluster_size != 64k

2016-10-25 Thread Eric Blake
On 10/25/2016 03:39 AM, Kevin Wolf wrote: >> It appears loop devices (with or without dm-crypt/LUKS) report a >> 255-sector maximum per request via the BLKSECTGET ioctl, which qemu >> rounds down to 64k in raw_refresh_limits(). Cool - I can make a loop device, so now I should have enough info to

Re: [Qemu-block] [PATCH 4/4] block: Cater to iscsi with non-power-of-2 discard

2016-10-25 Thread Eric Blake
On 10/25/2016 07:42 AM, Peter Lieven wrote: >> >> But hey, that firmware is seriously weird. :) > > Yes, so you would not change the new implementation? > > Even if the discard is e.g. 1MB it could theretically be that internally > the device has a finer granularity. Its an optimal discard

Re: [Qemu-block] [PATCH v11 01/19] block: Add bdrv_drain_all_{begin, end}()

2016-10-25 Thread Paolo Bonzini
On 25/10/2016 16:38, Kevin Wolf wrote: > Am 25.10.2016 um 15:53 hat Paolo Bonzini geschrieben: >> >> >> On 25/10/2016 15:39, Alberto Garcia wrote: >>> On Mon 24 Oct 2016 12:53:41 PM CEST, Paolo Bonzini wrote: >>> > My first thoughts were about how to let an unpause succeed without a >

Re: [Qemu-block] [PATCH v11 01/19] block: Add bdrv_drain_all_{begin, end}()

2016-10-25 Thread Kevin Wolf
Am 25.10.2016 um 15:53 hat Paolo Bonzini geschrieben: > > > On 25/10/2016 15:39, Alberto Garcia wrote: > > On Mon 24 Oct 2016 12:53:41 PM CEST, Paolo Bonzini wrote: > > > >>> My first thoughts were about how to let an unpause succeed without a > >>> previous pause for these objects, but

Re: [Qemu-block] [PATCH v11 01/19] block: Add bdrv_drain_all_{begin, end}()

2016-10-25 Thread Alberto Garcia
On Mon 24 Oct 2016 12:53:41 PM CEST, Paolo Bonzini wrote: >> My first thoughts were about how to let an unpause succeed without a >> previous pause for these objects, but actually I think this isn't >> what we should do. We rather want to actually do the pause instead >> because even new BDSes

Re: [Qemu-block] [PATCH v11 01/19] block: Add bdrv_drain_all_{begin, end}()

2016-10-25 Thread Paolo Bonzini
On 25/10/2016 15:39, Alberto Garcia wrote: > On Mon 24 Oct 2016 12:53:41 PM CEST, Paolo Bonzini wrote: > >>> My first thoughts were about how to let an unpause succeed without a >>> previous pause for these objects, but actually I think this isn't >>> what we should do. We rather want to

Re: [Qemu-block] [PATCH v8 05/36] raw-posix: Add image locking support

2016-10-25 Thread Max Reitz
On 25.10.2016 08:31, Fam Zheng wrote: > On Sat, 10/22 01:40, Max Reitz wrote: >> On 30.09.2016 14:09, Fam Zheng wrote: [...] >>> +static int >>> +raw_reopen_upgrade(BDRVReopenState *state, >>> + RawReopenOperation op, >>> + ImageLockMode old_lock, >>> +

Re: [Qemu-block] [PATCH v2 2/2] qapi: allow blockdev-add for NFS

2016-10-25 Thread Kevin Wolf
Am 24.10.2016 um 21:27 hat Ashijeet Acharya geschrieben: > Introduce new object 'BlockdevOptionsNFS' in qapi/block-core.json to > support blockdev-add for NFS network protocol driver. Also make a new > struct NFSServer to support tcp connection. > > Signed-off-by: Ashijeet Acharya

Re: [Qemu-block] [PATCH v2 1/2] block/nfs: Introduce runtime_opts in NFS

2016-10-25 Thread Kevin Wolf
Peter, there is a question for you hidden somewhere below. Am 24.10.2016 um 21:27 hat Ashijeet Acharya geschrieben: > Make NFS block driver use various fine grained runtime_opts. > Set .bdrv_parse_filename() to nfs_parse_filename() and introduce two > new functions nfs_parse_filename() and

Re: [Qemu-block] [PATCH 4/4] block: Cater to iscsi with non-power-of-2 discard

2016-10-25 Thread Peter Lieven
Am 25.10.2016 um 15:59 schrieb Eric Blake: On 10/25/2016 07:42 AM, Peter Lieven wrote: But hey, that firmware is seriously weird. :) Yes, so you would not change the new implementation? Even if the discard is e.g. 1MB it could theretically be that internally the device has a finer

Re: [Qemu-block] [Qemu-devel] [PATCH v5 13/13] iotests: Add test for NBD's blockdev-add interface

2016-10-25 Thread Markus Armbruster
Max Reitz writes: > Signed-off-by: Max Reitz > --- > tests/qemu-iotests/147 | 196 > + > tests/qemu-iotests/147.out | 5 ++ > tests/qemu-iotests/group | 1 + > 3 files changed, 202 insertions(+) >

Re: [Qemu-block] [PATCH 4/4] block: Cater to iscsi with non-power-of-2 discard

2016-10-25 Thread Paolo Bonzini
On 25/10/2016 16:35, Eric Blake wrote: > So your argument is that we should always pass down every unaligned > less-than-optimum discard request all the way to the hardware, rather > than dropping it higher in the stack, even though discard requests are > already advisory, in order to leave the

Re: [Qemu-block] [PATCH 4/4] block: Cater to iscsi with non-power-of-2 discard

2016-10-25 Thread Peter Lieven
Am 25.10.2016 um 14:19 schrieb Paolo Bonzini: On 25/10/2016 14:12, Peter Lieven wrote: Am 25.10.2016 um 14:09 schrieb Paolo Bonzini: On 25/10/2016 14:03, Peter Lieven wrote: Am 01.08.2016 um 11:22 schrieb Paolo Bonzini: On 28/07/2016 04:39, Eric Blake wrote: On 07/27/2016 01:25 AM, Fam

[Qemu-block] [PATCH v5 09/13] iotests.py: Add qemu_nbd function

2016-10-25 Thread Max Reitz
Signed-off-by: Max Reitz --- tests/qemu-iotests/iotests.py | 8 1 file changed, 8 insertions(+) diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py index 3329bc1..5a2678f 100644 --- a/tests/qemu-iotests/iotests.py +++

Re: [Qemu-block] [PATCH v8 00/36] block: Image locking series

2016-10-25 Thread Max Reitz
On 25.10.2016 10:24, Kevin Wolf wrote: > Am 24.10.2016 um 20:03 hat Max Reitz geschrieben: >> On 24.10.2016 12:11, Kevin Wolf wrote: >> >> [...] >> >>> Now, the big question is how to translate this into file locking. This >>> could become a little tricky. I had a few thoughts involving another

[Qemu-block] [PATCH v5 12/13] iotests: Add assert_json_filename_equal() method

2016-10-25 Thread Max Reitz
Since the order of keys in JSON filenames is not necessarily fixed, they should not be compared to fixed strings. This method takes a Python dict as a reference, parses a given JSON filename and compares both. Signed-off-by: Max Reitz --- tests/qemu-iotests/iotests.py | 20

Re: [Qemu-block] [Qemu-devel] [PATCH v14 04/21] qapi: rename QmpInputVisitor to QObjectInputVisitor

2016-10-25 Thread Markus Armbruster
"Daniel P. Berrange" writes: > The QmpInputVisitor has no direct dependency on QMP. It is > valid to use it anywhere that one has a QObject. Rename it > to better reflect its functionality as a generic QObject > to QAPI converter. > > Reviewed-by: Kevin Wolf

Re: [Qemu-block] [PATCH 4/4] block: Cater to iscsi with non-power-of-2 discard

2016-10-25 Thread Peter Lieven
Am 01.08.2016 um 11:22 schrieb Paolo Bonzini: On 28/07/2016 04:39, Eric Blake wrote: On 07/27/2016 01:25 AM, Fam Zheng wrote: On Thu, 07/21 13:34, Eric Blake wrote: +max_write_zeroes = max_write_zeroes / alignment * alignment; Not using QEMU_ALIGN_DOWN despite patch 3? Looks like I

[Qemu-block] [PATCH v4 1/5] block/ssh: Add ssh_has_filename_options_conflict()

2016-10-25 Thread Ashijeet Acharya
We have 5 options plus ("server") option which is added in the next patch that conflict with specifying a SSH filename. We need to iterate over all the options to check whether its key has an "server." prefix. This iteration will help us adding the new option "server" easily. Signed-off-by:

[Qemu-block] [PATCH v4 2/5] util/qemu-sockets: Make inet_connect_saddr() public

2016-10-25 Thread Ashijeet Acharya
Make inet_connect_saddr() in util/qemu-sockets.c public in order to be able to use it with InetSocketAddress sockets outside of util/qemu-sockets.c independently. Signed-off-by: Ashijeet Acharya Reviewed-by: Kevin Wolf --- include/qemu/sockets.h | 2

[Qemu-block] [PATCH v4 0/5] Allow blockdev-add for SSH

2016-10-25 Thread Ashijeet Acharya
Previously posted series patches: v3: https://lists.gnu.org/archive/html/qemu-devel/2016-10/msg03781.html v2: https://lists.gnu.org/archive/html/qemu-devel/2016-10/msg03403.html v1: http://lists.nongnu.org/archive/html/qemu-devel/2016-10/msg02137.html This series adds blockdev-add support for SSH

[Qemu-block] [PATCH v5 13/13] iotests: Add test for NBD's blockdev-add interface

2016-10-25 Thread Max Reitz
Signed-off-by: Max Reitz --- tests/qemu-iotests/147 | 196 + tests/qemu-iotests/147.out | 5 ++ tests/qemu-iotests/group | 1 + 3 files changed, 202 insertions(+) create mode 100755 tests/qemu-iotests/147 create mode

Re: [Qemu-block] [PATCH v5 00/13] qapi: Allow blockdev-add for NBD

2016-10-25 Thread Max Reitz
On 25.10.2016 15:11, Max Reitz wrote: [...] > ***This series depends on qdict_crumple() as it has been merged by >Markus to his qapi-next branch (i.e. without @recursive).*** Actually, it depends on the whole branch. Max signature.asc Description: OpenPGP digital signature

Re: [Qemu-block] [PATCH v8 03/36] block: Introduce image file locking

2016-10-25 Thread Max Reitz
On 25.10.2016 07:48, Fam Zheng wrote: > On Fri, 10/21 23:04, Max Reitz wrote: [...] >>> +int bdrv_set_lock_mode(BlockDriverState *bs, ImageLockMode mode) >>> +{ >>> +int ret; >>> + >>> +if (bs->cur_lock == mode) { >>> +return 0; >>> +} else if (!bs->drv) { >>> +return

[Qemu-block] [PATCH v5 08/13] qapi: Allow blockdev-add for NBD

2016-10-25 Thread Max Reitz
Signed-off-by: Max Reitz --- qapi/block-core.json | 25 ++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/qapi/block-core.json b/qapi/block-core.json index 97b1205..4b4a74c 100644 --- a/qapi/block-core.json +++ b/qapi/block-core.json @@

Re: [Qemu-block] [PATCH v8 02/36] qapi: Add ImageLockMode

2016-10-25 Thread Fam Zheng
On Tue, 10/25 15:20, Max Reitz wrote: > On 25.10.2016 07:36, Fam Zheng wrote: > > On Fri, 10/21 22:45, Max Reitz wrote: > >> On 30.09.2016 14:09, Fam Zheng wrote: > >>> Signed-off-by: Fam Zheng > >>> --- > >>> qapi/block-core.json | 18 ++ > >>> 1 file changed,

Re: [Qemu-block] [PATCH 4/4] block: Cater to iscsi with non-power-of-2 discard

2016-10-25 Thread Paolo Bonzini
On 25/10/2016 14:03, Peter Lieven wrote: > Am 01.08.2016 um 11:22 schrieb Paolo Bonzini: >> >> On 28/07/2016 04:39, Eric Blake wrote: >>> On 07/27/2016 01:25 AM, Fam Zheng wrote: On Thu, 07/21 13:34, Eric Blake wrote: > +max_write_zeroes = max_write_zeroes / alignment * alignment;

Re: [Qemu-block] [PATCH 4/4] block: Cater to iscsi with non-power-of-2 discard

2016-10-25 Thread Paolo Bonzini
On 25/10/2016 14:12, Peter Lieven wrote: > Am 25.10.2016 um 14:09 schrieb Paolo Bonzini: >> >> On 25/10/2016 14:03, Peter Lieven wrote: >>> Am 01.08.2016 um 11:22 schrieb Paolo Bonzini: On 28/07/2016 04:39, Eric Blake wrote: > On 07/27/2016 01:25 AM, Fam Zheng wrote: >> On Thu,

[Qemu-block] [PATCH v4 4/5] block/ssh: Use InetSocketAddress options

2016-10-25 Thread Ashijeet Acharya
Drop the use of legacy options in favour of the InetSocketAddress options. Signed-off-by: Ashijeet Acharya Reviewed-by: Max Reitz Reviewed-by: Kevin Wolf --- block/ssh.c | 9 + 1 file changed, 5 insertions(+), 4

[Qemu-block] [PATCH v4 5/5] qapi: allow blockdev-add for ssh

2016-10-25 Thread Ashijeet Acharya
Introduce new object 'BlockdevOptionsSsh' in qapi/block-core.json to support blockdev-add for SSH network protocol driver. Use only 'struct InetSocketAddress' since SSH only supports connection over TCP. Signed-off-by: Ashijeet Acharya Reviewed-by: Kevin Wolf

[Qemu-block] [PATCH v5 03/13] block/nbd: Default port in nbd_refresh_filename()

2016-10-25 Thread Max Reitz
Instead of not emitting the port in nbd_refresh_filename(), just set it to the default if the user did not specify it. This makes the logic a bit simpler. Reviewed-by: Eric Blake Reviewed-by: Kevin Wolf Signed-off-by: Max Reitz ---

[Qemu-block] [PATCH v5 04/13] block/nbd: Use qdict_put()

2016-10-25 Thread Max Reitz
Instead of inlining this nice macro (i.e. resorting to qdict_put_obj(..., QOBJECT(...))), use it. Reviewed-by: Eric Blake Reviewed-by: Kevin Wolf Signed-off-by: Max Reitz --- block/nbd.c | 13 ++--- 1 file changed, 6

[Qemu-block] [PATCH v5 02/13] block/nbd: Reject port parameter without host

2016-10-25 Thread Max Reitz
Currently, a port that is passed along with a UNIX socket path is silently ignored. That is not exactly ideal, it should be an error instead. Reviewed-by: Eric Blake Reviewed-by: Kevin Wolf Signed-off-by: Max Reitz --- block/nbd.c | 7

[Qemu-block] ping Re: [PATCH 00/18] Dirty bitmaps postcopy migration

2016-10-25 Thread Vladimir Sementsov-Ogievskiy
ping For now there are some notes mostly about accessory patches. What about migration itself? Is it ok? Has it a chance of being merged one day? 16.08.2016 13:25, Vladimir Sementsov-Ogievskiy wrote: v2: some bugs fixed, iotests a bit changed and merged into one test. based on block-next

Re: [Qemu-block] [PATCH 16/22] qmp: add persistent flag to block-dirty-bitmap-add

2016-10-25 Thread Vladimir Sementsov-Ogievskiy
24.10.2016 20:30, Max Reitz wrote: On 24.10.2016 17:12, Vladimir Sementsov-Ogievskiy wrote: 10.10.2016 19:08, Max Reitz wrote: On 30.09.2016 12:53, Vladimir Sementsov-Ogievskiy wrote: [...] +} out: aio_context_release(aio_context); diff --git a/qapi/block-core.json

Re: [Qemu-block] [PATCH 4/4] block: Cater to iscsi with non-power-of-2 discard

2016-10-25 Thread Peter Lieven
Am 25.10.2016 um 14:09 schrieb Paolo Bonzini: On 25/10/2016 14:03, Peter Lieven wrote: Am 01.08.2016 um 11:22 schrieb Paolo Bonzini: On 28/07/2016 04:39, Eric Blake wrote: On 07/27/2016 01:25 AM, Fam Zheng wrote: On Thu, 07/21 13:34, Eric Blake wrote: +max_write_zeroes =

[Qemu-block] [PATCH v5 00/13] qapi: Allow blockdev-add for NBD

2016-10-25 Thread Max Reitz
This series adds blockdev-add support for NBD clients. Patches 1, 2, 3, and 4 are minor patches with no functional relation to this series, other than the fact that later patches will touch the code they touch, too. Patch 5 prepares the code for the addition of a new option prefix, which is

Re: [Qemu-block] [PATCH 12/22] qcow2-bitmap: add IN_USE flag

2016-10-25 Thread Vladimir Sementsov-Ogievskiy
24.10.2016 20:18, Max Reitz wrote: On 24.10.2016 19:08, Max Reitz wrote: On 24.10.2016 13:35, Vladimir Sementsov-Ogievskiy wrote: 24.10.2016 13:32, Vladimir Sementsov-Ogievskiy пишет: 21.10.2016 22:58, Max Reitz пишет: On 21.10.2016 17:34, Vladimir Sementsov-Ogievskiy wrote: 07.10.2016

[Qemu-block] [PATCH v5 11/13] socket_scm_helper: Accept fd directly

2016-10-25 Thread Max Reitz
This gives us more freedom about the fd that is passed to qemu, allowing us to e.g. pass sockets. Reviewed-by: Kevin Wolf Signed-off-by: Max Reitz --- tests/qemu-iotests/socket_scm_helper.c | 29 ++--- 1 file changed, 18

[Qemu-block] [PATCH v5 06/13] block/nbd: Accept SocketAddress

2016-10-25 Thread Max Reitz
Add a new option "server" to the NBD block driver which accepts a SocketAddress. "path", "host" and "port" are still supported as legacy options and are mapped to their corresponding SocketAddress representation. Signed-off-by: Max Reitz --- block/nbd.c |

[Qemu-block] [PATCH v5 07/13] block/nbd: Use SocketAddress options

2016-10-25 Thread Max Reitz
Drop the use of legacy options in favor of the SocketAddress representation, even for internal use (i.e. for storing the result of the filename parsing). Signed-off-by: Max Reitz --- block/nbd.c | 26 -- 1 file changed, 16 insertions(+), 10

Re: [Qemu-block] [PATCH v8 02/36] qapi: Add ImageLockMode

2016-10-25 Thread Max Reitz
On 25.10.2016 07:36, Fam Zheng wrote: > On Fri, 10/21 22:45, Max Reitz wrote: >> On 30.09.2016 14:09, Fam Zheng wrote: >>> Signed-off-by: Fam Zheng >>> --- >>> qapi/block-core.json | 18 ++ >>> 1 file changed, 18 insertions(+) >>> >>> diff --git

[Qemu-block] [PATCH v5 10/13] iotests.py: Allow concurrent qemu instances

2016-10-25 Thread Max Reitz
By adding an optional suffix to the files used for communication with a VM, we can launch multiple VM instances concurrently. Reviewed-by: Kevin Wolf Signed-off-by: Max Reitz --- tests/qemu-iotests/iotests.py | 6 -- 1 file changed, 4 insertions(+), 2

Re: [Qemu-block] [PATCH v8 00/36] block: Image locking series

2016-10-25 Thread Kevin Wolf
Am 25.10.2016 um 15:30 hat Max Reitz geschrieben: > On 25.10.2016 10:24, Kevin Wolf wrote: > > Am 24.10.2016 um 20:03 hat Max Reitz geschrieben: > >> On 24.10.2016 12:11, Kevin Wolf wrote: > >> > >> [...] > >> > >>> Now, the big question is how to translate this into file locking. This > >>> could

Re: [Qemu-block] [PATCH v11 01/19] block: Add bdrv_drain_all_{begin, end}()

2016-10-25 Thread Kevin Wolf
Am 25.10.2016 um 16:41 hat Paolo Bonzini geschrieben: > > > On 25/10/2016 16:38, Kevin Wolf wrote: > > Am 25.10.2016 um 15:53 hat Paolo Bonzini geschrieben: > >> > >> > >> On 25/10/2016 15:39, Alberto Garcia wrote: > >>> On Mon 24 Oct 2016 12:53:41 PM CEST, Paolo Bonzini wrote: > >>> > > My

Re: [Qemu-block] [PATCH v11 01/19] block: Add bdrv_drain_all_{begin, end}()

2016-10-25 Thread Paolo Bonzini
On 25/10/2016 16:48, Alberto Garcia wrote: > And how about the rest of the things that are going on in > bdrv_drain_all_begin()? > > bdrv_parent_drained_begin(bs); No BlockBackend yet, and BlockDriverStates have been quiesced already, so that's okay. >

Re: [Qemu-block] [PATCH v5 06/13] block/nbd: Accept SocketAddress

2016-10-25 Thread Kevin Wolf
Am 25.10.2016 um 15:11 hat Max Reitz geschrieben: > Add a new option "server" to the NBD block driver which accepts a > SocketAddress. > > "path", "host" and "port" are still supported as legacy options and are > mapped to their corresponding SocketAddress representation. > > Signed-off-by: Max

Re: [Qemu-block] [Qemu-devel] [PATCH v7 00/16] nbd: efficient write zeroes

2016-10-25 Thread Eric Blake
ping - I'd really like this in 2.8, since it missed 2.7, but soft freeze is again approaching On 10/14/2016 01:33 PM, Eric Blake wrote: > Also available as a tag at: > git fetch git://repo.or.cz/qemu/ericb.git nbd-zero-v7 > > v5 was here, but missed 2.7 freeze: >

Re: [Qemu-block] [Qemu-devel] [PATCH 2/4] block/curl: Fix return value from curl_read_cb

2016-10-25 Thread Eric Blake
On 10/24/2016 09:54 PM, Max Reitz wrote: > While commit 38bbc0a580f9f10570b1d1b5d3e92f0e6feb2970 is correct in that > the callback is supposed to return the number of bytes handled; what it > does not mention is that libcurl will throw an error if the callback did > not "handle" all of the data

Re: [Qemu-block] [Qemu-devel] [PATCH real v5 0/4] fdc: Use separate qdev device for drives

2016-10-25 Thread John Snow
fdc.use.separate.qdev.device.for.drives.EN.V5.REPACK.PC.LINUX-kw0lf-kr3w _____ .__ _ __ | | _ _\ _ \ | |_/ \ | | \_ \_ _ __ | |/ /\ \/ \/ / /_\ \| |\ __\ | |/ /\_ __ \_(__ < \/ \/ / |< \ /\ \_/ \

Re: [Qemu-block] [Qemu-devel] [PATCH 1/4] block/curl: Use BDRV_SECTOR_SIZE

2016-10-25 Thread Eric Blake
On 10/24/2016 09:54 PM, Max Reitz wrote: > Currently, curl defines its own constant SECTOR_SIZE. There is no > advantage over using the global BDRV_SECTOR_SIZE, so drop it. > > Cc: qemu-sta...@nongnu.org > Signed-off-by: Max Reitz > --- > block/curl.c | 11 +-- > 1