Re: [Qemu-block] [PATCH v2 07/22] qemu-nbd: Avoid strtol open-coding

2019-01-04 Thread Eric Blake
On 12/18/18 9:11 AM, Vladimir Sementsov-Ogievskiy wrote: > 15.12.2018 16:53, Eric Blake wrote: >> Our copy-and-pasted open-coding of strtol handling forgot to >> handle overflow conditions. Use qemu_strto*() instead. >> >> In the case of --partition, since we insist on a user-supplied >> partition

Re: [Qemu-block] [Qemu-devel] [PATCH v2 04/22] qemu-nbd: Enhance man page

2019-01-04 Thread Eric Blake
On 12/17/18 9:19 AM, Eric Blake wrote: >> >>> +@c man begin EXAMPLES >>> +Start a server listening on port 10809 that exposes only the >>> +guest-visible contents of a qcow2 file, with no TLS encryption, and >>> +with the default export name (an empty string). The command will block >>> +until the

Re: [Qemu-block] [PATCH v2 03/22] maint: Allow for EXAMPLES in texi2pod

2019-01-04 Thread Eric Blake
On 12/18/18 7:46 AM, Vladimir Sementsov-Ogievskiy wrote: > 15.12.2018 16:53, Eric Blake wrote: >> The next commit will add an EXAMPLES section to qemu-nbd.8; >> for that to work, we need to recognize EXAMPLES in texi2pod, >> and we need to make all man pages be regenerated since the >> output of te

Re: [Qemu-block] [PATCH v4 08/10] block/nbd: add cmdline and qapi parameter reconnect-delay

2019-01-04 Thread Eric Blake
On 7/31/18 12:30 PM, Vladimir Sementsov-Ogievskiy wrote: > Reconnect will be implemented in the following commit, so for now, > in semantics below, disconnect itself is a "serious error". > > Signed-off-by: Vladimir Sementsov-Ogievskiy > --- > qapi/block-core.json | 12 +++- > block/nbd-

Re: [Qemu-block] [Qemu-devel] [PATCH 1/1] include: Auto-generate the sizes lookup table

2019-01-04 Thread Leonid Bloch
On 1/4/19 12:31 PM, Alberto Garcia wrote: > On Thu 03 Jan 2019 10:42:30 PM CET, Eric Blake wrote: > >> In my view, code generators make sense when used on code that is >> expected to change over time (a good example is QAPI because we add >> new commands every release; other places might be a gene

Re: [Qemu-block] [PATCH v7 16/18] xen: automatically create XenBlockDevice-s

2019-01-04 Thread Paul Durrant
> -Original Message- > From: Anthony PERARD [mailto:anthony.per...@citrix.com] > Sent: 04 January 2019 16:31 > To: Paul Durrant > Cc: qemu-de...@nongnu.org; qemu-block@nongnu.org; xen- > de...@lists.xenproject.org; Kevin Wolf ; Max Reitz > ; Stefano Stabellini > Subject: Re: [PATCH v7 16/

Re: [Qemu-block] [PATCH v7 16/18] xen: automatically create XenBlockDevice-s

2019-01-04 Thread Anthony PERARD
Almost done, there is one thing left which I believe is an issue. Whenever I attach a raw file to QEMU, it print: qemu-system-i386: warning: Opening a block device as a file using the 'file' driver is deprecated So, I think the comment below isn't true. We should create a "raw" driver for "ra

Re: [Qemu-block] [Qemu-devel] [PATCH v2] qemu: avoid memory leak while remove disk

2019-01-04 Thread Eric Blake
On 12/22/18 4:27 AM, w00426999 wrote: > Memset vhost_dev to zero in the vhost_dev_cleanup function. > This causes dev.vqs to be NULL, so that > vqs does not free up space when calling the g_free function. > This will result in a memory leak. But you can't release vqs > directly in the vhost_dev_cle

Re: [Qemu-block] [PATCH v7 09/18] xen: remove unnecessary code from dataplane/xen-block.c

2019-01-04 Thread Anthony PERARD
On Thu, Dec 20, 2018 at 05:14:30PM +, Paul Durrant wrote: > Not all of the code duplicated from xen_disk.c is required as the basis for > the new dataplane implementation so this patch removes extraneous code, > along with the legacy #includes and calls to the legacy xen_pv_printf() > function.

Re: [Qemu-block] [PATCH v2] qemu: avoid memory leak while remove disk

2019-01-04 Thread Stefan Hajnoczi
On Sat, Dec 22, 2018 at 06:27:28PM +0800, w00426999 wrote: > Memset vhost_dev to zero in the vhost_dev_cleanup function. > This causes dev.vqs to be NULL, so that > vqs does not free up space when calling the g_free function. > This will result in a memory leak. But you can't release vqs > directly

Re: [Qemu-block] [Qemu-devel] [PATCH v2 4/8] qcow2-threads: split out generic path

2019-01-04 Thread Alberto Garcia
On Fri 14 Dec 2018 09:51:12 AM CET, Vladimir Sementsov-Ogievskiy wrote: > 14.12.2018 2:28, Paolo Bonzini wrote: >> On 11/12/18 17:43, Vladimir Sementsov-Ogievskiy wrote: >>> +ThreadPool *pool = aio_get_thread_pool(bdrv_get_aio_context(bs)); >>> + >>> +while (s->nb_threads >= QCOW2_MAX_THREA

Re: [Qemu-block] [PULL 0/4] Block patches

2019-01-04 Thread Peter Maydell
On Fri, 4 Jan 2019 at 11:21, Stefan Hajnoczi wrote: > > The following changes since commit 20d6c7312f1b812bb9c750f4087f69ac8485cc90: > > Merge remote-tracking branch > 'remotes/palmer/tags/riscv-for-master-3.2-part1' into staging (2019-01-03 > 13:26:30 +) > > are available in the Git repos

[Qemu-block] [PULL 4/4] dmg: don't skip zero chunk

2019-01-04 Thread Stefan Hajnoczi
From: yuchenlin The dmg file has many tables which describe: "start from sector XXX to sector XXX, the compression method is XXX and where the compressed data resides on". Each sector in the expanded file should be covered by a table. The table will describe the offset of compressed data (or raw

[Qemu-block] [PULL 3/4] dmg: use enumeration type instead of hard coding number

2019-01-04 Thread Stefan Hajnoczi
From: yuchenlin Signed-off-by: yuchenlin Reviewed-by: Julio Faracco Reviewed-by: Stefan Hajnoczi Message-id: 20190103114700.9686-3-npes87...@gmail.com Signed-off-by: Stefan Hajnoczi --- block/dmg.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/block/dmg.c b/block/dm

[Qemu-block] [PULL 2/4] dmg: fix binary search

2019-01-04 Thread Stefan Hajnoczi
From: yuchenlin There is a possible hang in original binary search implementation. That is if chunk1 = 4, chunk2 = 5, chunk3 = 4, and we go else case. The chunk1 will be still 4, and so on. Signed-off-by: yuchenlin Message-id: 20190103114700.9686-2-npes87...@gmail.com Signed-off-by: Stefan Haj

[Qemu-block] [PULL 0/4] Block patches

2019-01-04 Thread Stefan Hajnoczi
The following changes since commit 20d6c7312f1b812bb9c750f4087f69ac8485cc90: Merge remote-tracking branch 'remotes/palmer/tags/riscv-for-master-3.2-part1' into staging (2019-01-03 13:26:30 +) are available in the Git repository at: git://github.com/stefanha/qemu.git tags/block-pull-requ

[Qemu-block] [PULL 1/4] dmg: Fixing wrong dmg block type value for block terminator.

2019-01-04 Thread Stefan Hajnoczi
From: Julio Faracco This is a trivial patch to fix a wrong value for block terminator. The old value was 0x7fff which is wrong. It was not affecting the code because QEMU dmg block is not handling block terminator right now. Neverthless, it should be fixed. Signed-off-by: Julio Faracco Revi

Re: [Qemu-block] [PATCH v3 0/3] dmg: fixing reading in dmg

2019-01-04 Thread Stefan Hajnoczi
On Thu, Jan 03, 2019 at 07:46:57PM +0800, yuchenlin wrote: > There are two bugs in dmg reading. > > First, it may hang in binary search. this problem is solved by patch 1. > Second, because of lacking zero chunk table, reading zero sector will > return EIO. this problem is solved by patch 2 and 3.

Re: [Qemu-block] [Qemu-devel] [PATCH 1/1] include: Auto-generate the sizes lookup table

2019-01-04 Thread Alberto Garcia
On Thu 03 Jan 2019 10:42:30 PM CET, Eric Blake wrote: > In my view, code generators make sense when used on code that is > expected to change over time (a good example is QAPI because we add > new commands every release; other places might be a generator to help > deal with syscall handlers since

Re: [Qemu-block] [PATCH v7 09/18] xen: remove unnecessary code from dataplane/xen-block.c

2019-01-04 Thread Paul Durrant
Ping Anthony? I dropped your R-b on v6 since I screwed it up. Are you ok with v7? It should be back to how it was but with some whitespace fixes. Paul > -Original Message- > From: Paul Durrant [mailto:paul.durr...@citrix.com] > Sent: 20 December 2018 17:15 > To: qemu-de...@nongnu.org;

Re: [Qemu-block] [PATCH v7 16/18] xen: automatically create XenBlockDevice-s

2019-01-04 Thread Paul Durrant
Ping Anthony & Kevin? I believe this version is purged of all legacy interface use. > -Original Message- > From: Paul Durrant [mailto:paul.durr...@citrix.com] > Sent: 20 December 2018 17:15 > To: qemu-de...@nongnu.org; qemu-block@nongnu.org; xen- > de...@lists.xenproject.org > Cc: Paul Du