Re: [Qemu-devel] [PATCH 1/1] qcow2: avoid extra flushes in qcow2

2016-06-02 Thread Pavel Borzenkov
caches. However, I see that you keep > the flush in qcow2_cache_flush_dependency(), so in the code this is > actually fine. > > Can you make that more explicit in the commit message? > > > This seriously affects the > > performance of database operations inside the guest. >

Re: [Qemu-devel] [PATCH 1/1] qcow2: avoid extra flushes in qcow2

2016-06-01 Thread Pavel Borzenkov
caches. However, I see that you keep > the flush in qcow2_cache_flush_dependency(), so in the code this is > actually fine. > > Can you make that more explicit in the commit message? > > > This seriously affects the > > performance of database operations inside the guest. >

Re: [Qemu-devel] [PATCH v3 41/44] nbd: Implement NBD_CMD_WRITE_ZEROES on server

2016-04-23 Thread Pavel Borzenkov
On Fri, Apr 22, 2016 at 05:40:49PM -0600, Eric Blake wrote: > Upstream NBD protocol recently added the ability to efficiently > write zeroes without having to send the zeroes over the wire, > along with a flag to control whether the client wants a hole. > > Signed-off-by: Eric Blake

Re: [Qemu-devel] [PATCH v2] doc: Add NBD_CMD_BLOCK_STATUS extension

2016-04-13 Thread Pavel Borzenkov
Hi Eric, On Thu, Apr 07, 2016 at 10:10:58AM -0600, Eric Blake wrote: > On 04/07/2016 04:38 AM, Vladimir Sementsov-Ogievskiy wrote: > > On 05.04.2016 16:43, Paolo Bonzini wrote: > >> > >> On 05/04/2016 06:05, Kevin Wolf wrote: > >>> The options I can think of is adding a request field "max number

Re: [Qemu-devel] [RFC PATCH 18/18] nbd: Implement NBD_CMD_WRITE_ZEROES on client

2016-04-09 Thread Pavel Borzenkov
On Sat, Apr 09, 2016 at 11:57:57AM +0100, Alex Bligh wrote: > > On 8 Apr 2016, at 23:05, Eric Blake wrote: > > > RFC because there is still discussion on the NBD list about > > adding an NBD_OPT_ to let the client suggest server defaults > > related to scanning for zeroes

Re: [Qemu-devel] [RFC PATCH 17/18] nbd: Implement NBD_CMD_WRITE_ZEROES on server

2016-04-09 Thread Pavel Borzenkov
On Fri, Apr 08, 2016 at 04:05:57PM -0600, Eric Blake wrote: > RFC because there is still discussion on the NBD list about > adding an NBD_OPT_ to let the client suggest server defaults > related to scanning for zeroes during NBD_CMD_WRITE, which may > tweak this patch. > > Upstream NBD protocol

Re: [Qemu-devel] [PATCH v2] doc: Add NBD_CMD_BLOCK_STATUS extension

2016-04-07 Thread Pavel Borzenkov
On Tue, Apr 05, 2016 at 03:43:08PM +0200, Paolo Bonzini wrote: > > > On 05/04/2016 06:05, Kevin Wolf wrote: > > The options I can think of is adding a request field "max number of > > descriptors" or a flag "only single descriptor" (with the assumption > > that clients always want one or

Re: [Qemu-devel] [PATCH 2/2] NBD proto: add GET_LBA_STATUS extension

2016-03-24 Thread Pavel Borzenkov
On Thu, Mar 24, 2016 at 09:04:07AM -0600, Eric Blake wrote: > On 03/24/2016 06:30 AM, Pavel Borzenkov wrote: > >> Conversely, it would be possible to send less data over the wire, as > >> long as we require that all LBA status descriptors cover consecutive > >> offset

Re: [Qemu-devel] [PATCH 2/2] NBD proto: add GET_LBA_STATUS extension

2016-03-24 Thread Pavel Borzenkov
On Wed, Mar 23, 2016 at 10:27:00AM -0600, Eric Blake wrote: > On 03/23/2016 08:16 AM, Denis V. Lunev wrote: > > From: Pavel Borzenkov <pborzen...@virtuozzo.com> > > > > With the availability of sparse storage formats, it is often needed to > > query status of a p

Re: [Qemu-devel] [Nbd] [PATCH 2/2] NBD proto: add GET_LBA_STATUS extension

2016-03-24 Thread Pavel Borzenkov
On Thu, Mar 24, 2016 at 09:41:29AM +0100, Wouter Verhelst wrote: > On Thu, Mar 24, 2016 at 11:25:52AM +0300, Pavel Borzenkov wrote: > > On Wed, Mar 23, 2016 at 07:14:54PM +0100, Kevin Wolf wrote: > > > Am 23.03.2016 um 18:58 hat Wouter Verhelst geschrieben: > > > >

Re: [Qemu-devel] [Nbd] [PATCH 1/2] NBD proto: add WRITE_ZEROES extension

2016-03-24 Thread Pavel Borzenkov
On Thu, Mar 24, 2016 at 09:26:41AM +0100, Wouter Verhelst wrote: > On Thu, Mar 24, 2016 at 10:57:06AM +0300, Pavel Borzenkov wrote: > > On Wed, Mar 23, 2016 at 06:21:16PM +0100, Wouter Verhelst wrote: > > > So, the semantics of your proposed WRITE_ZEROES are exactly the same

Re: [Qemu-devel] [Nbd] [PATCH 2/2] NBD proto: add GET_LBA_STATUS extension

2016-03-24 Thread Pavel Borzenkov
On Wed, Mar 23, 2016 at 06:58:34PM +0100, Wouter Verhelst wrote: > On Wed, Mar 23, 2016 at 05:16:02PM +0300, Denis V. Lunev wrote: > > From: Pavel Borzenkov <pborzen...@virtuozzo.com> > > > > With the availability of sparse storage formats, it is often needed to >

Re: [Qemu-devel] [Nbd] [PATCH 2/2] NBD proto: add GET_LBA_STATUS extension

2016-03-24 Thread Pavel Borzenkov
On Wed, Mar 23, 2016 at 07:14:54PM +0100, Kevin Wolf wrote: > Am 23.03.2016 um 18:58 hat Wouter Verhelst geschrieben: > > On Wed, Mar 23, 2016 at 05:16:02PM +0300, Denis V. Lunev wrote: > > > +The type of information required by the client is passed to server > > > in the > > > +command

Re: [Qemu-devel] [Nbd] [PATCH 1/2] NBD proto: add WRITE_ZEROES extension

2016-03-24 Thread Pavel Borzenkov
On Wed, Mar 23, 2016 at 06:21:16PM +0100, Wouter Verhelst wrote: > Hi, > > On Wed, Mar 23, 2016 at 05:16:01PM +0300, Denis V. Lunev wrote: > > From: Pavel Borzenkov <pborzen...@virtuozzo.com> > > > > There exist some cases when a client knows that the data it is

Re: [Qemu-devel] [PATCH 1/2] NBD proto: add WRITE_ZEROES extension

2016-03-24 Thread Pavel Borzenkov
On Wed, Mar 23, 2016 at 09:14:10AM -0600, Eric Blake wrote: > On 03/23/2016 08:16 AM, Denis V. Lunev wrote: > > From: Pavel Borzenkov <pborzen...@virtuozzo.com> > > > > There exist some cases when a client knows that the data it is going to > > write is all zer

Re: [Qemu-devel] [PATCH 1.0] configure: add '--disable-cocoa' switch

2011-11-10 Thread Pavel Borzenkov
On Thu, Nov 10, 2011 at 2:44 PM, Peter Maydell peter.mayd...@linaro.org wrote: On 10 November 2011 10:41, Andreas Färber andreas.faer...@web.de wrote: I remember there was a similar patch once but some issue with it kept us from applying it - something unrelated to the frontend was influenced

Re: [Qemu-devel] [PATCH 1.0] configure: add '--disable-cocoa' switch

2011-11-10 Thread Pavel Borzenkov
On Thu, Nov 10, 2011 at 2:41 PM, Andreas Färber andreas.faer...@web.de wrote: Am 09.11.2011 19:54, schrieb Pavel Borzenkov: When SDL support is disabled, there is no way to build QEMU without Cocoa support on MacOS X. This patch adds '--disable-cocoa' switch and allows to build QEMU without

[Qemu-devel] [PATCH 1.0] configure: pass suffix to 'sed -i' command

2011-11-10 Thread Pavel Borzenkov
BSD sed always requires a suffix to be passed when '-i' switch is used. In GNU sed this suffix is optional. Due to this, configure prints the following error when runs on Mac OS X: sed: 1: /var/folders/r_/1g8ws8s ...: invalid command code f Signed-off-by: Pavel Borzenkov pavel.borzen

[Qemu-devel] [PATCH 0/3] Make GUI frontends optional on Mac OS X

2011-11-10 Thread Pavel Borzenkov
After applying this small patch series, you'll be able to build QEMU on Mac OS X without both SDL and Cocoa frontends. First two patches deal with raw-posix, which is the only CONFIG_COCOA user not related to GUI. The third patch adds '--disable-cocoa' switch to configure. Pavel Borzenkov (3

[Qemu-devel] [PATCH 2/3] raw-posix: Do not use CONFIG_COCOA macro

2011-11-10 Thread Pavel Borzenkov
Use __APPLE__ and __MACH__ macros instead of CONFIG_COCOA to detect Mac OS X host. The patch is based on the Ben Leslie's patch: http://patchwork.ozlabs.org/patch/97859/ Signed-off-by: Pavel Borzenkov pavel.borzen...@gmail.com --- block/raw-posix.c |8 1 files changed, 4 insertions

[Qemu-devel] [PATCH 1/3] raw-posix: Remove dead code

2011-11-10 Thread Pavel Borzenkov
It was commented out since the initial import from svn. Signed-off-by: Pavel Borzenkov pavel.borzen...@gmail.com --- block/raw-posix.c | 18 -- 1 files changed, 0 insertions(+), 18 deletions(-) diff --git a/block/raw-posix.c b/block/raw-posix.c index a3de373..17e1c6f 100644

[Qemu-devel] [PATCH 3/3] configure: add '--disable-cocoa' switch

2011-11-10 Thread Pavel Borzenkov
When SDL support is disabled, there is no way to build QEMU without Cocoa support on MacOS X. This patch adds '--disable-cocoa' switch and allows to build QEMU without both SDL and Cocoa frontends. Signed-off-by: Pavel Borzenkov pavel.borzen...@gmail.com --- configure |7 ++- 1 files

Re: [Qemu-devel] [PATCH 1.0] configure: pass suffix to 'sed -i' command

2011-11-10 Thread Pavel Borzenkov
On Nov 10, 2011, at 10:18 PM, Peter Maydell wrote: On 10 November 2011 18:03, Pavel Borzenkov pavel.borzen...@gmail.com wrote: diff --git a/configure b/configure index 401d9a6..b83640e 100755 --- a/configure +++ b/configure @@ -1968,7 +1968,7 @@ EOF if compile_prog ; then attr

[Qemu-devel] [PATCH 1.0] configure: Do not use 'sed -i'

2011-11-10 Thread Pavel Borzenkov
'sed -i' is not defined in POSIX. It doesn't work on Mac OS X the way it's used in configure (without suffix argument). This patch implements Peter Maydell's idea of xattr.h detection. Cc: Peter Maydell peter.mayd...@linaro.org Signed-off-by: Pavel Borzenkov pavel.borzen...@gmail.com

[Qemu-devel] [PATCH 1.0] configure: add '--disable-cocoa' switch

2011-11-09 Thread Pavel Borzenkov
When SDL support is disabled, there is no way to build QEMU without Cocoa support on MacOS X. This patch adds '--disable-cocoa' switch and allows to build QEMU without both SDL and Cocoa frontends. Signed-off-by: Pavel Borzenkov pavel.borzen...@gmail.com --- configure | 11 ++- 1 files

Re: [Qemu-devel] [patch] explicitly initialize tcg_cpu_thread

2011-11-01 Thread Pavel Borzenkov
On Tue, Nov 1, 2011 at 7:35 AM, Jun Koi junkoi2...@gmail.com wrote: This patch explicitly initializes tcg_cpu_thread to NULL in cpus.c (One code patch in qemu_tcg_init_vcpu() relies on the value of tcg_cpu_thread to create env-thread and so on ) Signed-off-by: Jun Koi junkoi2...@gmail.com

Re: [Qemu-devel] [patch] explicitly initialize tcg_cpu_thread

2011-11-01 Thread Pavel Borzenkov
On Tue, Nov 1, 2011 at 12:33 PM, Jun Koi junkoi2...@gmail.com wrote: On Tue, Nov 1, 2011 at 3:06 PM, Pavel Borzenkov pavel.borzen...@gmail.com wrote: On Tue, Nov 1, 2011 at 7:35 AM, Jun Koi junkoi2...@gmail.com wrote: This patch explicitly initializes tcg_cpu_thread to NULL in cpus.c (One

Re: [Qemu-devel] [PATCH] cmd: Fix potential NULL pointer dereference

2011-10-31 Thread Pavel Borzenkov
On Mon, Oct 31, 2011 at 10:27 AM, Markus Armbruster arm...@redhat.com wrote: Pavel Borzenkov pavel.borzen...@gmail.com writes: Signed-off-by: Pavel Borzenkov pavel.borzen...@gmail.com --- Note, that almost all code in the file violates CODING STYLE. The changed lines are written wrt CODING

[Qemu-devel] [PATCH v2 0/3] Misc small fixes in cmd.c

2011-10-31 Thread Pavel Borzenkov
The first patch fixes coding style of the functions affected by next two patches. Second patch fixes potential NULL pointer dereference (return value of realloc is not checked). Third patch fixes potential memory leak (for the case when realloc returns NULL). Pavel Borzenkov (3): cmd: Fix

[Qemu-devel] [PATCH v2 2/3] cmd: Fix potential NULL pointer dereference

2011-10-31 Thread Pavel Borzenkov
Signed-off-by: Pavel Borzenkov pavel.borzen...@gmail.com --- cmd.c | 11 +++ 1 files changed, 3 insertions(+), 8 deletions(-) diff --git a/cmd.c b/cmd.c index a6e3ef4..75415d8 100644 --- a/cmd.c +++ b/cmd.c @@ -47,7 +47,7 @@ compare(const void *a, const void *b) void add_command

[Qemu-devel] [PATCH v2 3/3] cmd: Fix potential memory leak

2011-10-31 Thread Pavel Borzenkov
Signed-off-by: Pavel Borzenkov pavel.borzen...@gmail.com --- cmd.c |9 +++-- 1 files changed, 7 insertions(+), 2 deletions(-) diff --git a/cmd.c b/cmd.c index 75415d8..0806e18 100644 --- a/cmd.c +++ b/cmd.c @@ -329,16 +329,21 @@ char **breakline(char *input, int *count) int c = 0

[Qemu-devel] [PATCH v2 1/3] cmd: Fix coding style in cmd.c

2011-10-31 Thread Pavel Borzenkov
Before the next patches, fix coding style of the affected functions. Signed-off-by: Pavel Borzenkov pavel.borzen...@gmail.com --- cmd.c | 168 - 1 files changed, 82 insertions(+), 86 deletions(-) diff --git a/cmd.c b/cmd.c index

[Qemu-devel] [PATCH] cmd: Fix potential NULL pointer dereference

2011-10-28 Thread Pavel Borzenkov
Signed-off-by: Pavel Borzenkov pavel.borzen...@gmail.com --- Note, that almost all code in the file violates CODING STYLE. The changed lines are written wrt CODING STYLE (like commits 7d7d975c and c32d766a). --- cmd.c | 11 +++ 1 files changed, 3 insertions(+), 8 deletions(-) diff

[Qemu-devel] [PATCH] cmd: Fix potential memory leak

2011-10-28 Thread Pavel Borzenkov
Signed-off-by: Pavel Borzenkov pavel.borzen...@gmail.com --- Note, that almost all code in the file violates CODING STYLE. The changed lines are written wrt CODING STYLE (like commits 7d7d975c and c32d766a). --- cmd.c | 11 --- 1 files changed, 8 insertions(+), 3 deletions(-) diff

Re: [Qemu-devel] [PATCH v2] fw_cfg: Use g_file_get_contents instead of multiple fread() calls

2011-10-27 Thread Pavel Borzenkov
Ping? On Mon, Oct 24, 2011 at 3:31 PM, Pavel Borzenkov pavel.borzen...@gmail.com wrote: Signed-off-by: Pavel Borzenkov pavel.borzen...@gmail.com ---  hw/fw_cfg.c |  102 ++-  1 files changed, 38 insertions(+), 64 deletions(-) diff

Re: [Qemu-devel] [PATCH 5/7] vmdk: Fix use of uninitialised value

2011-10-26 Thread Pavel Borzenkov
On Wed, Oct 26, 2011 at 4:31 PM, Kevin Wolf kw...@redhat.com wrote: In error cases, cid is never set. Signed-off-by: Kevin Wolf kw...@redhat.com This fix is already in the qemu-trivial queue: http://repo.or.cz/w/qemu/stefanha.git/commit/8379e46d1fd681b8aa4714382e2cdab05e5d0575 -- Pavel ---

[Qemu-devel] [PATCH v2] fw_cfg: Use g_file_get_contents instead of multiple fread() calls

2011-10-24 Thread Pavel Borzenkov
Signed-off-by: Pavel Borzenkov pavel.borzen...@gmail.com --- hw/fw_cfg.c | 102 ++- 1 files changed, 38 insertions(+), 64 deletions(-) diff --git a/hw/fw_cfg.c b/hw/fw_cfg.c index 8df265c..dbcb888 100644 --- a/hw/fw_cfg.c +++ b/hw/fw_cfg.c

[Qemu-devel] [PATCH] fw_cfg: Use g_file_get_contents instead of multiple fread() calls

2011-10-21 Thread Pavel Borzenkov
Signed-off-by: Pavel Borzenkov pavel.borzen...@gmail.com --- hw/fw_cfg.c | 100 ++- 1 files changed, 37 insertions(+), 63 deletions(-) diff --git a/hw/fw_cfg.c b/hw/fw_cfg.c index 8df265c..d2400f5 100644 --- a/hw/fw_cfg.c +++ b/hw/fw_cfg.c

[Qemu-devel] [PATCH] fw_cfg: check return value of fread()

2011-10-18 Thread Pavel Borzenkov
Spotted by Clang Analyzer Signed-off-by: Pavel Borzenkov pavel.borzen...@gmail.com --- hw/fw_cfg.c |7 +++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/hw/fw_cfg.c b/hw/fw_cfg.c index 8df265c..1125e7d 100644 --- a/hw/fw_cfg.c +++ b/hw/fw_cfg.c @@ -113,6 +113,13

[Qemu-devel] [PATCH] qed: don't pass NULL to memcpy

2011-10-18 Thread Pavel Borzenkov
Spotted by Clang Analyzer Signed-off-by: Pavel Borzenkov pavel.borzen...@gmail.com --- block/qed.c |6 -- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/block/qed.c b/block/qed.c index c3e45af..e6720db 100644 --- a/block/qed.c +++ b/block/qed.c @@ -1424,8 +1424,10

[Qemu-devel] [PATCH] qed: remove unneeded variable assignment

2011-10-18 Thread Pavel Borzenkov
'ret' is unconditionally overwitten by qed_read_l1_table_sync() Spotted by Clang Analyzer Signed-off-by: Pavel Borzenkov pavel.borzen...@gmail.com --- block/qed.c |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/block/qed.c b/block/qed.c index e87dc4d..c3e45af 100644

[Qemu-devel] [PATCH] vmdk: remove unneeded variable assignment

2011-10-18 Thread Pavel Borzenkov
Spotted by Clang Analyzer Signed-off-by: Pavel Borzenkov pavel.borzen...@gmail.com --- block/vmdk.c |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/block/vmdk.c b/block/vmdk.c index 5d16ec4..3969131 100644 --- a/block/vmdk.c +++ b/block/vmdk.c @@ -1387,7 +1387,6

[Qemu-devel] [PATCH] vmdk: vmdk_read_cid returns garbage if p_name is NULL

2011-10-18 Thread Pavel Borzenkov
Spotted by Clang Analyzer Signed-off-by: Pavel Borzenkov pavel.borzen...@gmail.com --- block/vmdk.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/block/vmdk.c b/block/vmdk.c index 3969131..a75dcc2 100644 --- a/block/vmdk.c +++ b/block/vmdk.c @@ -207,7 +207,7 @@ static

[Qemu-devel] Bug in checkpatch.pl?

2011-08-26 Thread Pavel Borzenkov
Hi. checkpatch.pl correctly reports a warning for the following code: if (something) foo; else bar; WARNING: braces {} are necessary for all arms of this statement #1: FILE: tmp/a.c:1: +if (something) [...] +else [...] But if I modify it as follows, checkpatch.pl doesn't report any

[Qemu-devel] [PATCH] checkpatch: fix braces {} handling

2011-08-26 Thread Pavel Borzenkov
checkpatch.pl doesn't report warning for if/else statements with missing 'else' braces: if (something) { foo; } else bar; The patch has been tested using the last 100 commits. Signed-off-by: Pavel Borzenkov pavel.borzen...@gmail.com --- scripts/checkpatch.pl |2 +- 1 files changed