Re: [Qemu-block] [Qemu-devel] [PATCH V4 0/6] ide: avoid main-loop hang on CDROM/NFS failure

2015-11-16 Thread Peter Lieven
Am 16.11.2015 um 07:17 schrieb Fam Zheng: On Fri, 11/13 17:44, John Snow wrote: On 11/12/2015 11:30 AM, Peter Lieven wrote: This series aims at avoiding a hanging main-loop if a vserver has a CDROM image mounted from a NFS share and that NFS share goes down. Typical situation is that users mou

Re: [Qemu-block] [PATCH V5] block/nfs: add support for setting debug level

2015-11-16 Thread Stefan Hajnoczi
On Fri, Nov 13, 2015 at 10:52:49AM +0100, Peter Lieven wrote: > Am 13.11.2015 um 10:45 schrieb Stefan Hajnoczi: > > On Mon, Nov 09, 2015 at 08:09:33AM +0100, Peter Lieven wrote: > >> recent libnfs versions support logging debug messages. Add > >> support for it in qemu through an URL parameter. > >

Re: [Qemu-block] [PATCH] block: make 'stats-intervals' a list of integers

2015-11-16 Thread Stefan Hajnoczi
On Wed, Nov 11, 2015 at 03:17:12PM +0200, Alberto Garcia wrote: > @@ -583,32 +592,48 @@ static BlockBackend *blockdev_init(const char *file, > QDict *bs_opts, > > block_acct_init(blk_get_stats(blk), account_invalid, account_failed); > > -if (stats_intervals) { > -c

Re: [Qemu-block] [PATCH] docs: update bitmaps.md

2015-11-16 Thread Stefan Hajnoczi
On Tue, Nov 10, 2015 at 06:00:17PM -0500, John Snow wrote: > Include new error handling scenarios for 2.5. > > Signed-off-by: John Snow > --- > docs/bitmaps.md | 157 > > 1 file changed, 157 insertions(+) Thanks, applied to my block tree

Re: [Qemu-block] [PATCH] block: make 'stats-intervals' a list of integers

2015-11-16 Thread Stefan Hajnoczi
On Fri, Nov 13, 2015 at 11:50:03AM +0100, Alberto Garcia wrote: > On Fri 13 Nov 2015 11:15:52 AM CET, Stefan Hajnoczi > wrote: > > blockdev.c: In function ‘blockdev_init’: > > blockdev.c:636:17: error: ‘length’ may be used uninitialized in this > > function [-Werror=maybe-uninitialized] > >

Re: [Qemu-block] [PATCH for-2.5] block: Call external_snapshot_clean after blockdev-snapshot

2015-11-16 Thread Fam Zheng
On Fri, 11/13 15:00, Alberto Garcia wrote: > Otherwise the AioContext will never be released. > > Signed-off-by: Alberto Garcia > --- > blockdev.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/blockdev.c b/blockdev.c > index fc85128..4dcc510 100644 > --- a/blockdev.c > +++ b/blockdev

[Qemu-block] [PATCH v2] virtio-blk: Fix double completion for werror=stop

2015-11-16 Thread Fam Zheng
When a request R is absorbed by request M, it is appended to the "mr_next" queue led by M, and is completed together with the completion of M, in virtio_blk_rw_complete. With error policy equals stop, if M has an I/O error, now R also gets prepended to the per device DMA restart queue, which will

Re: [Qemu-block] [PATCH] iotests: fix race in 030

2015-11-16 Thread Kevin Wolf
Am 11.11.2015 um 21:27 hat John Snow geschrieben: > the stop_test case tests that we can resume a block-stream > command after it has stopped/paused due to error. We cannot > always reliably query it before it finishes after resume, though, > so make this a conditional. > > The important thing is

Re: [Qemu-block] [PATCH] block: make 'stats-intervals' a list of integers

2015-11-16 Thread Alberto Garcia
On Mon 16 Nov 2015 04:46:44 AM CET, Stefan Hajnoczi wrote: >> early_err: >> qemu_opts_del(opts); >> +QDECREF(interval_dict); >> +QDECREF(interval_list); > > There is a codepath that reaches here without initializing interval_dict > or interval_list: > > qemu_opts_absorb_qdict(opts,

Re: [Qemu-block] [Qemu-devel] [PATCH v11 19/28] qapi: Change munging of CamelCase enum values

2015-11-16 Thread Markus Armbruster
Eric Blake writes: > On 11/13/2015 11:13 AM, Markus Armbruster wrote: > >> We need c_name() to protect ticklish identifiers only when its result is >> used as identifier. Not when it's *part* of an identifier, >> e.g. prefixed with qapi_, or camel_to_upper(type_name) + '_'. >> >> We can protect

Re: [Qemu-block] [Qemu-devel] [PATCH v7 03/24] block: Release dirty bitmaps in bdrv_close()

2015-11-16 Thread Fam Zheng
On Fri, 11/13 17:49, John Snow wrote: > > > On 11/12/2015 01:23 AM, Fam Zheng wrote: > > On Mon, 11/09 23:39, Max Reitz wrote: > >> bdrv_delete() is not very happy about deleting BlockDriverStates with > >> dirty bitmaps still attached to them. In the past, we got around that > >> very easily by

Re: [Qemu-block] [PATCH V5] block/nfs: add support for setting debug level

2015-11-16 Thread John Snow
On 11/15/2015 10:25 PM, Stefan Hajnoczi wrote: > On Fri, Nov 13, 2015 at 10:52:49AM +0100, Peter Lieven wrote: >> Am 13.11.2015 um 10:45 schrieb Stefan Hajnoczi: >>> On Mon, Nov 09, 2015 at 08:09:33AM +0100, Peter Lieven wrote: recent libnfs versions support logging debug messages. Add

Re: [Qemu-block] [PATCH] virtio-blk: Fix double completion for werror=stop

2015-11-16 Thread Fam Zheng
On Fri, 11/13 14:17, Paolo Bonzini wrote: > > > On 13/11/2015 10:32, Fam Zheng wrote: > > When a request R is absorbed by request M, it is appended to the > > "mr_next" queue led by M, and is completed together with the completion > > of M, in virtio_blk_rw_complete. > > > > With error policy eq

Re: [Qemu-block] [Qemu-devel] [PATCH V4 0/6] ide: avoid main-loop hang on CDROM/NFS failure

2015-11-16 Thread Fam Zheng
On Fri, 11/13 17:44, John Snow wrote: > > > On 11/12/2015 11:30 AM, Peter Lieven wrote: > > This series aims at avoiding a hanging main-loop if a vserver has a > > CDROM image mounted from a NFS share and that NFS share goes down. > > Typical situation is that users mount an CDROM ISO to install

Re: [Qemu-block] [Qemu-devel] [PATCH] iotests: fix race in 030

2015-11-16 Thread Fam Zheng
On Wed, 11/11 15:27, John Snow wrote: > the stop_test case tests that we can resume a block-stream > command after it has stopped/paused due to error. We cannot > always reliably query it before it finishes after resume, though, > so make this a conditional. > > The important thing is that we are

Re: [Qemu-block] [PATCH V5] block/nfs: add support for setting debug level

2015-11-16 Thread Stefan Hajnoczi
On Fri, Nov 13, 2015 at 01:19:55PM -0500, Jeff Cody wrote: > On Fri, Nov 13, 2015 at 05:45:09PM +0800, Stefan Hajnoczi wrote: > > On Mon, Nov 09, 2015 at 08:09:33AM +0100, Peter Lieven wrote: > > > recent libnfs versions support logging debug messages. Add > > > support for it in qemu through an UR

[Qemu-block] [PATCH] aio-epoll: Fix use-after-free of node

2015-11-16 Thread Fam Zheng
aio_epoll_update needs the fields in node, so delay the free. Reported-by: Paolo Bonzini Signed-off-by: Fam Zheng --- aio-posix.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/aio-posix.c b/aio-posix.c index 06148a9..482b316 100644 --- a/aio-posix.c +++ b/aio-posix.c

[Qemu-block] [PATCH v2 1/1] block: make 'stats-interval' an array of ints instead of a string

2015-11-16 Thread Alberto Garcia
This is the natural JSON representation and prevents us from having to decode the list manually. Signed-off-by: Alberto Garcia --- blockdev.c | 91 +++--- qapi/block-core.json | 7 ++-- tests/qemu-iotests/136 | 2 +- 3 files changed, 61

[Qemu-block] [PATCH for-2.5 v2 0/1] block: make 'stats-interval' an array of ints instead of a string

2015-11-16 Thread Alberto Garcia
Second version of the patch, following all suggestions by Stefan. v2: - The code that parses the intervals has been moved to a separate function - Due to the previous change, the loop has been modified a bit and the original 'length' variable no longer exists. - interval_dict and interval_list

Re: [Qemu-block] [PATCH v2] virtio-blk: Fix double completion for werror=stop

2015-11-16 Thread Laurent Vivier
On 16/11/2015 07:10, Fam Zheng wrote: > When a request R is absorbed by request M, it is appended to the > "mr_next" queue led by M, and is completed together with the completion > of M, in virtio_blk_rw_complete. > > With error policy equals stop, if M has an I/O error, now R also gets > prepen

Re: [Qemu-block] [Qemu-devel] [PATCH v7 19/24] block: Add list of all BlockDriverStates

2015-11-16 Thread Max Reitz
On 12.11.2015 08:12, Fam Zheng wrote: > On Mon, 11/09 23:39, Max Reitz wrote: >> 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 Re

Re: [Qemu-block] [Qemu-devel] [PATCH v7 22/24] block: Rewrite bdrv_close_all()

2015-11-16 Thread Max Reitz
On 12.11.2015 08:34, Fam Zheng wrote: > On Mon, 11/09 23:39, 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, try to make all reference holders re

Re: [Qemu-block] [Qemu-devel] [PATCH v7 03/24] block: Release dirty bitmaps in bdrv_close()

2015-11-16 Thread John Snow
On 11/15/2015 08:27 PM, Fam Zheng wrote: > On Fri, 11/13 17:49, John Snow wrote: >> >> >> On 11/12/2015 01:23 AM, Fam Zheng wrote: >>> On Mon, 11/09 23:39, Max Reitz wrote: bdrv_delete() is not very happy about deleting BlockDriverStates with dirty bitmaps still attached to them. In the

Re: [Qemu-block] [PATCH v4] mirror: Rewrite mirror_iteration

2015-11-16 Thread Max Reitz
On 12.11.2015 04:44, 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. > > Signed-

Re: [Qemu-block] [Qemu-devel] [PATCH V4 0/6] ide: avoid main-loop hang on CDROM/NFS failure

2015-11-16 Thread John Snow
On 11/16/2015 01:17 AM, Fam Zheng wrote: > On Fri, 11/13 17:44, John Snow wrote: >> >> >> On 11/12/2015 11:30 AM, Peter Lieven wrote: >>> This series aims at avoiding a hanging main-loop if a vserver has a >>> CDROM image mounted from a NFS share and that NFS share goes down. >>> Typical situatio

Re: [Qemu-block] [PATCH for-2.5] block: Call external_snapshot_clean after blockdev-snapshot

2015-11-16 Thread Max Reitz
On 13.11.2015 14:00, Alberto Garcia wrote: > Otherwise the AioContext will never be released. > > Signed-off-by: Alberto Garcia > --- > blockdev.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/blockdev.c b/blockdev.c > index fc85128..4dcc510 100644 > --- a/blockdev.c > +++ b/blockdev

[Qemu-block] blkdebug event names [was: What to do about QAPI naming convention violations]

2015-11-16 Thread Eric Blake
On 11/10/2015 07:35 AM, Markus Armbruster wrote: >>> Oddballs not related to case: >>> >>> * enum BlkdebugEvent uses '.' in member names > I had a closer look at how the screwy names are used in QMP to see how > much of the mess is fixable within reason. > > BlkdebugEvent is related to the exte

Re: [Qemu-block] [PATCH] aio-epoll: Fix use-after-free of node

2015-11-16 Thread Stefan Hajnoczi
On Mon, Nov 16, 2015 at 02:32:14PM +0800, Fam Zheng wrote: > aio_epoll_update needs the fields in node, so delay the free. > > Reported-by: Paolo Bonzini > Signed-off-by: Fam Zheng > --- > aio-posix.c | 6 +- > 1 file changed, 5 insertions(+), 1 deletion(-) Thanks, applied to my block tree

Re: [Qemu-block] [PATCH for-2.5 v2 0/1] block: make 'stats-interval' an array of ints instead of a string

2015-11-16 Thread Stefan Hajnoczi
On Mon, Nov 16, 2015 at 11:28:37AM +0200, Alberto Garcia wrote: > Second version of the patch, following all suggestions by Stefan. > > v2: > - The code that parses the intervals has been moved to a separate > function > - Due to the previous change, the loop has been modified a bit and the >

Re: [Qemu-block] [Qemu-devel] [PATCH V4 0/6] ide: avoid main-loop hang on CDROM/NFS failure

2015-11-16 Thread Fam Zheng
On Mon, 11/16 14:24, John Snow wrote: > >> It looks sane to me: > >> > >> Reviewed-by: John Snow > >> > >> Fam, Stefan: Do you think this is still sane for 2.5? I am inclined to > >> get it in as a fix, especially since we've been bouncing it around for > >> so long. > > > > I have no objection h

Re: [Qemu-block] [Qemu-devel] [PATCH v7 03/24] block: Release dirty bitmaps in bdrv_close()

2015-11-16 Thread Fam Zheng
On Mon, 11/16 12:07, John Snow wrote: > > > On 11/15/2015 08:27 PM, Fam Zheng wrote: > > On Fri, 11/13 17:49, John Snow wrote: > >> > >> > >> On 11/12/2015 01:23 AM, Fam Zheng wrote: > >>> On Mon, 11/09 23:39, Max Reitz wrote: > bdrv_delete() is not very happy about deleting BlockDriverState

Re: [Qemu-block] [PATCH v2] virtio-blk: Fix double completion for werror=stop

2015-11-16 Thread Stefan Hajnoczi
On Mon, Nov 16, 2015 at 02:10:36PM +0800, Fam Zheng wrote: > When a request R is absorbed by request M, it is appended to the > "mr_next" queue led by M, and is completed together with the completion > of M, in virtio_blk_rw_complete. > > With error policy equals stop, if M has an I/O error, now R

Re: [Qemu-block] [PATCH v4] mirror: Rewrite mirror_iteration

2015-11-16 Thread Fam Zheng
On Mon, 11/16 20:32, Max Reitz wrote: > On 12.11.2015 04:44, 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. > > > > Rewrit

Re: [Qemu-block] [PATCH v2] virtio-blk: Fix double completion for werror=stop

2015-11-16 Thread Fam Zheng
On Tue, 11/17 14:58, Stefan Hajnoczi wrote: > On Mon, Nov 16, 2015 at 02:10:36PM +0800, Fam Zheng wrote: > > When a request R is absorbed by request M, it is appended to the > > "mr_next" queue led by M, and is completed together with the completion > > of M, in virtio_blk_rw_complete. > > > > Wit

Re: [Qemu-block] [Qemu-devel] blkdebug event names [was: What to do about QAPI naming convention violations]

2015-11-16 Thread Markus Armbruster
Eric Blake writes: > On 11/10/2015 07:35 AM, Markus Armbruster wrote: > Oddballs not related to case: * enum BlkdebugEvent uses '.' in member names > >> I had a closer look at how the screwy names are used in QMP to see how >> much of the mess is fixable within reason. >> > >> Blk