qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PULL 0/2] Block patches
@ 2023-04-24 17:55 Stefan Hajnoczi
  2023-04-24 17:55 ` [PULL 1/2] block/dmg: Declare a type definition for DMG uncompress function Stefan Hajnoczi
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Stefan Hajnoczi @ 2023-04-24 17:55 UTC (permalink / raw)
  To: qemu-devel
  Cc: Kevin Wolf, qemu-block, Hanna Reitz, Stefan Hajnoczi,
	Richard Henderson

The following changes since commit ac5f7bf8e208cd7893dbb1a9520559e569a4677c:

  Merge tag 'migration-20230424-pull-request' of https://gitlab.com/juan.quintela/qemu into staging (2023-04-24 15:00:39 +0100)

are available in the Git repository at:

  https://gitlab.com/stefanha/qemu.git tags/block-pull-request

for you to fetch changes up to 9d672e290475001fcecdcc9dc79ad088ff89d17f:

  tracetool: use relative paths for '#line' preprocessor directives (2023-04-24 13:53:44 -0400)

----------------------------------------------------------------
Pull request (v2)

I dropped the zoned storage patches that had CI failures. This pull request
only contains fixes now.

----------------------------------------------------------------

Philippe Mathieu-Daudé (1):
  block/dmg: Declare a type definition for DMG uncompress function

Thomas De Schampheleire (1):
  tracetool: use relative paths for '#line' preprocessor directives

 block/dmg.h                         | 8 ++++----
 block/dmg.c                         | 7 ++-----
 scripts/tracetool/backend/ftrace.py | 4 +++-
 scripts/tracetool/backend/log.py    | 4 +++-
 scripts/tracetool/backend/syslog.py | 4 +++-
 5 files changed, 15 insertions(+), 12 deletions(-)

-- 
2.39.2



^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PULL 1/2] block/dmg: Declare a type definition for DMG uncompress function
  2023-04-24 17:55 [PULL 0/2] Block patches Stefan Hajnoczi
@ 2023-04-24 17:55 ` Stefan Hajnoczi
  2023-04-24 17:55 ` [PULL 2/2] tracetool: use relative paths for '#line' preprocessor directives Stefan Hajnoczi
  2023-04-25 11:15 ` [PULL 0/2] Block patches Richard Henderson
  2 siblings, 0 replies; 4+ messages in thread
From: Stefan Hajnoczi @ 2023-04-24 17:55 UTC (permalink / raw)
  To: qemu-devel
  Cc: Kevin Wolf, qemu-block, Hanna Reitz, Stefan Hajnoczi,
	Richard Henderson, Philippe Mathieu-Daudé

From: Philippe Mathieu-Daudé <philmd@linaro.org>

Introduce the BdrvDmgUncompressFunc type defintion. To emphasis
dmg_uncompress_bz2 and dmg_uncompress_lzfse are pointer to functions,
declare them using this new typedef.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-id: 20230320152610.32052-1-philmd@linaro.org
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
---
 block/dmg.h | 8 ++++----
 block/dmg.c | 7 ++-----
 2 files changed, 6 insertions(+), 9 deletions(-)

diff --git a/block/dmg.h b/block/dmg.h
index e488601b62..dcd6165e63 100644
--- a/block/dmg.h
+++ b/block/dmg.h
@@ -51,10 +51,10 @@ typedef struct BDRVDMGState {
     z_stream zstream;
 } BDRVDMGState;
 
-extern int (*dmg_uncompress_bz2)(char *next_in, unsigned int avail_in,
-                                 char *next_out, unsigned int avail_out);
+typedef int BdrvDmgUncompressFunc(char *next_in, unsigned int avail_in,
+                                  char *next_out, unsigned int avail_out);
 
-extern int (*dmg_uncompress_lzfse)(char *next_in, unsigned int avail_in,
-                                   char *next_out, unsigned int avail_out);
+extern BdrvDmgUncompressFunc *dmg_uncompress_bz2;
+extern BdrvDmgUncompressFunc *dmg_uncompress_lzfse;
 
 #endif
diff --git a/block/dmg.c b/block/dmg.c
index e10b9a2ba5..2769900359 100644
--- a/block/dmg.c
+++ b/block/dmg.c
@@ -31,11 +31,8 @@
 #include "qemu/memalign.h"
 #include "dmg.h"
 
-int (*dmg_uncompress_bz2)(char *next_in, unsigned int avail_in,
-                          char *next_out, unsigned int avail_out);
-
-int (*dmg_uncompress_lzfse)(char *next_in, unsigned int avail_in,
-                            char *next_out, unsigned int avail_out);
+BdrvDmgUncompressFunc *dmg_uncompress_bz2;
+BdrvDmgUncompressFunc *dmg_uncompress_lzfse;
 
 enum {
     /* Limit chunk sizes to prevent unreasonable amounts of memory being used
-- 
2.39.2



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PULL 2/2] tracetool: use relative paths for '#line' preprocessor directives
  2023-04-24 17:55 [PULL 0/2] Block patches Stefan Hajnoczi
  2023-04-24 17:55 ` [PULL 1/2] block/dmg: Declare a type definition for DMG uncompress function Stefan Hajnoczi
@ 2023-04-24 17:55 ` Stefan Hajnoczi
  2023-04-25 11:15 ` [PULL 0/2] Block patches Richard Henderson
  2 siblings, 0 replies; 4+ messages in thread
From: Stefan Hajnoczi @ 2023-04-24 17:55 UTC (permalink / raw)
  To: qemu-devel
  Cc: Kevin Wolf, qemu-block, Hanna Reitz, Stefan Hajnoczi,
	Richard Henderson, Thomas De Schampheleire

From: Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>

The event filename is an absolute path. Convert it to a relative path when
writing '#line' directives, to preserve reproducibility of the generated
output when different base paths are used.

Signed-off-by: Thomas De Schampheleire <thomas.de_schampheleire@nokia.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-Id: <20230406080045.21696-1-thomas.de_schampheleire@nokia.com>
---
 scripts/tracetool/backend/ftrace.py | 4 +++-
 scripts/tracetool/backend/log.py    | 4 +++-
 scripts/tracetool/backend/syslog.py | 4 +++-
 3 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/scripts/tracetool/backend/ftrace.py b/scripts/tracetool/backend/ftrace.py
index 5fa30ccc08..baed2ae61c 100644
--- a/scripts/tracetool/backend/ftrace.py
+++ b/scripts/tracetool/backend/ftrace.py
@@ -12,6 +12,8 @@
 __email__      = "stefanha@redhat.com"
 
 
+import os.path
+
 from tracetool import out
 
 
@@ -45,7 +47,7 @@ def generate_h(event, group):
         args=event.args,
         event_id="TRACE_" + event.name.upper(),
         event_lineno=event.lineno,
-        event_filename=event.filename,
+        event_filename=os.path.relpath(event.filename),
         fmt=event.fmt.rstrip("\n"),
         argnames=argnames)
 
diff --git a/scripts/tracetool/backend/log.py b/scripts/tracetool/backend/log.py
index 17ba1cd90e..de27b7e62e 100644
--- a/scripts/tracetool/backend/log.py
+++ b/scripts/tracetool/backend/log.py
@@ -12,6 +12,8 @@
 __email__      = "stefanha@redhat.com"
 
 
+import os.path
+
 from tracetool import out
 
 
@@ -53,7 +55,7 @@ def generate_h(event, group):
         '    }',
         cond=cond,
         event_lineno=event.lineno,
-        event_filename=event.filename,
+        event_filename=os.path.relpath(event.filename),
         name=event.name,
         fmt=event.fmt.rstrip("\n"),
         argnames=argnames)
diff --git a/scripts/tracetool/backend/syslog.py b/scripts/tracetool/backend/syslog.py
index 5a3a00fe31..012970f6cc 100644
--- a/scripts/tracetool/backend/syslog.py
+++ b/scripts/tracetool/backend/syslog.py
@@ -12,6 +12,8 @@
 __email__      = "stefanha@redhat.com"
 
 
+import os.path
+
 from tracetool import out
 
 
@@ -41,7 +43,7 @@ def generate_h(event, group):
         '    }',
         cond=cond,
         event_lineno=event.lineno,
-        event_filename=event.filename,
+        event_filename=os.path.relpath(event.filename),
         name=event.name,
         fmt=event.fmt.rstrip("\n"),
         argnames=argnames)
-- 
2.39.2



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PULL 0/2] Block patches
  2023-04-24 17:55 [PULL 0/2] Block patches Stefan Hajnoczi
  2023-04-24 17:55 ` [PULL 1/2] block/dmg: Declare a type definition for DMG uncompress function Stefan Hajnoczi
  2023-04-24 17:55 ` [PULL 2/2] tracetool: use relative paths for '#line' preprocessor directives Stefan Hajnoczi
@ 2023-04-25 11:15 ` Richard Henderson
  2 siblings, 0 replies; 4+ messages in thread
From: Richard Henderson @ 2023-04-25 11:15 UTC (permalink / raw)
  To: Stefan Hajnoczi, qemu-devel
  Cc: Kevin Wolf, qemu-block, Hanna Reitz, Richard Henderson

On 4/24/23 18:55, Stefan Hajnoczi wrote:
> The following changes since commit ac5f7bf8e208cd7893dbb1a9520559e569a4677c:
> 
>    Merge tag 'migration-20230424-pull-request' ofhttps://gitlab.com/juan.quintela/qemu  into staging (2023-04-24 15:00:39 +0100)
> 
> are available in the Git repository at:
> 
>    https://gitlab.com/stefanha/qemu.git  tags/block-pull-request
> 
> for you to fetch changes up to 9d672e290475001fcecdcc9dc79ad088ff89d17f:
> 
>    tracetool: use relative paths for '#line' preprocessor directives (2023-04-24 13:53:44 -0400)
> 
> ----------------------------------------------------------------
> Pull request (v2)
> 
> I dropped the zoned storage patches that had CI failures. This pull request
> only contains fixes now.

Applied, thanks.  Please update https://wiki.qemu.org/ChangeLog/8.1 as appropriate.


r~



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-04-25 11:16 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-24 17:55 [PULL 0/2] Block patches Stefan Hajnoczi
2023-04-24 17:55 ` [PULL 1/2] block/dmg: Declare a type definition for DMG uncompress function Stefan Hajnoczi
2023-04-24 17:55 ` [PULL 2/2] tracetool: use relative paths for '#line' preprocessor directives Stefan Hajnoczi
2023-04-25 11:15 ` [PULL 0/2] Block patches Richard Henderson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).