qemu-ppc
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v6 23/33] block_int-common.h: split function pointers in Bloc


From: Hanna Reitz
Subject: Re: [PATCH v6 23/33] block_int-common.h: split function pointers in BlockDriver
Date: Wed, 26 Jan 2022 13:29:45 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.4.0

On 21.01.22 18:05, Emanuele Giuseppe Esposito wrote:
Similar to the header split, also the function pointers in BlockDriver
can be split in I/O and global state.

Signed-off-by: Emanuele Giuseppe Esposito <eesposit@redhat.com>
---
  include/block/block_int-common.h | 434 ++++++++++++++++---------------
  1 file changed, 231 insertions(+), 203 deletions(-)

diff --git a/include/block/block_int-common.h b/include/block/block_int-common.h
index 70534f94ae..e007dbf768 100644
--- a/include/block/block_int-common.h
+++ b/include/block/block_int-common.h

[...]

@@ -159,7 +148,66 @@ struct BlockDriver {

[...]

+    /*
+     * Global state (GS) API. These functions run under the BQL lock.
+     *
+     * See include/block/block-global-state.h for more information about
+     * the GS API.
+     */
+
+    /*
+     * Return true if @to_replace can be replaced by a BDS with the
+     * same data as @bs without it affecting @bs's behavior (that is,
+     * without it being visible to @bs's parents).
+     */
+    bool (*bdrv_recurse_can_replace)(BlockDriverState *bs,
+                                     BlockDriverState *to_replace);
+
+    int (*bdrv_probe)(const uint8_t *buf, int buf_size, const char *filename);

Considering that its only caller (bdrv_probe_all()) is now an I/O function, shouldn’t this be, too?

Hanna




reply via email to

[Prev in Thread] Current Thread [Next in Thread]