Re: [Qemu-block] [Qemu-devel] [Patch for-2.5 v2 6/6] hmp: add monitor command to add/remove a child

2015-08-31 Thread Markus Armbruster
Wen Congyang writes: > Ping... > Patch 1-4 have been reviewed by Alberto Garcia > Luiz Capitulino, Markus Armbruster, do you have time to review the > monitor command implementation? I will review at least the QMP parts of this series. My review queue has become painfully

Re: [Qemu-block] [Patch for-2.5 v2 3/6] Add new block driver interface to add/delete a BDS's child

2015-08-31 Thread Wen Congyang
On 09/01/2015 01:40 AM, Eric Blake wrote: > On 08/11/2015 01:51 AM, Wen Congyang wrote: >> In some cases, we want to take a quorum child offline, and take >> another child online. >> >> Signed-off-by: Wen Congyang >> Signed-off-by: zhanghailiang

Re: [Qemu-block] [Patch for-2.5 v2 1/6] QAPI: move InetSocketAddress to qapi/common.json

2015-08-31 Thread Eric Blake
On 08/11/2015 01:51 AM, Wen Congyang wrote: > It will be used by BlockdevOptionsNBD. > > Signed-off-by: Wen Congyang > Signed-off-by: zhanghailiang > Signed-off-by: Gonglei > Reviewed-by: Alberto Garcia

Re: [Qemu-block] [Patch for-2.5 v2 2/6] support nbd driver in blockdev-add

2015-08-31 Thread Eric Blake
On 08/11/2015 01:51 AM, Wen Congyang wrote: > Signed-off-by: Wen Congyang > Signed-off-by: zhanghailiang > Signed-off-by: Gonglei > Reviewed-by: Alberto Garcia > --- > qapi/block-core.json | 17

Re: [Qemu-block] [Patch for-2.5 v2 4/6] quorum: implement bdrv_add_child() and bdrv_del_child()

2015-08-31 Thread Eric Blake
On 08/11/2015 01:51 AM, Wen Congyang wrote: > Signed-off-by: Wen Congyang > Signed-off-by: zhanghailiang > Signed-off-by: Gonglei > Reviewed-by: Alberto Garcia > --- > block/quorum.c | 75 >

Re: [Qemu-block] [Qemu-devel] hd-geo-test creates 4GB files on FSes that don't support sparse images, doesn't delete them on error

2015-08-31 Thread John Snow
On 08/28/2015 09:06 AM, Markus Armbruster wrote: > John Snow writes: > >> On 08/27/2015 11:29 AM, Eric Blake wrote: >>> On 08/27/2015 09:17 AM, Peter Maydell wrote: I've noticed recently that tests/hd-geo-test.c creates test disk images which are 4GB in size, which

[Qemu-block] [PATCH 1/2] iotests: Do not suppress segfaults in bash tests

2015-08-31 Thread Max Reitz
Currently, if a qemu/qemu-io/qemu-img/qemu-nbd invocation receives a segmentation fault, that message is invisible in most cases since the output is generally filtered and bash suppresses the segmentation fault notice for any but the last element of a pipe. Most of the time, the test will then

Re: [Qemu-block] [Patch for-2.5 v2 5/6] qmp: add monitor command to add/remove a child

2015-08-31 Thread Eric Blake
On 08/11/2015 01:51 AM, Wen Congyang wrote: > Signed-off-by: Wen Congyang > Signed-off-by: zhanghailiang > Signed-off-by: Gonglei > --- > blockdev.c | 79 >

[Qemu-block] [PATCH 0/2] iotests: Emit signal-kill messages

2015-08-31 Thread Max Reitz
Currently, if a qemu-related command (qemu, qemu-io, qemu-img, qemu-nbd) is invoked in an iotest, receives a signal and is subsequently killed (e.g. a segmentation fault), this is not logged in the test output. The first patch in this series makes the bash tests no longer suppress that line, and

[Qemu-block] [PATCH 2/2] iotests: Warn if python subprocess is killed

2015-08-31 Thread Max Reitz
Currently, if a subprocess of a python test (i.e. qemu-io, qemu-img, or qemu) receives a signal and is subsequently aborted, this is not logged. This patch makes python tests always check the exit code of these subprocesses, and emit a message if they have been killed. Signed-off-by: Max Reitz

Re: [Qemu-block] [Qemu-devel] hd-geo-test creates 4GB files on FSes that don't support sparse images, doesn't delete them on error

2015-08-31 Thread Peter Maydell
On 31 August 2015 at 19:54, John Snow wrote: > Oh, taking a look at it, it needs to writethat MBR data to the file > before it opens it. We don't have an existing qemu-io dependency here to > use. > > I could add it, but the line between iotest and qtest starts to get > pretty

Re: [Qemu-block] [PATCH 1/1] block: Allow passing BlockdevOptions to blockdev-snapshot-sync

2015-08-31 Thread Max Reitz
On 31.08.2015 12:00, Alberto Garcia wrote: > Snapshots created using blockdev-snapshot-sync are currently opened > using their default options, not even inheriting those from the images > they are based on. > > This patch extends the command by adding an 'options' parameter that > takes a

Re: [Qemu-block] [Qemu-devel] [PATCH 1/1] block: Allow passing BlockdevOptions to blockdev-snapshot-sync

2015-08-31 Thread Eric Blake
On 08/31/2015 01:53 PM, Max Reitz wrote: > Design question: Would it make sense to instead add a "reference" mode > to blockdev-snapshot-sync where you can specify a BDS's node-name > instead of snapshot-file to use an existing BDS as the new top layer, > ideally an empty one? Indeed - then

Re: [Qemu-block] [Qemu-devel] [PATCH 1/1] block: Allow passing BlockdevOptions to blockdev-snapshot-sync

2015-08-31 Thread Max Reitz
On 31.08.2015 22:05, Eric Blake wrote: > On 08/31/2015 01:53 PM, Max Reitz wrote: > >> Design question: Would it make sense to instead add a "reference" mode >> to blockdev-snapshot-sync where you can specify a BDS's node-name >> instead of snapshot-file to use an existing BDS as the new top

Re: [Qemu-block] [PATCH V3] block/nfs: cache allocated filesize for read-only files

2015-08-31 Thread Jeff Cody
On Thu, Aug 27, 2015 at 12:30:41PM +0200, Peter Lieven wrote: > If the file is readonly its not expected to grow so > save the blocking call to nfs_fstat_async and use > the value saved at connection time. Also important > the monitor (and thus the main loop) will not hang > if block device info

Re: [Qemu-block] [Qemu-devel] [PATCH v4 1/6] block: Change bdrv_get_encrypted_filename()

2015-08-31 Thread Eric Blake
On 08/18/2015 05:10 PM, Max Reitz wrote: > Instead of returning a pointer to the filename, copy it into a buffer > specified by the caller. > > Signed-off-by: Max Reitz > --- > block.c | 25 ++--- > include/block/block.h | 2 +- > monitor.c

Re: [Qemu-block] [Qemu-devel] [PATCH v4 2/6] block: Avoid BlockDriverState.filename

2015-08-31 Thread Eric Blake
On 08/18/2015 05:10 PM, Max Reitz wrote: > In places which directly pass a filename to the OS, we should not use > the filename field at all but exact_filename instead (although the > former currently equals the latter if that is set). > > In raw_open_common(), we do not need to access

Re: [Qemu-block] [Qemu-devel] [PATCH v4 3/6] block: Add bdrv_filename()

2015-08-31 Thread Eric Blake
On 08/18/2015 05:10 PM, Max Reitz wrote: > Split the part which actually refreshes the BlockDriverState.filename > field off of bdrv_refresh_filename() into a more generic function > bdrv_filename(), which first calls bdrv_refresh_filename() and then > stores a qemu-usable filename into the given

Re: [Qemu-block] [Qemu-devel] [PATCH v4 4/6] qemu-img: Use bdrv_filename_alloc() for map

2015-08-31 Thread Eric Blake
On 08/18/2015 05:10 PM, Max Reitz wrote: > Replaces bs->filename by the result of bdrv_filename_alloc() in the > qemu-img map subcommand. Since that value is queried relatively often, > however, it should be cached. > > Signed-off-by: Max Reitz > --- > qemu-img.c | 14

Re: [Qemu-block] [Qemu-devel] [PATCH v4 5/6] block: Drop BlockDriverState.filename

2015-08-31 Thread Eric Blake
On 08/18/2015 05:10 PM, Max Reitz wrote: > That field is now only used during initialization of BlockDriverStates > (opening images) and for error or warning messages. Performance is not > that much of an issue here, so we can drop the field and replace its use > by a call to bdrv_filename() or

Re: [Qemu-block] [Qemu-devel] [PATCH v4 6/6] iotests: Test changed Quorum filename

2015-08-31 Thread Eric Blake
On 08/18/2015 05:10 PM, Max Reitz wrote: > After drive-mirror replacing a Quorum child, the filename of the Quorum > BDS should reflect the change. This patch replaces the existing test for > whether the operation did actually exchange the BDS (which simply tested > whether the new BDS existed) by

Re: [Qemu-block] [PATCH 1/2] iotests: Do not suppress segfaults in bash tests

2015-08-31 Thread Jeff Cody
On Mon, Aug 31, 2015 at 09:05:12PM +0200, Max Reitz wrote: > Currently, if a qemu/qemu-io/qemu-img/qemu-nbd invocation receives a > segmentation fault, that message is invisible in most cases since the > output is generally filtered and bash suppresses the segmentation fault > notice for any but

Re: [Qemu-block] [Patch for-2.5 v2 3/6] Add new block driver interface to add/delete a BDS's child

2015-08-31 Thread Wen Congyang
On 09/01/2015 01:40 AM, Eric Blake wrote: > On 08/11/2015 01:51 AM, Wen Congyang wrote: >> In some cases, we want to take a quorum child offline, and take >> another child online. >> >> Signed-off-by: Wen Congyang >> Signed-off-by: zhanghailiang

Re: [Qemu-block] [Patch for-2.5 v2 4/6] quorum: implement bdrv_add_child() and bdrv_del_child()

2015-08-31 Thread Wen Congyang
On 09/01/2015 02:53 AM, Eric Blake wrote: > On 08/11/2015 01:51 AM, Wen Congyang wrote: >> Signed-off-by: Wen Congyang >> Signed-off-by: zhanghailiang >> Signed-off-by: Gonglei >> Reviewed-by: Alberto Garcia

Re: [Qemu-block] [Patch for-2.5 v2 5/6] qmp: add monitor command to add/remove a child

2015-08-31 Thread Wen Congyang
On 09/01/2015 03:04 AM, Eric Blake wrote: > On 08/11/2015 01:51 AM, Wen Congyang wrote: >> Signed-off-by: Wen Congyang >> Signed-off-by: zhanghailiang >> Signed-off-by: Gonglei >> --- >> blockdev.c | 79

[Qemu-block] [PATCH 0/1] Allow passing BlockdevOptions to blockdev-snapshot-sync

2015-08-31 Thread Alberto Garcia
Here's my first attempt to solve the problem explained here: https://lists.gnu.org/archive/html/qemu-devel/2015-08/msg02847.html In short: there's no way to pass options to snapshots created using blockdev-snapshot-sync. This patch simply allows passing a BlockdevOptions structure to that

[Qemu-block] [PATCH 1/1] block: Allow passing BlockdevOptions to blockdev-snapshot-sync

2015-08-31 Thread Alberto Garcia
Snapshots created using blockdev-snapshot-sync are currently opened using their default options, not even inheriting those from the images they are based on. This patch extends the command by adding an 'options' parameter that takes a BlockdevOptions structure. Since some of the options that can

Re: [Qemu-block] [Qemu-devel] [PATCH 1/2] block/io: allow AIOCB without callback

2015-08-31 Thread Peter Lieven
Am 21.08.2015 um 08:12 schrieb Eric Blake: On 08/20/2015 01:14 AM, Peter Lieven wrote: If the backend storage is unresponsive and we cancel a request due to a timeout we cannot immediately destroy the AIOCB because the storage might complete the original request laster if it is responsive

Re: [Qemu-block] [PATCH] block/iscsi: validate block size returned from target

2015-08-31 Thread Peter Lieven
Am 14.08.2015 um 13:33 schrieb Peter Lieven: It has been reported that at least tgtd returns a block size of 0 for LUN 0. To avoid running into divide by zero later on and protect against other problematic block sizes validate the block size right at connection time. Cc: qemu-sta...@nongnu.org

Re: [Qemu-block] [Patch for-2.5 v2 5/6] qmp: add monitor command to add/remove a child

2015-08-31 Thread Wen Congyang
On 09/01/2015 03:04 AM, Eric Blake wrote: > On 08/11/2015 01:51 AM, Wen Congyang wrote: >> Signed-off-by: Wen Congyang >> Signed-off-by: zhanghailiang >> Signed-off-by: Gonglei >> --- >> blockdev.c | 79