All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] block: minor refactoring in preparation to the block layer API split
@ 2021-11-24  6:36 Emanuele Giuseppe Esposito
  2021-11-24  6:36 ` [PATCH 1/4] block_int: make bdrv_backing_overridden static Emanuele Giuseppe Esposito
                   ` (4 more replies)
  0 siblings, 5 replies; 9+ messages in thread
From: Emanuele Giuseppe Esposito @ 2021-11-24  6:36 UTC (permalink / raw)
  To: qemu-block
  Cc: Kevin Wolf, Emanuele Giuseppe Esposito, Markus Armbruster,
	qemu-devel, Hanna Reitz, Stefan Hajnoczi, Paolo Bonzini

These patches are taken from my old patches and feedback of
my series "block layer: split block APIs in global state and I/O".

The reason for a separate series is that the original one is
already too long, and these patches are just refactoring the code,
mainly deleting or moving functions in blockdev.h and block_int.h.

Signed-off-by: Emanuele Giuseppe Esposito <eesposit@redhat.com>

Emanuele Giuseppe Esposito (4):
  block_int: make bdrv_backing_overridden static
  include/sysemu/blockdev.h: rename if_name in block_if_name
  include/sysemu/blockdev.h: move drive_add and inline drive_def
  include/sysemu/blockdev.h: remove drive_get_max_devs

 include/block/block_int.h      |  3 --
 include/sysemu/blockdev.h      |  7 ++---
 block.c                        |  4 ++-
 block/monitor/block-hmp-cmds.c |  2 +-
 blockdev.c                     | 54 ++++------------------------------
 softmmu/vl.c                   | 25 +++++++++++++++-
 6 files changed, 36 insertions(+), 59 deletions(-)

-- 
2.27.0



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

* [PATCH 1/4] block_int: make bdrv_backing_overridden static
  2021-11-24  6:36 [PATCH 0/4] block: minor refactoring in preparation to the block layer API split Emanuele Giuseppe Esposito
@ 2021-11-24  6:36 ` Emanuele Giuseppe Esposito
  2021-11-24  6:36 ` [PATCH 2/4] include/sysemu/blockdev.h: rename if_name in block_if_name Emanuele Giuseppe Esposito
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 9+ messages in thread
From: Emanuele Giuseppe Esposito @ 2021-11-24  6:36 UTC (permalink / raw)
  To: qemu-block
  Cc: Kevin Wolf, Emanuele Giuseppe Esposito, Markus Armbruster,
	qemu-devel, Hanna Reitz, Stefan Hajnoczi, Paolo Bonzini

bdrv_backing_overridden is only used in block.c, so there is
no need to leave it in block_int.h

Signed-off-by: Emanuele Giuseppe Esposito <eesposit@redhat.com>
---
 include/block/block_int.h | 3 ---
 block.c                   | 4 +++-
 2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/include/block/block_int.h b/include/block/block_int.h
index f4c75e8ba9..27008cfb22 100644
--- a/include/block/block_int.h
+++ b/include/block/block_int.h
@@ -1122,9 +1122,6 @@ BlockDriver *bdrv_probe_all(const uint8_t *buf, int buf_size,
 void bdrv_parse_filename_strip_prefix(const char *filename, const char *prefix,
                                       QDict *options);
 
-bool bdrv_backing_overridden(BlockDriverState *bs);
-
-
 /**
  * bdrv_add_aio_context_notifier:
  *
diff --git a/block.c b/block.c
index 0ac5b163d2..10346b5011 100644
--- a/block.c
+++ b/block.c
@@ -103,6 +103,8 @@ static int bdrv_reopen_prepare(BDRVReopenState *reopen_state,
 static void bdrv_reopen_commit(BDRVReopenState *reopen_state);
 static void bdrv_reopen_abort(BDRVReopenState *reopen_state);
 
+static bool bdrv_backing_overridden(BlockDriverState *bs);
+
 /* If non-zero, use only whitelisted block drivers */
 static int use_bdrv_whitelist;
 
@@ -7475,7 +7477,7 @@ static bool append_strong_runtime_options(QDict *d, BlockDriverState *bs)
 /* Note: This function may return false positives; it may return true
  * even if opening the backing file specified by bs's image header
  * would result in exactly bs->backing. */
-bool bdrv_backing_overridden(BlockDriverState *bs)
+static bool bdrv_backing_overridden(BlockDriverState *bs)
 {
     if (bs->backing) {
         return strcmp(bs->auto_backing_file,
-- 
2.27.0



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

* [PATCH 2/4] include/sysemu/blockdev.h: rename if_name in block_if_name
  2021-11-24  6:36 [PATCH 0/4] block: minor refactoring in preparation to the block layer API split Emanuele Giuseppe Esposito
  2021-11-24  6:36 ` [PATCH 1/4] block_int: make bdrv_backing_overridden static Emanuele Giuseppe Esposito
@ 2021-11-24  6:36 ` Emanuele Giuseppe Esposito
  2021-11-24  7:36   ` Philippe Mathieu-Daudé
  2021-11-24  6:36 ` [PATCH 3/4] include/sysemu/blockdev.h: move drive_add and inline drive_def Emanuele Giuseppe Esposito
                   ` (2 subsequent siblings)
  4 siblings, 1 reply; 9+ messages in thread
From: Emanuele Giuseppe Esposito @ 2021-11-24  6:36 UTC (permalink / raw)
  To: qemu-block
  Cc: Kevin Wolf, Emanuele Giuseppe Esposito, Markus Armbruster,
	qemu-devel, Hanna Reitz, Stefan Hajnoczi, Paolo Bonzini

In preparation to next patch, where we export it to be used
also in softmmu/vlc.c

Signed-off-by: Emanuele Giuseppe Esposito <eesposit@redhat.com>
---
 blockdev.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/blockdev.c b/blockdev.c
index b35072644e..1b6ffbbc73 100644
--- a/blockdev.c
+++ b/blockdev.c
@@ -71,7 +71,7 @@ void bdrv_set_monitor_owned(BlockDriverState *bs)
     QTAILQ_INSERT_TAIL(&monitor_bdrv_states, bs, monitor_list);
 }
 
-static const char *const if_name[IF_COUNT] = {
+static const char *const block_if_name[IF_COUNT] = {
     [IF_NONE] = "none",
     [IF_IDE] = "ide",
     [IF_SCSI] = "scsi",
@@ -120,7 +120,7 @@ void override_max_devs(BlockInterfaceType type, int max_devs)
         if (dinfo->type == type) {
             fprintf(stderr, "Cannot override units-per-bus property of"
                     " the %s interface, because a drive of that type has"
-                    " already been added.\n", if_name[type]);
+                    " already been added.\n", block_if_name[type]);
             g_assert_not_reached();
         }
     }
@@ -212,7 +212,7 @@ QemuOpts *drive_add(BlockInterfaceType type, int index, const char *file,
         return NULL;
     }
     if (type != IF_DEFAULT) {
-        qemu_opt_set(opts, "if", if_name[type], &error_abort);
+        qemu_opt_set(opts, "if", block_if_name[type], &error_abort);
     }
     if (index >= 0) {
         qemu_opt_set_number(opts, "index", index, &error_abort);
@@ -269,7 +269,7 @@ void drive_check_orphaned(void)
             qemu_opts_loc_restore(dinfo->opts);
             error_report("machine type does not support"
                          " if=%s,bus=%d,unit=%d",
-                         if_name[dinfo->type], dinfo->bus, dinfo->unit);
+                         block_if_name[dinfo->type], dinfo->bus, dinfo->unit);
             loc_pop(&loc);
             orphans = true;
         }
@@ -887,7 +887,7 @@ DriveInfo *drive_new(QemuOpts *all_opts, BlockInterfaceType block_default_type,
     value = qemu_opt_get(legacy_opts, "if");
     if (value) {
         for (type = 0;
-             type < IF_COUNT && strcmp(value, if_name[type]);
+             type < IF_COUNT && strcmp(value, block_if_name[type]);
              type++) {
         }
         if (type == IF_COUNT) {
@@ -945,10 +945,10 @@ DriveInfo *drive_new(QemuOpts *all_opts, BlockInterfaceType block_default_type,
             mediastr = (media == MEDIA_CDROM) ? "-cd" : "-hd";
         }
         if (max_devs) {
-            new_id = g_strdup_printf("%s%i%s%i", if_name[type], bus_id,
+            new_id = g_strdup_printf("%s%i%s%i", block_if_name[type], bus_id,
                                      mediastr, unit_id);
         } else {
-            new_id = g_strdup_printf("%s%s%i", if_name[type],
+            new_id = g_strdup_printf("%s%s%i", block_if_name[type],
                                      mediastr, unit_id);
         }
         qdict_put_str(bs_opts, "id", new_id);
-- 
2.27.0



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

* [PATCH 3/4] include/sysemu/blockdev.h: move drive_add and inline drive_def
  2021-11-24  6:36 [PATCH 0/4] block: minor refactoring in preparation to the block layer API split Emanuele Giuseppe Esposito
  2021-11-24  6:36 ` [PATCH 1/4] block_int: make bdrv_backing_overridden static Emanuele Giuseppe Esposito
  2021-11-24  6:36 ` [PATCH 2/4] include/sysemu/blockdev.h: rename if_name in block_if_name Emanuele Giuseppe Esposito
@ 2021-11-24  6:36 ` Emanuele Giuseppe Esposito
  2021-11-24  7:38   ` Philippe Mathieu-Daudé
  2021-11-24  6:36 ` [PATCH 4/4] include/sysemu/blockdev.h: remove drive_get_max_devs Emanuele Giuseppe Esposito
  2021-11-29 13:59 ` [PATCH 0/4] block: minor refactoring in preparation to the block layer API split Stefan Hajnoczi
  4 siblings, 1 reply; 9+ messages in thread
From: Emanuele Giuseppe Esposito @ 2021-11-24  6:36 UTC (permalink / raw)
  To: qemu-block
  Cc: Kevin Wolf, Emanuele Giuseppe Esposito, Markus Armbruster,
	qemu-devel, Hanna Reitz, Stefan Hajnoczi, Paolo Bonzini

drive_add is only used in softmmu/vl.c, so it can be a static
function there, and drive_def is only a particular use case of
qemu_opts_parse_noisily, so it can be inlined.

Also remove drive_mark_claimed_by_board, as it is only defined
but not implemented (nor used) anywhere.

Signed-off-by: Emanuele Giuseppe Esposito <eesposit@redhat.com>
---
 include/sysemu/blockdev.h      |  6 ++----
 block/monitor/block-hmp-cmds.c |  2 +-
 blockdev.c                     | 27 +--------------------------
 softmmu/vl.c                   | 25 ++++++++++++++++++++++++-
 4 files changed, 28 insertions(+), 32 deletions(-)

diff --git a/include/sysemu/blockdev.h b/include/sysemu/blockdev.h
index 32c2d6023c..aacc587a33 100644
--- a/include/sysemu/blockdev.h
+++ b/include/sysemu/blockdev.h
@@ -27,6 +27,8 @@ typedef enum {
     IF_COUNT
 } BlockInterfaceType;
 
+extern const char *const block_if_name[];
+
 struct DriveInfo {
     BlockInterfaceType type;
     int bus;
@@ -45,16 +47,12 @@ BlockBackend *blk_by_legacy_dinfo(DriveInfo *dinfo);
 void override_max_devs(BlockInterfaceType type, int max_devs);
 
 DriveInfo *drive_get(BlockInterfaceType type, int bus, int unit);
-void drive_mark_claimed_by_board(void);
 void drive_check_orphaned(void);
 DriveInfo *drive_get_by_index(BlockInterfaceType type, int index);
 int drive_get_max_bus(BlockInterfaceType type);
 int drive_get_max_devs(BlockInterfaceType type);
 DriveInfo *drive_get_next(BlockInterfaceType type);
 
-QemuOpts *drive_def(const char *optstr);
-QemuOpts *drive_add(BlockInterfaceType type, int index, const char *file,
-                    const char *optstr);
 DriveInfo *drive_new(QemuOpts *arg, BlockInterfaceType block_default_type,
                      Error **errp);
 
diff --git a/block/monitor/block-hmp-cmds.c b/block/monitor/block-hmp-cmds.c
index 2ac4aedfff..bfb3c043a0 100644
--- a/block/monitor/block-hmp-cmds.c
+++ b/block/monitor/block-hmp-cmds.c
@@ -101,7 +101,7 @@ void hmp_drive_add(Monitor *mon, const QDict *qdict)
         return;
     }
 
-    opts = drive_def(optstr);
+    opts = qemu_opts_parse_noisily(qemu_find_opts("drive"), optstr, false);
     if (!opts)
         return;
 
diff --git a/blockdev.c b/blockdev.c
index 1b6ffbbc73..928bb743a1 100644
--- a/blockdev.c
+++ b/blockdev.c
@@ -71,7 +71,7 @@ void bdrv_set_monitor_owned(BlockDriverState *bs)
     QTAILQ_INSERT_TAIL(&monitor_bdrv_states, bs, monitor_list);
 }
 
-static const char *const block_if_name[IF_COUNT] = {
+const char *const block_if_name[IF_COUNT] = {
     [IF_NONE] = "none",
     [IF_IDE] = "ide",
     [IF_SCSI] = "scsi",
@@ -197,31 +197,6 @@ static int drive_index_to_unit_id(BlockInterfaceType type, int index)
     return max_devs ? index % max_devs : index;
 }
 
-QemuOpts *drive_def(const char *optstr)
-{
-    return qemu_opts_parse_noisily(qemu_find_opts("drive"), optstr, false);
-}
-
-QemuOpts *drive_add(BlockInterfaceType type, int index, const char *file,
-                    const char *optstr)
-{
-    QemuOpts *opts;
-
-    opts = drive_def(optstr);
-    if (!opts) {
-        return NULL;
-    }
-    if (type != IF_DEFAULT) {
-        qemu_opt_set(opts, "if", block_if_name[type], &error_abort);
-    }
-    if (index >= 0) {
-        qemu_opt_set_number(opts, "index", index, &error_abort);
-    }
-    if (file)
-        qemu_opt_set(opts, "file", file, &error_abort);
-    return opts;
-}
-
 DriveInfo *drive_get(BlockInterfaceType type, int bus, int unit)
 {
     BlockBackend *blk;
diff --git a/softmmu/vl.c b/softmmu/vl.c
index 1159a64bce..f47827926c 100644
--- a/softmmu/vl.c
+++ b/softmmu/vl.c
@@ -650,6 +650,27 @@ static int drive_enable_snapshot(void *opaque, QemuOpts *opts, Error **errp)
     return 0;
 }
 
+static QemuOpts *drive_add(BlockInterfaceType type, int index,
+                           const char *file, const char *optstr)
+{
+    QemuOpts *opts;
+
+    opts = qemu_opts_parse_noisily(qemu_find_opts("drive"), optstr, false);
+    if (!opts) {
+        return NULL;
+    }
+    if (type != IF_DEFAULT) {
+        qemu_opt_set(opts, "if", block_if_name[type], &error_abort);
+    }
+    if (index >= 0) {
+        qemu_opt_set_number(opts, "index", index, &error_abort);
+    }
+    if (file) {
+        qemu_opt_set(opts, "file", file, &error_abort);
+    }
+    return opts;
+}
+
 static void default_drive(int enable, int snapshot, BlockInterfaceType type,
                           int index, const char *optstr)
 {
@@ -2884,7 +2905,9 @@ void qemu_init(int argc, char **argv, char **envp)
                     break;
                 }
             case QEMU_OPTION_drive:
-                if (drive_def(optarg) == NULL) {
+                opts = qemu_opts_parse_noisily(qemu_find_opts("drive"),
+                                               optarg, false);
+                if (opts == NULL) {
                     exit(1);
                 }
                 break;
-- 
2.27.0



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

* [PATCH 4/4] include/sysemu/blockdev.h: remove drive_get_max_devs
  2021-11-24  6:36 [PATCH 0/4] block: minor refactoring in preparation to the block layer API split Emanuele Giuseppe Esposito
                   ` (2 preceding siblings ...)
  2021-11-24  6:36 ` [PATCH 3/4] include/sysemu/blockdev.h: move drive_add and inline drive_def Emanuele Giuseppe Esposito
@ 2021-11-24  6:36 ` Emanuele Giuseppe Esposito
  2021-11-24  7:40   ` Philippe Mathieu-Daudé
  2021-11-29 13:59 ` [PATCH 0/4] block: minor refactoring in preparation to the block layer API split Stefan Hajnoczi
  4 siblings, 1 reply; 9+ messages in thread
From: Emanuele Giuseppe Esposito @ 2021-11-24  6:36 UTC (permalink / raw)
  To: qemu-block
  Cc: Kevin Wolf, Emanuele Giuseppe Esposito, Markus Armbruster,
	qemu-devel, Hanna Reitz, Stefan Hajnoczi, Paolo Bonzini

Remove drive_get_max_devs, as it is not used by anyone.

Signed-off-by: Emanuele Giuseppe Esposito <eesposit@redhat.com>
---
 include/sysemu/blockdev.h |  1 -
 blockdev.c                | 17 -----------------
 2 files changed, 18 deletions(-)

diff --git a/include/sysemu/blockdev.h b/include/sysemu/blockdev.h
index aacc587a33..c4b7b8b54e 100644
--- a/include/sysemu/blockdev.h
+++ b/include/sysemu/blockdev.h
@@ -50,7 +50,6 @@ DriveInfo *drive_get(BlockInterfaceType type, int bus, int unit);
 void drive_check_orphaned(void);
 DriveInfo *drive_get_by_index(BlockInterfaceType type, int index);
 int drive_get_max_bus(BlockInterfaceType type);
-int drive_get_max_devs(BlockInterfaceType type);
 DriveInfo *drive_get_next(BlockInterfaceType type);
 
 DriveInfo *drive_new(QemuOpts *arg, BlockInterfaceType block_default_type,
diff --git a/blockdev.c b/blockdev.c
index 928bb743a1..84897f9d70 100644
--- a/blockdev.c
+++ b/blockdev.c
@@ -168,23 +168,6 @@ void blockdev_auto_del(BlockBackend *blk)
     }
 }
 
-/**
- * Returns the current mapping of how many units per bus
- * a particular interface can support.
- *
- *  A positive integer indicates n units per bus.
- *  0 implies the mapping has not been established.
- * -1 indicates an invalid BlockInterfaceType was given.
- */
-int drive_get_max_devs(BlockInterfaceType type)
-{
-    if (type >= IF_IDE && type < IF_COUNT) {
-        return if_max_devs[type];
-    }
-
-    return -1;
-}
-
 static int drive_index_to_bus_id(BlockInterfaceType type, int index)
 {
     int max_devs = if_max_devs[type];
-- 
2.27.0



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

* Re: [PATCH 2/4] include/sysemu/blockdev.h: rename if_name in block_if_name
  2021-11-24  6:36 ` [PATCH 2/4] include/sysemu/blockdev.h: rename if_name in block_if_name Emanuele Giuseppe Esposito
@ 2021-11-24  7:36   ` Philippe Mathieu-Daudé
  0 siblings, 0 replies; 9+ messages in thread
From: Philippe Mathieu-Daudé @ 2021-11-24  7:36 UTC (permalink / raw)
  To: Emanuele Giuseppe Esposito, qemu-block
  Cc: Kevin Wolf, Markus Armbruster, qemu-devel, Hanna Reitz,
	Stefan Hajnoczi, Paolo Bonzini

On 11/24/21 07:36, Emanuele Giuseppe Esposito wrote:
> In preparation to next patch, where we export it to be used
> also in softmmu/vlc.c

"vl.c"? :)

> 
> Signed-off-by: Emanuele Giuseppe Esposito <eesposit@redhat.com>
> ---
>  blockdev.c | 14 +++++++-------
>  1 file changed, 7 insertions(+), 7 deletions(-)

Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>



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

* Re: [PATCH 3/4] include/sysemu/blockdev.h: move drive_add and inline drive_def
  2021-11-24  6:36 ` [PATCH 3/4] include/sysemu/blockdev.h: move drive_add and inline drive_def Emanuele Giuseppe Esposito
@ 2021-11-24  7:38   ` Philippe Mathieu-Daudé
  0 siblings, 0 replies; 9+ messages in thread
From: Philippe Mathieu-Daudé @ 2021-11-24  7:38 UTC (permalink / raw)
  To: Emanuele Giuseppe Esposito, qemu-block
  Cc: Kevin Wolf, Markus Armbruster, qemu-devel, Hanna Reitz,
	Stefan Hajnoczi, Paolo Bonzini

On 11/24/21 07:36, Emanuele Giuseppe Esposito wrote:
> drive_add is only used in softmmu/vl.c, so it can be a static
> function there, and drive_def is only a particular use case of
> qemu_opts_parse_noisily, so it can be inlined.
> 
> Also remove drive_mark_claimed_by_board, as it is only defined
> but not implemented (nor used) anywhere.
> 
> Signed-off-by: Emanuele Giuseppe Esposito <eesposit@redhat.com>
> ---
>  include/sysemu/blockdev.h      |  6 ++----
>  block/monitor/block-hmp-cmds.c |  2 +-
>  blockdev.c                     | 27 +--------------------------
>  softmmu/vl.c                   | 25 ++++++++++++++++++++++++-
>  4 files changed, 28 insertions(+), 32 deletions(-)
> 
> diff --git a/include/sysemu/blockdev.h b/include/sysemu/blockdev.h
> index 32c2d6023c..aacc587a33 100644
> --- a/include/sysemu/blockdev.h
> +++ b/include/sysemu/blockdev.h
> @@ -27,6 +27,8 @@ typedef enum {
>      IF_COUNT
>  } BlockInterfaceType;
>  
> +extern const char *const block_if_name[];

Maybe a cleaner alternative is to ignore the previous patch,
and add a new public method:

  const char *block_if_name(BlockInterfaceType iface);



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

* Re: [PATCH 4/4] include/sysemu/blockdev.h: remove drive_get_max_devs
  2021-11-24  6:36 ` [PATCH 4/4] include/sysemu/blockdev.h: remove drive_get_max_devs Emanuele Giuseppe Esposito
@ 2021-11-24  7:40   ` Philippe Mathieu-Daudé
  0 siblings, 0 replies; 9+ messages in thread
From: Philippe Mathieu-Daudé @ 2021-11-24  7:40 UTC (permalink / raw)
  To: Emanuele Giuseppe Esposito, qemu-block, Markus Armbruster
  Cc: Kevin Wolf, Paolo Bonzini, Hanna Reitz, qemu-devel, Stefan Hajnoczi

On 11/24/21 07:36, Emanuele Giuseppe Esposito wrote:
> Remove drive_get_max_devs, as it is not used by anyone.

Maybe complete:

  Last use was removed in commit 8f2d75e81d5
  ("hw: Drop superfluous special checks for orphaned -drive").

> Signed-off-by: Emanuele Giuseppe Esposito <eesposit@redhat.com>
> ---
>  include/sysemu/blockdev.h |  1 -
>  blockdev.c                | 17 -----------------
>  2 files changed, 18 deletions(-)

Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>



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

* Re: [PATCH 0/4] block: minor refactoring in preparation to the block layer API split
  2021-11-24  6:36 [PATCH 0/4] block: minor refactoring in preparation to the block layer API split Emanuele Giuseppe Esposito
                   ` (3 preceding siblings ...)
  2021-11-24  6:36 ` [PATCH 4/4] include/sysemu/blockdev.h: remove drive_get_max_devs Emanuele Giuseppe Esposito
@ 2021-11-29 13:59 ` Stefan Hajnoczi
  4 siblings, 0 replies; 9+ messages in thread
From: Stefan Hajnoczi @ 2021-11-29 13:59 UTC (permalink / raw)
  To: Emanuele Giuseppe Esposito
  Cc: Kevin Wolf, qemu-block, Markus Armbruster, qemu-devel,
	Hanna Reitz, Paolo Bonzini

[-- Attachment #1: Type: text/plain, Size: 1216 bytes --]

On Wed, Nov 24, 2021 at 01:36:36AM -0500, Emanuele Giuseppe Esposito wrote:
> These patches are taken from my old patches and feedback of
> my series "block layer: split block APIs in global state and I/O".
> 
> The reason for a separate series is that the original one is
> already too long, and these patches are just refactoring the code,
> mainly deleting or moving functions in blockdev.h and block_int.h.
> 
> Signed-off-by: Emanuele Giuseppe Esposito <eesposit@redhat.com>
> 
> Emanuele Giuseppe Esposito (4):
>   block_int: make bdrv_backing_overridden static
>   include/sysemu/blockdev.h: rename if_name in block_if_name
>   include/sysemu/blockdev.h: move drive_add and inline drive_def
>   include/sysemu/blockdev.h: remove drive_get_max_devs
> 
>  include/block/block_int.h      |  3 --
>  include/sysemu/blockdev.h      |  7 ++---
>  block.c                        |  4 ++-
>  block/monitor/block-hmp-cmds.c |  2 +-
>  blockdev.c                     | 54 ++++------------------------------
>  softmmu/vl.c                   | 25 +++++++++++++++-
>  6 files changed, 36 insertions(+), 59 deletions(-)
> 
> -- 
> 2.27.0
> 

Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

end of thread, other threads:[~2021-11-29 14:08 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-24  6:36 [PATCH 0/4] block: minor refactoring in preparation to the block layer API split Emanuele Giuseppe Esposito
2021-11-24  6:36 ` [PATCH 1/4] block_int: make bdrv_backing_overridden static Emanuele Giuseppe Esposito
2021-11-24  6:36 ` [PATCH 2/4] include/sysemu/blockdev.h: rename if_name in block_if_name Emanuele Giuseppe Esposito
2021-11-24  7:36   ` Philippe Mathieu-Daudé
2021-11-24  6:36 ` [PATCH 3/4] include/sysemu/blockdev.h: move drive_add and inline drive_def Emanuele Giuseppe Esposito
2021-11-24  7:38   ` Philippe Mathieu-Daudé
2021-11-24  6:36 ` [PATCH 4/4] include/sysemu/blockdev.h: remove drive_get_max_devs Emanuele Giuseppe Esposito
2021-11-24  7:40   ` Philippe Mathieu-Daudé
2021-11-29 13:59 ` [PATCH 0/4] block: minor refactoring in preparation to the block layer API split Stefan Hajnoczi

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.