Re: [Qemu-block] [PATCH v3 07/15] stream: Use BlockBackend for I/O

2016-05-25 Thread Max Reitz
ic Blake <ebl...@redhat.com> > Reviewed-by: Alberto Garcia <be...@igalia.com> > --- > block/io.c| 9 - > block/stream.c| 15 +-- > include/block/block.h | 2 -- > trace-events | 1 - > 4 files changed, 9

Re: [Qemu-block] [PATCH v3 09/15] mirror: Use BlockBackend for I/O

2016-05-25 Thread Max Reitz
ic Blake <ebl...@redhat.com> > --- > block/mirror.c | 70 > -- > blockdev.c | 4 +--- > 2 files changed, 40 insertions(+), 34 deletions(-) Reviewed-by: Max Reitz <mre...@redhat.com> signature.asc Description: OpenPGP digital signature

Re: [Qemu-block] [PATCH v3 14/15] commit: Use BlockBackend for I/O

2016-05-25 Thread Max Reitz
ic Blake <ebl...@redhat.com> > --- > block/commit.c | 53 + > 1 file changed, 33 insertions(+), 20 deletions(-) Reviewed-by: Max Reitz <mre...@redhat.com> signature.asc Description: OpenPGP digital signature

Re: [Qemu-block] [PATCH v3 13/15] backup: Use BlockBackend for I/O

2016-05-25 Thread Max Reitz
ic Blake <ebl...@redhat.com> > --- > block/backup.c| 46 +- > block/io.c| 9 - > blockdev.c| 4 +--- > include/block/block.h | 2 -- > trace-events | 1 - > 5 files changed, 22 inser

Re: [Qemu-block] [PATCH v3 4/5] iotests: Add test for post-mirror backing chains

2016-06-14 Thread Max Reitz
On 12.06.2016 06:17, Fam Zheng wrote: > On Fri, 06/10 20:57, Max Reitz wrote: >> +import os >> +import stat >> +import time > > Unused import 'stat' and 'time'? That happens when you copy old tests and don't check stuff like this... Well, it won't hurt, but I guess n

Re: [Qemu-block] [PATCH v3 3/5] block/null: Implement bdrv_refresh_filename()

2016-06-14 Thread Max Reitz
On 12.06.2016 06:08, Fam Zheng wrote: > On Fri, 06/10 20:57, Max Reitz wrote: >> Signed-off-by: Max Reitz <mre...@redhat.com> > > The commit message could go a little more informative. Seems nothing special > in > the added callback, aren't things supposed to just work

Re: [Qemu-block] [PATCH] block-backend: allow flush on devices with open tray

2016-06-14 Thread Max Reitz
On 10.06.2016 23:59, John Snow wrote: > If a device still has an attached BDS because the medium has not yet > been removed, we will be unable to migrate to a new host because > blk_flush will return an error for that backend. > > Replace the call to blk_is_available to blk_is_inserted to weaken

Re: [Qemu-block] [PATCH] backup: Fail early if cannot determine cluster size

2016-06-14 Thread Max Reitz
On 18.05.2016 07:53, Fam Zheng wrote: > Otherwise the job is orphaned and block_job_cancel_sync in > bdrv_close_all() when quiting will hang. > > A simple reproducer is running blockdev-backup from null-co:// to > null-co://. > > Cc: qemu-sta...@nongnu.org > Signed-off-by: Fam Zheng

Re: [Qemu-block] [PATCH] qemu-img bench: Fix uninitialised writethrough mode

2016-06-14 Thread Max Reitz
; 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Max Reitz <mre...@redhat.com> signature.asc Description: OpenPGP digital signature

Re: [Qemu-block] [PATCH v2] rbd:change error_setg() to error_setg_errno()

2016-06-14 Thread Max Reitz
On 09.05.2016 09:51, Vikhyat Umrao wrote: > Ceph RBD block driver does not use error_setg_errno() where > it is possible to use. This patch replaces error_setg() > from error_setg_errno(). > > Signed-off-by: Vikhyat Umrao > --- > block/rbd.c | 38

Re: [Qemu-block] [PATCH v2 1/2] crypto: add support for querying parameters for block encryption

2016-06-14 Thread Max Reitz
On 14.06.2016 12:56, Daniel P. Berrange wrote: > When creating new block encryption volumes, we accept a list of > parameters to control the formatting process. It is useful to > be able to query what those parameters were for existing block > devices. Add a qcrypto_block_get_info() method which

Re: [Qemu-block] [PATCH v2 2/2] block: export LUKS specific data to qemu-img info

2016-06-14 Thread Max Reitz
On 14.06.2016 17:47, Daniel P. Berrange wrote: > On Tue, Jun 14, 2016 at 05:38:36PM +0200, Max Reitz wrote: >> On 14.06.2016 12:56, Daniel P. Berrange wrote: >>> The qemu-img info command has the ability to expose format >>> specific metadata about volumes. Wire up thi

Re: [Qemu-block] [PATCH v2 2/2] block: export LUKS specific data to qemu-img info

2016-06-14 Thread Max Reitz
On 14.06.2016 12:56, Daniel P. Berrange wrote: > The qemu-img info command has the ability to expose format > specific metadata about volumes. Wire up this facility for > the LUKS driver to report on cipher configuration and key > slot usage. > > $ qemu-img info ~/VirtualMachines/demo.luks >

Re: [Qemu-block] [PATCH v3 1/2] crypto: add support for querying parameters for block encryption

2016-06-14 Thread Max Reitz
ckpriv.h | 4 +++ > include/crypto/block.h | 16 +++ > qapi/crypto.json | 76 > ++ > 5 files changed, 180 insertions(+) Reviewed-by: Max Reitz <mre...@redhat.com> (I'll be waiting whether Eric wants to comment) signature.asc Description: OpenPGP digital signature

Re: [Qemu-block] [PATCH v3 0/5] block/mirror: Fix (?) target backing BDS

2016-06-14 Thread Max Reitz
On 10.06.2016 20:57, Max Reitz wrote: > Issue #1: If the target image does not have a backing BDS before mirror > completion, qemu tries really hard to give it a backing BDS. If the > source has a backing BDS, it will actually always "succeed". > In some cases, the target i

Re: [Qemu-block] [PATCH v3 2/2] block: export LUKS specific data to qemu-img info

2016-06-14 Thread Max Reitz
ed > later by changing the way the block layer pretty-prints the > image specific data. > > Signed-off-by: Daniel P. Berrange <berra...@redhat.com> > --- > block/crypto.c | 49 + > qapi/block-core.json | 6 +- > 2 files changed, 54 insertions(+), 1 deletion(-) Reviewed-by: Max Reitz <mre...@redhat.com> signature.asc Description: OpenPGP digital signature

Re: [Qemu-block] [PATCH] block-backend: allow flush on devices with open tray

2016-06-14 Thread Max Reitz
On 14.06.2016 17:54, John Snow wrote: > > > On 06/14/2016 09:19 AM, Max Reitz wrote: >> On 10.06.2016 23:59, John Snow wrote: >>> If a device still has an attached BDS because the medium has not yet >>> been removed, we will be unable to migrate to a new host

[Qemu-block] [PATCH 2/2] qcow2: Avoid making the L1 table too big

2016-06-15 Thread Max Reitz
We refuse to open images whose L1 table we deem "too big". Consequently, we should not produce such images ourselves. Cc: qemu-sta...@nongnu.org Signed-off-by: Max Reitz <mre...@redhat.com> --- block/qcow2-cluster.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --g

Re: [Qemu-block] [Qemu-devel] Supplying QCOW2 as 'file' driver to `blockdev-add` results in a QEMU crash

2016-06-15 Thread Max Reitz
On 15.06.2016 11:58, Kashyap Chamarthy wrote: > Seems like supplying "qcow2" file BlockdevDriver option to QMP > `blockdev-add` results in a SIGSEGV: > > [...] > Thread 1 "qemu-system-x86" received signal SIGSEGV, Segmentation fault. > 0x55a0121f in visit_type_BlockdevRef ()

[Qemu-block] [PATCH 0/2] qcow2: Avoid making the L1 table too big

2016-06-15 Thread Max Reitz
. $ ./qemu-img info test.qcow2 qemu-img: Could not open 'test.qcow2': Active L1 table too large After this series: $ ./qemu-img resize test.qcow2 10T qemu-img: Error resizing image: File too large Max Reitz (2): qemu-img: Use strerror() for generic resize error qcow2: Avoid making the L1

[Qemu-block] [PATCH 1/2] qemu-img: Use strerror() for generic resize error

2016-06-15 Thread Max Reitz
Emitting the plain error number is not very helpful. Use strerror() instead. Signed-off-by: Max Reitz <mre...@redhat.com> --- qemu-img.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qemu-img.c b/qemu-img.c index 14e2661..d5ccd9a 100644 --- a/qemu-img.c +++ b/qemu

Re: [Qemu-block] [PATCH v5 18/27] mirror: Disable image locking on target backing chain

2016-06-03 Thread Max Reitz
On 03.06.2016 08:32, Fam Zheng wrote: > On Tue, 05/24 20:20, Max Reitz wrote: >> On 17.05.2016 09:35, Fam Zheng wrote: >>> In sync=none the backing image of s->target is s->common.bs, which could >>> be exclusively locked, the image locking wouldn't work here.

Re: [Qemu-block] [PATCH v5 24/27] iotests: Disable image locking in 085

2016-06-03 Thread Max Reitz
On 03.06.2016 09:18, Fam Zheng wrote: > On Wed, 05/25 15:52, Max Reitz wrote: >> On 17.05.2016 09:35, Fam Zheng wrote: >>> The cases is about live snapshot features. Disable image locking because >>> otherwise a few tests are going to fail because we reuse the same

Re: [Qemu-block] [PATCH v2 2/3] block/mirror: Fix target backing BDS

2016-06-08 Thread Max Reitz
On 08.06.2016 16:40, Max Reitz wrote: > On 08.06.2016 13:28, Paolo Bonzini wrote: >> >> >> - Original Message - >>> From: "Kevin Wolf" <kw...@redhat.com> >>> To: "Max Reitz" <mre...@redhat.com> >>> Cc: qemu-b

Re: [Qemu-block] [PATCH 4/4] block: Create the commit block job before reopening any image

2016-05-27 Thread Max Reitz
_create() first. > > Signed-off-by: Alberto Garcia <be...@igalia.com> > --- > block/commit.c | 11 ++- > 1 file changed, 6 insertions(+), 5 deletions(-) Reviewed-by: Max Reitz <mre...@redhat.com> signature.asc Description: OpenPGP digital signature

Re: [Qemu-block] [PATCH 3/4] block: Prevent sleeping jobs from resuming if they have been paused

2016-05-27 Thread Max Reitz
ile changed, 4 insertions(+), 2 deletions(-) Reviewed-by: Max Reitz <mre...@redhat.com> signature.asc Description: OpenPGP digital signature

Re: [Qemu-block] [PATCH 0/4] Misc block job patches

2016-05-27 Thread Max Reitz
On 27.05.2016 12:53, Alberto Garcia wrote: > Hi, > > here's a few patches from my block-stream series that I think are > ready to be merged now. > > I don't think there's anything controversial here: > > - Patches 1 and 2 simply use block_job_next() in places where > bdrv_next() was being

Re: [Qemu-block] [PATCH v5 07/27] block: Handle image locking during reopen

2016-05-27 Thread Max Reitz
On 27.05.2016 09:48, Fam Zheng wrote: > On Tue, 05/24 18:28, Max Reitz wrote: [...] >> Also: Should bdrv_reopen_prepare() check that the locking flags are not >> changed? > > Read only flag also matters in fcntl locks, so practically we almost always > need some

Re: [Qemu-block] [PATCH 1/4] block: use the block job list in bdrv_drain_all()

2016-05-27 Thread Max Reitz
all block jobs. > > Signed-off-by: Alberto Garcia <be...@igalia.com> > --- > block/io.c | 24 ++-- > 1 file changed, 18 insertions(+), 6 deletions(-) Reviewed-by: Max Reitz <mre...@redhat.com> signature.asc Description: OpenPGP digital signature

Re: [Qemu-block] [PATCH v5 14/27] qemu-img: Add "-L" option to sub commands

2016-06-02 Thread Max Reitz
On 01.06.2016 07:34, Fam Zheng wrote: > On Tue, 05/24 20:06, Max Reitz wrote: [...] >> Also: Should we have distinct flags for source and target for convert? >> For instance, I can imagine someone wanting not to lock the source but >> leave the target in default exc

Re: [Qemu-block] [PATCH 1/2] raw-posix: Fetch max sectors for host block device from sysfs

2016-06-02 Thread Max Reitz
On 26.05.2016 08:15, Fam Zheng wrote: > This is sometimes a useful value we should count in. > > Signed-off-by: Fam Zheng > --- > block/raw-posix.c | 47 +++ > 1 file changed, 47 insertions(+) > > diff --git a/block/raw-posix.c

[Qemu-block] [PATCH 2/2] iotests: Add test for post-mirror backing chains

2016-05-26 Thread Max Reitz
Signed-off-by: Max Reitz <mre...@redhat.com> --- tests/qemu-iotests/155 | 218 + tests/qemu-iotests/155.out | 5 ++ tests/qemu-iotests/group | 1 + 3 files changed, 224 insertions(+) create mode 100755 tests/qemu-iotests/155 creat

[Qemu-block] [PATCH 1/2] block/mirror: Fix target backing BDS

2016-05-26 Thread Max Reitz
best, so let's do it there. Also, we do not need to drop the source's backing BDS. In most cases, the source will be deleted after the mirroring operation anyway, and if it is not, we probably want it to keep its own backing chain so it stays valid. Signed-off-by: Max Reitz <mre...@redhat.

[Qemu-block] [PATCH 0/2] block/mirror: Fix target backing BDS

2016-05-26 Thread Max Reitz
, bdrv_replace_in_backing_chain() should not attempt to find out which backing BDS is the right one. Instead, we should leave that to the mirror block job, namely mirror_exit(). Max Reitz (2): block/mirror: Fix target backing BDS iotests: Add test for post-mirror backing chains block.c

Re: [Qemu-block] [PATCH v3 08/14] block/nbd: Accept SocketAddress

2016-06-15 Thread Max Reitz
On 15.06.2016 01:14, Eric Blake wrote: > On 04/06/2016 12:28 PM, Max Reitz wrote: >> Add a new option "address" to the NBD block driver which accepts a >> SocketAddress. >> >> "path", "host" and "port" are still supported as le

Re: [Qemu-block] [PATCH 02/17] blkreplay: Convert to byte-based I/O

2016-06-22 Thread Max Reitz
insertions(+), 8 deletions(-) Reviewed-by: Max Reitz <mre...@redhat.com> signature.asc Description: OpenPGP digital signature

Re: [Qemu-block] [PATCH 01/17] vvfat: Use BdrvChild for s->qcow

2016-06-22 Thread Max Reitz
On 21.06.2016 11:21, Kevin Wolf wrote: > vvfat uses a temporary qcow file to cache written data in read-write > mode. In order to do things properly, this should show up in the BDS > graph and I/O should go through BdrvChild like for every other node. > > Signed-off-by: Kevin Wolf

Re: [Qemu-block] [PATCH 03/17] vhdx: Some more BlockBackend use in vhdx_create()

2016-06-22 Thread Max Reitz
--- > block/vhdx.c | 41 + > 1 file changed, 21 insertions(+), 20 deletions(-) Reviewed-by: Max Reitz <mre...@redhat.com> signature.asc Description: OpenPGP digital signature

Re: [Qemu-block] [PATCH v5 02/10] HBitmap: Introduce "meta" bitmap to track bit changes

2016-06-22 Thread Max Reitz
On 03.06.2016 06:32, Fam Zheng wrote: > Upon each bit toggle, the corresponding bit in the meta bitmap will be > set. > > Signed-off-by: Fam Zheng > Reviewed-by: John Snow > --- > block/dirty-bitmap.c | 2 +- > include/qemu/hbitmap.h | 17 + >

Re: [Qemu-block] [PATCH v5 01/10] block: Hide HBitmap in block dirty bitmap interface

2016-06-22 Thread Max Reitz
backup.c | 14 -- > block/dirty-bitmap.c | 39 +-- > block/mirror.c | 24 +--- > include/block/dirty-bitmap.h | 7 +-- > include/qemu/typedefs.h | 1 + > 5 files chang

Re: [Qemu-block] [PATCH v5 03/10] tests: Add test code for meta bitmap

2016-06-22 Thread Max Reitz
On 03.06.2016 06:32, Fam Zheng wrote: > Signed-off-by: Fam Zheng <f...@redhat.com> > Reviewed-by: John Snow <js...@redhat.com> > --- > tests/test-hbitmap.c | 116 > +++ > 1 file changed, 116 insertions(+) Reviewed-by

Re: [Qemu-block] [PATCH v5 04/10] block: Support meta dirty bitmap

2016-06-22 Thread Max Reitz
of the meta bitmap. Each bit of the meta bitmap tracks at least eight bits of the dirty bitmap, so we're calling hbitmap_get() at least eight times as often as necessary here. Or we just use int gran = hbitmap_granularity(bitmap->meta);. Not exactly wrong, though, so: Reviewed-by: Max Rei

Re: [Qemu-block] [PATCH v5 06/10] block: Assert that bdrv_release_dirty_bitmap succeeded

2016-06-22 Thread Max Reitz
t.com> > --- > block/dirty-bitmap.c | 3 +++ > 1 file changed, 3 insertions(+) Reviewed-by: Max Reitz <mre...@redhat.com> signature.asc Description: OpenPGP digital signature

Re: [Qemu-block] [PATCH v5 05/10] block: Add two dirty bitmap getters

2016-06-22 Thread Max Reitz
; include/block/dirty-bitmap.h | 2 ++ > 2 files changed, 12 insertions(+) Reviewed-by: Max Reitz <mre...@redhat.com> signature.asc Description: OpenPGP digital signature

Re: [Qemu-block] [PATCH] block/qcow2: Don't use cpu_to_*w()

2016-06-20 Thread Max Reitz
On 16.06.2016 18:06, Peter Maydell wrote: > Don't use the cpu_to_*w() functions, which we are trying to deprecate. > Instead either just use cpu_to_*() to do the byteswap, or use > st*_be_p() if we need to do the store somewhere other than to a > variable that's already the correct type. > >

Re: [Qemu-block] [PATCH 02/15] blockjob: Decouple the ID from the device name in the BlockJob struct

2016-06-20 Thread Max Reitz
On 09.06.2016 10:20, Alberto Garcia wrote: > Block jobs are identified by the name of the BlockBackend of the BDS > where the job was started. > > We want block jobs to have unique, arbitrary identifiers that are not > tied to a block device, so this patch decouples the ID from the device > name

Re: [Qemu-block] [PATCH 01/15] stream: Fix prototype of stream_start()

2016-06-20 Thread Max Reitz
t; 1 file changed, 6 insertions(+), 5 deletions(-) Reviewed-by: Max Reitz <mre...@redhat.com> signature.asc Description: OpenPGP digital signature

[Qemu-block] [PATCH 2/2] qcow2: Fix qcow2_get_cluster_offset()

2016-06-20 Thread Max Reitz
map foo.qcow2 This patch removes the now wrong assertion, adding comments and more assertions to prove its correctness (and fixing the overflow which would become apparent with the original assertion removed). Signed-off-by: Max Reitz <mre...@redhat.com> --- block/qcow2-cluster.c | 16 ++

[Qemu-block] [PATCH 0/2] qcow2: Fix qcow2_get_cluster_offset()

2016-06-20 Thread Max Reitz
Patch 2 fixes a wrong assertion in qcow2_get_cluster_offet(). Patch 1 fixes wrong range limitations I encountered in qemu-io while trying to break that wrong assertion. Not CC-ing qemu-stable because these issues were introduced after 2.6.0. Max Reitz (2): qemu-io: Use correct range

[Qemu-block] [PATCH 1/2] qemu-io: Use correct range limitations

2016-06-20 Thread Max Reitz
that does not exceed INT_MAX, not the sector count. Signed-off-by: Max Reitz <mre...@redhat.com> --- qemu-io-cmds.c | 13 ++--- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/qemu-io-cmds.c b/qemu-io-cmds.c index 09e879f..8237c2f 100644 --- a/qemu-io-cmds.c +++ b/q

Re: [Qemu-block] [PATCH 08/15] stream: Add 'job-id' parameter to 'block-stream'

2016-06-20 Thread Max Reitz
++- > 6 files changed, 23 insertions(+), 17 deletions(-) Reviewed-by: Max Reitz <mre...@redhat.com> signature.asc Description: OpenPGP digital signature

Re: [Qemu-block] [PATCH 03/15] blockjob: Add block_job_get()

2016-06-20 Thread Max Reitz
> > Signed-off-by: Alberto Garcia <be...@igalia.com> > --- > blockjob.c | 13 + > include/block/blockjob.h | 10 ++ > 2 files changed, 23 insertions(+) Reviewed-by: Max Reitz <mre...@redhat.com> Just to throw out a suggestion, I'm

Re: [Qemu-block] [PATCH 05/15] blockjob: Add 'job_id' parameter to block_job_create()

2016-06-20 Thread Max Reitz
+--- > tests/test-blockjob-txn.c | 2 +- > 7 files changed, 26 insertions(+), 12 deletions(-) Reviewed-by: Max Reitz <mre...@redhat.com> signature.asc Description: OpenPGP digital signature

Re: [Qemu-block] [PATCH 07/15] backup: Add 'job-id' parameter to 'blockdev-backup' and 'drive-backup'

2016-06-20 Thread Max Reitz
.json | 10 +++--- > qmp-commands.hx | 8 +--- > 6 files changed, 46 insertions(+), 33 deletions(-) Reviewed-by: Max Reitz <mre...@redhat.com> signature.asc Description: OpenPGP digital signature

Re: [Qemu-block] [PATCH 04/15] block: Simplify find_block_job() and make it accept a job ID

2016-06-20 Thread Max Reitz
On 09.06.2016 10:20, Alberto Garcia wrote: > find_block_job() looks for a block backend with a specified name, > checks whether it has a block job and acquires its AioContext. This > patch uses block_job_next() and iterate directly over the block jobs. > > In addition to that we want to identify

Re: [Qemu-block] [PATCH 06/15] mirror: Add 'job-id' parameter to 'blockdev-mirror' and 'drive-mirror'

2016-06-20 Thread Max Reitz
On 20.06.2016 19:33, Max Reitz wrote: > On 09.06.2016 10:20, Alberto Garcia wrote: >> This patch adds a new optional 'job-id' parameter to 'blockdev-mirror' >> and 'drive-mirror', allowing the user to specify the ID of the block >> job to be created. >> >> The H

Re: [Qemu-block] [PATCH 09/15] stream: Add 'job-id' parameter to 'block-commit'

2016-06-20 Thread Max Reitz
files changed, 28 insertions(+), 19 deletions(-) With the commit message fixed to read s/^stream/commit/: Reviewed-by: Max Reitz <mre...@redhat.com> signature.asc Description: OpenPGP digital signature

Re: [Qemu-block] [PATCH 04/15] block: Simplify find_block_job() and make it accept a job ID

2016-06-20 Thread Max Reitz
On 20.06.2016 18:40, Max Reitz wrote: > On 09.06.2016 10:20, Alberto Garcia wrote: >> find_block_job() looks for a block backend with a specified name, >> checks whether it has a block job and acquires its AioContext. This >> patch uses block_job_next() and iterate directl

Re: [Qemu-block] [PATCH 10/15] blockjob: Add 'id' parameter to 'block-job-set-speed'

2016-06-20 Thread Max Reitz
command remains unchanged. > > Signed-off-by: Alberto Garcia <be...@igalia.com> > --- > blockdev.c | 7 +-- > hmp.c| 2 +- > qapi/block-core.json | 9 +++-- > qmp-commands.hx | 2 +- > 4 files changed, 14 insertions(+), 6 deletions(

Re: [Qemu-block] [PATCH 12/15] blockjob: Add 'id' parameter to 'block-job-pause'

2016-06-20 Thread Max Reitz
mains unchanged. > > Signed-off-by: Alberto Garcia <be...@igalia.com> > --- > blockdev.c | 7 +-- > hmp.c| 2 +- > qapi/block-core.json | 9 +++-- > qmp-commands.hx | 2 +- > 4 files changed, 14 insertions(+), 6 deletions(

Re: [Qemu-block] [PATCH 14/15] blockjob: Add 'id' parameter to 'block-job-complete'

2016-06-20 Thread Max Reitz
mains unchanged. > > Signed-off-by: Alberto Garcia <be...@igalia.com> > --- > blockdev.c | 7 +-- > hmp.c| 2 +- > qapi/block-core.json | 7 ++- > qmp-commands.hx | 2 +- > 4 files changed, 13 insertions(+), 5 deletions(

Re: [Qemu-block] [PATCH 11/15] blockjob: Add 'id' parameter to 'block-job-cancel'

2016-06-20 Thread Max Reitz
mains unchanged. > > Signed-off-by: Alberto Garcia <be...@igalia.com> > --- > blockdev.c | 7 +-- > hmp.c| 2 +- > qapi/block-core.json | 10 -- > qmp-commands.hx | 2 +- > 4 files changed, 15 insertions(+), 6 deletions(

Re: [Qemu-block] [PATCH 13/15] blockjob: Add 'id' parameter to 'block-job-resume'

2016-06-20 Thread Max Reitz
mains unchanged. > > Signed-off-by: Alberto Garcia <be...@igalia.com> > --- > blockdev.c | 7 +-- > hmp.c| 2 +- > qapi/block-core.json | 7 ++- > qmp-commands.hx | 2 +- > 4 files changed, 13 insertions(+), 5 deletions(

Re: [Qemu-block] [PATCH 03/15] blockjob: Add block_job_get()

2016-06-20 Thread Max Reitz
On 20.06.2016 20:48, Eric Blake wrote: > On 06/20/2016 10:24 AM, Max Reitz wrote: >> On 09.06.2016 10:20, Alberto Garcia wrote: >>> Currently the way to look for a specific block job is to iterate the >>> list manually using block_job_next(). >>> >>&g

Re: [Qemu-block] [PATCH 15/15] blockjob: Add 'id' field to 'BlockJobInfo' and all BLOCK_JOB_* events

2016-06-20 Thread Max Reitz
On 09.06.2016 10:20, Alberto Garcia wrote: > Now that all jobs have an ID and all QMP commands that create and > operate on block jobs can specify one we can finally expose the ID in > all BLOCK_JOB_* events and the BlockJobInfo structure. > > This modifies the output of several iotests, but now

Re: [Qemu-block] [Qemu-devel] [PATCH] block: acquire in bdrv_query_image_info

2016-01-14 Thread Max Reitz
On 23.12.2015 11:48, Paolo Bonzini wrote: > NFS calls aio_poll inside bdrv_get_allocated_size. This requires > acquiring the AioContext. > > Signed-off-by: Paolo Bonzini > --- > block/qapi.c | 9 +++-- > 1 file changed, 7 insertions(+), 2 deletions(-) Thanks, applied

Re: [Qemu-block] [PATCH v3 1/2] blockdev: Error out on negative throttling option values

2016-01-14 Thread Max Reitz
On 14.01.2016 16:46, Max Reitz wrote: > On 14.01.2016 05:08, Fam Zheng wrote: >> The implicit casting from unsigned int to double changes negative values >> into large positive numbers and accepts them. We should instead print >> an error. >> >> Check the nu

Re: [Qemu-block] [PATCH 00/10] qcow2: Implement image locking

2016-01-14 Thread Max Reitz
On 22.12.2015 17:46, Kevin Wolf wrote: > Enough innocent images have died because users called 'qemu-img snapshot' > while > the VM was still running. Educating the users doesn't seem to be a working > strategy, so this series adds locking to qcow2 that refuses to access the > image > read-write

Re: [Qemu-block] [PATCH v10 1/2] mirror: Rewrite mirror_iteration

2016-01-14 Thread Max Reitz
-- > tests/qemu-iotests/109.out | 80 +-- > trace-events | 1 - > 3 files changed, 242 insertions(+), 172 deletions(-) Reviewed-by: Max Reitz <mre...@redhat.com> signature.asc Description: OpenPGP digital signature

Re: [Qemu-block] [PATCH v3 1/2] blockdev: Error out on negative throttling option values

2016-01-14 Thread Max Reitz
-off-by: Fam Zheng <f...@redhat.com> > --- > blockdev.c | 3 ++- > include/qemu/throttle.h | 2 ++ > util/throttle.c | 16 ++-- > 3 files changed, 10 insertions(+), 11 deletions(-) Reviewed-by: Max Reitz <mre...@redhat.com> > d

Re: [Qemu-block] [PATCH v3 2/2] iotests: Test that negative and large throttle values are rejected

2016-01-14 Thread Max Reitz
gt; 3 files changed, 60 insertions(+) Reviewed-by: Max Reitz <mre...@redhat.com> signature.asc Description: OpenPGP digital signature

Re: [Qemu-block] [PATCH 14/17] block: Convert bdrv_pwrite(v/_sync) to BdrvChild

2016-06-27 Thread Max Reitz
block/vhdx.c | 2 +- > block/vmdk.c | 12 +--- > block/vpc.c| 8 > include/block/block.h | 9 - > 15 files changed, 66 insertions(+), 70 deletions(-) Reviewed-by: Max Reitz <mre...@redhat.com> signature.asc Description: OpenPGP digital signature

Re: [Qemu-block] [PATCH 15/17] block: Convert bdrv_pwrite_zeroes() to BdrvChild

2016-06-27 Thread Max Reitz
| 2 +- > block/qcow2.c | 4 ++-- > include/block/block.h | 4 ++-- > include/sysemu/block-backend.h | 1 + > qemu-img.c | 2 +- > 8 files changed, 18 insertions(+), 11 deletions(-) Reviewed-by: Max Reitz <mre...@redhat.com> signature.asc Description: OpenPGP digital signature

Re: [Qemu-block] [PATCH 13/17] block: Convert bdrv_pread(v) to BdrvChild

2016-06-27 Thread Max Reitz
++ > include/block/block.h | 5 ++--- > 18 files changed, 108 insertions(+), 101 deletions(-) Reviewed-by: Max Reitz <mre...@redhat.com> But I do take issue with a comment in this patch, see below. [...] > diff --git a/block/vhdx.c b/block/vhdx.c > index b0f66de..c5ec60

Re: [Qemu-block] [PATCH 16/17] block: Convert bdrv_prwv_co() to BdrvChild

2016-06-27 Thread Max Reitz
bdrv_flush(BlockDriverState *bs) > { > Coroutine *co; > -RwCo rwco = { > +FlushCo rwco = { > .bs = bs, > .ret = NOT_DONE, > }; > Renaming the variable to something other than rwco would make sense, but I'll leave that up to you. Reviewed-by: Max Reitz <mre...@redhat.com> signature.asc Description: OpenPGP digital signature

Re: [Qemu-block] [RFC PATCH 0/7] BlockBackends, nodes and guest devices

2016-06-27 Thread Max Reitz
On 27.06.2016 18:38, Kevin Wolf wrote: > Am 27.06.2016 um 18:13 hat Max Reitz geschrieben: >> I'm not sure if WCE truly is a guest device property, but adding it as a >> guest device property and then syncing it to the BB makes sense (as done >> in patch 7). > >

Re: [Qemu-block] [PATCH 04/17] block: Convert bdrv_co_readv() to BdrvChild

2016-06-25 Thread Max Reitz
gt; block/vhdx.c | 2 +- > include/block/block.h | 4 ++-- > 7 files changed, 12 insertions(+), 13 deletions(-) Reviewed-by: Max Reitz <mre...@redhat.com> signature.asc Description: OpenPGP digital signature

Re: [Qemu-block] [PATCH 05/17] block: Convert bdrv_co_writev() to BdrvChild

2016-06-25 Thread Max Reitz
de/block/block.h | 4 ++-- > 6 files changed, 9 insertions(+), 9 deletions(-) Reviewed-by: Max Reitz <mre...@redhat.com> Side note: I'd be completely happy with renaming these functions, as proposed by Paolo. But I'm fine with them staying as they are, too. Max signature.asc Description: OpenPGP digital signature

Re: [Qemu-block] [PATCH 06/17] block: Convert bdrv_aio_readv() to BdrvChild

2016-06-25 Thread Max Reitz
gt; block/quorum.c| 4 ++-- > include/block/block.h | 2 +- > 7 files changed, 13 insertions(+), 13 deletions(-) Reviewed-by: Max Reitz <mre...@redhat.com> signature.asc Description: OpenPGP digital signature

Re: [Qemu-block] [PATCH 07/17] block: Convert bdrv_aio_writev() to BdrvChild

2016-06-25 Thread Max Reitz
gt; block/quorum.c| 4 ++-- > include/block/block.h | 2 +- > 7 files changed, 13 insertions(+), 13 deletions(-) Reviewed-by: Max Reitz <mre...@redhat.com> signature.asc Description: OpenPGP digital signature

Re: [Qemu-block] [PATCH 08/17] block: Convert bdrv_co_do_readv/writev to BdrvChild

2016-06-25 Thread Max Reitz
On 21.06.2016 11:21, Kevin Wolf wrote: > Signed-off-by: Kevin Wolf <kw...@redhat.com> > --- > block/io.c | 29 +++-- > 1 file changed, 15 insertions(+), 14 deletions(-) Reviewed-by: Max Reitz <mre...@redhat.com> signature.asc Description: OpenPGP digital signature

Re: [Qemu-block] [PATCH 10/17] block: Use BlockBackend for I/O in bdrv_commit()

2016-06-25 Thread Max Reitz
kalign() for bs will choose an alignment that works for > * bs->backing->bs as well, so no need to compare the alignment > manually. */ This comment will need a little change, too. With that done: Reviewed-by: Max Reitz <mre...@redhat.com> > -buf = qe

Re: [Qemu-block] [Qemu-devel] [PATCH 1/2] qemu-iotests: add _filter_qmp_events() for filtering out QMP events

2016-02-10 Thread Max Reitz
On 09.02.2016 14:23, Sascha Silbe wrote: > The order of some QMP events may depend on the architecture being > tested. Add support for filtering out QMP events so we can use a > single reference output for all architecture when the test doesn't > care about the events. > > Signed-off-by: Sascha

Re: [Qemu-block] [PATCH v9 3/3] qmp: add monitor command to add/remove a child

2016-02-10 Thread Max Reitz
On 25.12.2015 10:22, Changlong Xie wrote: > From: Wen Congyang > > The new QMP command name is x-blockdev-change. It's just for adding/removing > quorum's child now, and doesn't support all kinds of children, all kinds of > operations, nor all block drivers. So it is

Re: [Qemu-block] [PATCH v12 1/2] mirror: Rewrite mirror_iteration

2016-02-06 Thread Max Reitz
On 05.02.2016 03:00, Fam Zheng wrote: > The "pnum < nb_sectors" condition in deciding whether to actually copy > data is unnecessarily strict, and the qiov initialization is > unnecessarily for bdrv_aio_write_zeroes and bdrv_aio_discard. > > Rewrite mirror_iteration to fix both flaws. > > The

Re: [Qemu-block] [PATCH v8 12/16] blockdev: Keep track of monitor-owned BDS

2016-01-29 Thread Max Reitz
On 28.01.2016 04:33, Fam Zheng wrote: > On Wed, 01/27 18:59, Max Reitz wrote: >> Signed-off-by: Max Reitz <mre...@redhat.com> >> --- >> blockdev.c | 26 ++ >> include/block/block_int.h

Re: [Qemu-block] [PATCH v8 06/16] nbd: Switch from close to eject notifier

2016-01-29 Thread Max Reitz
On 28.01.2016 04:26, Fam Zheng wrote: > On Wed, 01/27 18:59, Max Reitz wrote: >> The NBD code uses the BDS close notifier to determine when a medium is >> ejected. However, now it should use the BB's BDS removal notifier for >> that instead of the BDS's close notifier. >

Re: [Qemu-block] [PATCH v8 14/16] block: Rewrite bdrv_close_all()

2016-01-29 Thread Max Reitz
On 28.01.2016 05:17, Fam Zheng wrote: > On Wed, 01/27 18:59, Max Reitz wrote: >> This patch rewrites bdrv_close_all(): Until now, all root BDSs have been >> force-closed. This is bad because it can lead to cached data not being >> flushed to disk. >> >> Instead,

Re: [Qemu-block] [PATCH v8 05/16] virtio-scsi: Catch BDS-BB removal/insertion

2016-01-29 Thread Max Reitz
On 29.01.2016 13:41, Kevin Wolf wrote: > Am 27.01.2016 um 18:59 hat Max Reitz geschrieben: >> Make use of the BDS-BB removal and insertion notifiers to remove or set >> up, respectively, virtio-scsi's op blockers. >> >> Signed-off-by: Max Reitz <mre...@redhat.com>

[Qemu-block] [PATCH v9 01/16] block: Release named dirty bitmaps in bdrv_close()

2016-01-29 Thread Max Reitz
dirty bitmaps in bdrv_close() (there should not be any unnamed bitmaps left) and moving the assertion from bdrv_delete() there. Signed-off-by: Max Reitz <mre...@redhat.com> --- block.c | 39 +++ 1 file changed, 31 insertions(+), 8 deletions(-) diff

[Qemu-block] [PATCH v9 08/16] block: Use blk_remove_bs() in blk_delete()

2016-01-29 Thread Max Reitz
Signed-off-by: Max Reitz <mre...@redhat.com> Reviewed-by: Kevin Wolf <kw...@redhat.com> Reviewed-by: Fam Zheng <f...@redhat.com> --- block/block-backend.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/block/block-backend.c b/block/block-backe

[Qemu-block] [PATCH v9 09/16] blockdev: Use blk_remove_bs() in do_drive_del()

2016-01-29 Thread Max Reitz
Signed-off-by: Max Reitz <mre...@redhat.com> Reviewed-by: Kevin Wolf <kw...@redhat.com> Reviewed-by: Fam Zheng <f...@redhat.com> --- blockdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/blockdev.c b/blockdev.c index 1044a6a..09d4621 100644 ---

[Qemu-block] [PATCH v9 10/16] block: Make bdrv_close() static

2016-01-29 Thread Max Reitz
There are no users of bdrv_close() left, except for one of bdrv_open()'s failure paths, bdrv_close_all() and bdrv_delete(), and that is good. Make bdrv_close() static so nobody makes the mistake of directly using bdrv_close() again. Signed-off-by: Max Reitz <mre...@redhat.com> Reviewed-by

[Qemu-block] [PATCH v9 07/16] block: Remove BDS close notifier

2016-01-29 Thread Max Reitz
It is unused now, so we can remove it. Signed-off-by: Max Reitz <mre...@redhat.com> Reviewed-by: Fam Zheng <f...@redhat.com> Reviewed-by: Kevin Wolf <kw...@redhat.com> --- block.c| 8 block/block-backend.c | 7 --- include/block/bl

[Qemu-block] [PATCH v9 16/16] iotests: Add test for block jobs and BDS ejection

2016-01-29 Thread Max Reitz
Suggested-by: Paolo Bonzini <pbonz...@redhat.com> Signed-off-by: Max Reitz <mre...@redhat.com> Reviewed-by: Kevin Wolf <kw...@redhat.com> --- tests/qemu-iotests/141 | 186 + tests/qemu-iotests/141.out | 59 ++ tests/

[Qemu-block] [PATCH v9 00/16] block: Rework bdrv_close_all()

2016-01-29 Thread Max Reitz
] 'iotests: Add test for multiple BB on BDS tree' 016/16:[0002] [FC] 'iotests: Add test for block jobs and BDS ejection' Max Reitz (16): block: Release named dirty bitmaps in bdrv_close() iotests: Add test for eject under NBD server block: Add BB-BDS remove/insert notifiers virtio-blk

[Qemu-block] [PATCH v9 04/16] virtio-blk: Functions for op blocker management

2016-01-29 Thread Max Reitz
Put the code for setting up and removing op blockers into an own function, respectively. Then, we can invoke those functions whenever a BDS is removed from an virtio-blk BB or inserted into it. Signed-off-by: Max Reitz <mre...@redhat.com> Reviewed-by: Fam Zheng <f...@redhat.com&

[Qemu-block] [PATCH v9 03/16] block: Add BB-BDS remove/insert notifiers

2016-01-29 Thread Max Reitz
is added that is invoked whenever a BDS is inserted. We will need that for virtio-blk and virtio-scsi, which can then remove their op blockers on BDS ejection and set them up on insertion. Signed-off-by: Max Reitz <mre...@redhat.com> Reviewed-by: Kevin Wolf <kw...@redhat.com> Reviewed-by:

[Qemu-block] [PATCH v9 06/16] nbd: Switch from close to eject notifier

2016-01-29 Thread Max Reitz
The NBD code uses the BDS close notifier to determine when a medium is ejected. However, now it should use the BB's BDS removal notifier for that instead of the BDS's close notifier. Signed-off-by: Max Reitz <mre...@redhat.com> Reviewed-by: Fam Zheng <f...@redhat.com> Reviewed-by: Ke

[Qemu-block] [PATCH v9 11/16] block: Add list of all BlockDriverStates

2016-01-29 Thread Max Reitz
We need this list so that bdrv_close_all() can keep track of which BDSs are still open after having removed the BDSs from all of the BBs and having released all monitor BDS references. Signed-off-by: Max Reitz <mre...@redhat.com> Reviewed-by: Kevin Wolf <kw...@redhat.com> Reviewed-b

<    3   4   5   6   7   8   9   10   11   12   >