aboutsummaryrefslogtreecommitdiff
path: root/block
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2022-12-21 14:35:49 +0100
committerMarkus Armbruster <armbru@redhat.com>2023-01-20 07:24:28 +0100
commite2c1c34f139f49ef909bb4322607fb8b39002312 (patch)
tree7bd8fcb9db4dd89d8edcd3d59e8c5f42f2e5f445 /block
parent436956013539c19cf781ae333bc1c125d728cf1f (diff)
downloadqemu-e2c1c34f139f49ef909bb4322607fb8b39002312.zip
qemu-e2c1c34f139f49ef909bb4322607fb8b39002312.tar.gz
qemu-e2c1c34f139f49ef909bb4322607fb8b39002312.tar.bz2
include/block: Untangle inclusion loops
We have two inclusion loops: block/block.h -> block/block-global-state.h -> block/block-common.h -> block/blockjob.h -> block/block.h block/block.h -> block/block-io.h -> block/block-common.h -> block/blockjob.h -> block/block.h I believe these go back to Emanuele's reorganization of the block API, merged a few months ago in commit d7e2fe4aac8. Fortunately, breaking them is merely a matter of deleting unnecessary includes from headers, and adding them back in places where they are now missing. Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20221221133551.3967339-2-armbru@redhat.com>
Diffstat (limited to 'block')
-rw-r--r--block/amend.c1
-rw-r--r--block/backup.c1
-rw-r--r--block/blkdebug.c1
-rw-r--r--block/blklogwrites.c1
-rw-r--r--block/blkreplay.c1
-rw-r--r--block/blkverify.c1
-rw-r--r--block/block-copy.c4
-rw-r--r--block/bochs.c1
-rw-r--r--block/cloop.c1
-rw-r--r--block/copy-before-write.c1
-rw-r--r--block/copy-on-read.c1
-rw-r--r--block/curl.c1
-rw-r--r--block/dirty-bitmap.c2
-rw-r--r--block/dmg.c1
-rw-r--r--block/export/fuse.c3
-rw-r--r--block/file-posix.c1
-rw-r--r--block/file-win32.c1
-rw-r--r--block/filter-compress.c1
-rw-r--r--block/gluster.c1
-rw-r--r--block/io.c1
-rw-r--r--block/iscsi.c1
-rw-r--r--block/mirror.c1
-rw-r--r--block/monitor/bitmap-qmp-cmds.c2
-rw-r--r--block/nfs.c1
-rw-r--r--block/null.c1
-rw-r--r--block/nvme.c1
-rw-r--r--block/parallels-ext.c2
-rw-r--r--block/preallocate.c1
-rw-r--r--block/qapi-sysemu.c1
-rw-r--r--block/qapi.c1
-rw-r--r--block/qcow2-bitmap.c2
-rw-r--r--block/qcow2-cache.c1
-rw-r--r--block/qcow2-cluster.c1
-rw-r--r--block/qcow2-refcount.c1
-rw-r--r--block/qcow2-threads.c1
-rw-r--r--block/qcow2.c1
-rw-r--r--block/qed-check.c1
-rw-r--r--block/qed-table.c1
-rw-r--r--block/raw-format.c1
-rw-r--r--block/rbd.c1
-rw-r--r--block/ssh.c1
-rw-r--r--block/throttle.c2
-rw-r--r--block/vhdx-log.c1
-rw-r--r--block/vvfat.c1
-rw-r--r--block/win32-aio.c1
-rw-r--r--block/write-threshold.c1
46 files changed, 55 insertions, 1 deletions
diff --git a/block/amend.c b/block/amend.c
index f696a00..bc4bb7b 100644
--- a/block/amend.c
+++ b/block/amend.c
@@ -26,6 +26,7 @@
*/
#include "qemu/osdep.h"
+#include "block/block-io.h"
#include "block/block_int.h"
#include "qemu/job.h"
#include "qemu/main-loop.h"
diff --git a/block/backup.c b/block/backup.c
index 6a9ad97..824d39a 100644
--- a/block/backup.c
+++ b/block/backup.c
@@ -20,6 +20,7 @@
#include "block/blockjob_int.h"
#include "block/block_backup.h"
#include "block/block-copy.h"
+#include "block/dirty-bitmap.h"
#include "qapi/error.h"
#include "qapi/qmp/qerror.h"
#include "qemu/cutils.h"
diff --git a/block/blkdebug.c b/block/blkdebug.c
index ca65b04..fa38c1c 100644
--- a/block/blkdebug.c
+++ b/block/blkdebug.c
@@ -27,6 +27,7 @@
#include "qapi/error.h"
#include "qemu/cutils.h"
#include "qemu/config-file.h"
+#include "block/block-io.h"
#include "block/block_int.h"
#include "block/qdict.h"
#include "qemu/module.h"
diff --git a/block/blklogwrites.c b/block/blklogwrites.c
index cef9efe..a5bf767 100644
--- a/block/blklogwrites.c
+++ b/block/blklogwrites.c
@@ -12,6 +12,7 @@
#include "qemu/osdep.h"
#include "qapi/error.h"
#include "qemu/sockets.h" /* for EINPROGRESS on Windows */
+#include "block/block-io.h"
#include "block/block_int.h"
#include "qapi/qmp/qdict.h"
#include "qapi/qmp/qstring.h"
diff --git a/block/blkreplay.c b/block/blkreplay.c
index 76a0b8d..e3b6a3e 100644
--- a/block/blkreplay.c
+++ b/block/blkreplay.c
@@ -11,6 +11,7 @@
#include "qemu/osdep.h"
#include "qemu/module.h"
+#include "block/block-io.h"
#include "block/block_int.h"
#include "sysemu/replay.h"
#include "qapi/error.h"
diff --git a/block/blkverify.c b/block/blkverify.c
index c60a2dc..0e78bc9 100644
--- a/block/blkverify.c
+++ b/block/blkverify.c
@@ -10,6 +10,7 @@
#include "qemu/osdep.h"
#include "qapi/error.h"
#include "qemu/sockets.h" /* for EINPROGRESS on Windows */
+#include "block/block-io.h"
#include "block/block_int.h"
#include "qapi/qmp/qdict.h"
#include "qapi/qmp/qstring.h"
diff --git a/block/block-copy.c b/block/block-copy.c
index 5e59d62..30a4da0 100644
--- a/block/block-copy.c
+++ b/block/block-copy.c
@@ -17,10 +17,14 @@
#include "trace.h"
#include "qapi/error.h"
#include "block/block-copy.h"
+#include "block/block_int-io.h"
+#include "block/dirty-bitmap.h"
#include "block/reqlist.h"
#include "sysemu/block-backend.h"
#include "qemu/units.h"
+#include "qemu/co-shared-resource.h"
#include "qemu/coroutine.h"
+#include "qemu/ratelimit.h"
#include "block/aio_task.h"
#include "qemu/error-report.h"
#include "qemu/memalign.h"
diff --git a/block/bochs.c b/block/bochs.c
index e30e390..46e7958 100644
--- a/block/bochs.c
+++ b/block/bochs.c
@@ -24,6 +24,7 @@
*/
#include "qemu/osdep.h"
#include "qapi/error.h"
+#include "block/block-io.h"
#include "block/block_int.h"
#include "qemu/module.h"
#include "qemu/bswap.h"
diff --git a/block/cloop.c b/block/cloop.c
index 3ff975a..1e5a52d 100644
--- a/block/cloop.c
+++ b/block/cloop.c
@@ -24,6 +24,7 @@
#include "qemu/osdep.h"
#include "qapi/error.h"
#include "qemu/error-report.h"
+#include "block/block-io.h"
#include "block/block_int.h"
#include "qemu/module.h"
#include "qemu/bswap.h"
diff --git a/block/copy-before-write.c b/block/copy-before-write.c
index 70c4ba7..c9fb809 100644
--- a/block/copy-before-write.c
+++ b/block/copy-before-write.c
@@ -32,6 +32,7 @@
#include "block/block_int.h"
#include "block/qdict.h"
#include "block/block-copy.h"
+#include "block/dirty-bitmap.h"
#include "block/copy-before-write.h"
#include "block/reqlist.h"
diff --git a/block/copy-on-read.c b/block/copy-on-read.c
index 815ac1d..13ed415 100644
--- a/block/copy-on-read.c
+++ b/block/copy-on-read.c
@@ -21,6 +21,7 @@
*/
#include "qemu/osdep.h"
+#include "block/block-io.h"
#include "block/block_int.h"
#include "qemu/module.h"
#include "qapi/error.h"
diff --git a/block/curl.c b/block/curl.c
index cba4c4c..bf45fa3 100644
--- a/block/curl.c
+++ b/block/curl.c
@@ -27,6 +27,7 @@
#include "qemu/error-report.h"
#include "qemu/module.h"
#include "qemu/option.h"
+#include "block/block-io.h"
#include "block/block_int.h"
#include "qapi/qmp/qdict.h"
#include "qapi/qmp/qstring.h"
diff --git a/block/dirty-bitmap.c b/block/dirty-bitmap.c
index 956feeb..1e7aee4 100644
--- a/block/dirty-bitmap.c
+++ b/block/dirty-bitmap.c
@@ -24,8 +24,10 @@
#include "qemu/osdep.h"
#include "qapi/error.h"
#include "trace.h"
+#include "block/block-io.h"
#include "block/block_int.h"
#include "block/blockjob.h"
+#include "block/dirty-bitmap.h"
#include "qemu/main-loop.h"
struct BdrvDirtyBitmap {
diff --git a/block/dmg.c b/block/dmg.c
index 675e840..e10b9a2 100644
--- a/block/dmg.c
+++ b/block/dmg.c
@@ -23,6 +23,7 @@
*/
#include "qemu/osdep.h"
#include "qapi/error.h"
+#include "block/block-io.h"
#include "block/block_int.h"
#include "qemu/bswap.h"
#include "qemu/error-report.h"
diff --git a/block/export/fuse.c b/block/export/fuse.c
index 1b26ddf..e5fc4af 100644
--- a/block/export/fuse.c
+++ b/block/export/fuse.c
@@ -21,12 +21,13 @@
#include "qemu/osdep.h"
#include "qemu/memalign.h"
#include "block/aio.h"
-#include "block/block.h"
+#include "block/block_int-common.h"
#include "block/export.h"
#include "block/fuse.h"
#include "block/qapi.h"
#include "qapi/error.h"
#include "qapi/qapi-commands-block.h"
+#include "qemu/main-loop.h"
#include "sysemu/block-backend.h"
#include <fuse.h>
diff --git a/block/file-posix.c b/block/file-posix.c
index b9955db..fa227d9 100644
--- a/block/file-posix.c
+++ b/block/file-posix.c
@@ -26,6 +26,7 @@
#include "qapi/error.h"
#include "qemu/cutils.h"
#include "qemu/error-report.h"
+#include "block/block-io.h"
#include "block/block_int.h"
#include "qemu/module.h"
#include "qemu/option.h"
diff --git a/block/file-win32.c b/block/file-win32.c
index ec9d64d..12be9c3 100644
--- a/block/file-win32.c
+++ b/block/file-win32.c
@@ -25,6 +25,7 @@
#include "qemu/osdep.h"
#include "qapi/error.h"
#include "qemu/cutils.h"
+#include "block/block-io.h"
#include "block/block_int.h"
#include "qemu/module.h"
#include "qemu/option.h"
diff --git a/block/filter-compress.c b/block/filter-compress.c
index 305716c..0ff8d28 100644
--- a/block/filter-compress.c
+++ b/block/filter-compress.c
@@ -22,6 +22,7 @@
*/
#include "qemu/osdep.h"
+#include "block/block-io.h"
#include "block/block_int.h"
#include "qemu/module.h"
#include "qapi/error.h"
diff --git a/block/gluster.c b/block/gluster.c
index 7efc296..1ad19ae 100644
--- a/block/gluster.c
+++ b/block/gluster.c
@@ -11,6 +11,7 @@
#include "qemu/osdep.h"
#include "qemu/units.h"
#include <glusterfs/api/glfs.h>
+#include "block/block-io.h"
#include "block/block_int.h"
#include "block/qdict.h"
#include "qapi/error.h"
diff --git a/block/io.c b/block/io.c
index a09b1b3..a09a19f 100644
--- a/block/io.c
+++ b/block/io.c
@@ -30,6 +30,7 @@
#include "block/blockjob_int.h"
#include "block/block_int.h"
#include "block/coroutines.h"
+#include "block/dirty-bitmap.h"
#include "block/write-threshold.h"
#include "qemu/cutils.h"
#include "qemu/memalign.h"
diff --git a/block/iscsi.c b/block/iscsi.c
index a316d46..c16c592 100644
--- a/block/iscsi.c
+++ b/block/iscsi.c
@@ -33,6 +33,7 @@
#include "qemu/error-report.h"
#include "qemu/bitops.h"
#include "qemu/bitmap.h"
+#include "block/block-io.h"
#include "block/block_int.h"
#include "block/qdict.h"
#include "scsi/constants.h"
diff --git a/block/mirror.c b/block/mirror.c
index 251adc5..634815d 100644
--- a/block/mirror.c
+++ b/block/mirror.c
@@ -18,6 +18,7 @@
#include "trace.h"
#include "block/blockjob_int.h"
#include "block/block_int.h"
+#include "block/dirty-bitmap.h"
#include "sysemu/block-backend.h"
#include "qapi/error.h"
#include "qapi/qmp/qerror.h"
diff --git a/block/monitor/bitmap-qmp-cmds.c b/block/monitor/bitmap-qmp-cmds.c
index 2823636..55f778f 100644
--- a/block/monitor/bitmap-qmp-cmds.c
+++ b/block/monitor/bitmap-qmp-cmds.c
@@ -32,7 +32,9 @@
#include "qemu/osdep.h"
+#include "block/block-io.h"
#include "block/block_int.h"
+#include "block/dirty-bitmap.h"
#include "qapi/qapi-commands-block.h"
#include "qapi/error.h"
diff --git a/block/nfs.c b/block/nfs.c
index ece2235..5e288df 100644
--- a/block/nfs.c
+++ b/block/nfs.c
@@ -30,6 +30,7 @@
#include "qemu/config-file.h"
#include "qemu/error-report.h"
#include "qapi/error.h"
+#include "block/block-io.h"
#include "block/block_int.h"
#include "block/qdict.h"
#include "trace.h"
diff --git a/block/null.c b/block/null.c
index 75f7d0d..306e605 100644
--- a/block/null.c
+++ b/block/null.c
@@ -16,6 +16,7 @@
#include "qapi/qmp/qstring.h"
#include "qemu/module.h"
#include "qemu/option.h"
+#include "block/block-io.h"
#include "block/block_int.h"
#include "sysemu/replay.h"
diff --git a/block/nvme.c b/block/nvme.c
index 656624c..1f13676 100644
--- a/block/nvme.c
+++ b/block/nvme.c
@@ -23,6 +23,7 @@
#include "qemu/option.h"
#include "qemu/memalign.h"
#include "qemu/vfio-helpers.h"
+#include "block/block-io.h"
#include "block/block_int.h"
#include "sysemu/replay.h"
#include "trace.h"
diff --git a/block/parallels-ext.c b/block/parallels-ext.c
index c9dbbf5..8a109f0 100644
--- a/block/parallels-ext.c
+++ b/block/parallels-ext.c
@@ -25,7 +25,9 @@
#include "qemu/osdep.h"
#include "qapi/error.h"
+#include "block/block-io.h"
#include "block/block_int.h"
+#include "block/dirty-bitmap.h"
#include "parallels.h"
#include "crypto/hash.h"
#include "qemu/uuid.h"
diff --git a/block/preallocate.c b/block/preallocate.c
index d50ee7f..a51fc08 100644
--- a/block/preallocate.c
+++ b/block/preallocate.c
@@ -30,6 +30,7 @@
#include "qemu/module.h"
#include "qemu/option.h"
#include "qemu/units.h"
+#include "block/block-io.h"
#include "block/block_int.h"
diff --git a/block/qapi-sysemu.c b/block/qapi-sysemu.c
index 0c7a142..7bd7554 100644
--- a/block/qapi-sysemu.c
+++ b/block/qapi-sysemu.c
@@ -32,6 +32,7 @@
#include "qemu/osdep.h"
+#include "block/block_int.h"
#include "qapi/error.h"
#include "qapi/qapi-commands-block.h"
#include "qapi/qmp/qdict.h"
diff --git a/block/qapi.c b/block/qapi.c
index fea8084..9b4da12 100644
--- a/block/qapi.c
+++ b/block/qapi.c
@@ -26,6 +26,7 @@
#include "qemu/cutils.h"
#include "block/qapi.h"
#include "block/block_int.h"
+#include "block/dirty-bitmap.h"
#include "block/throttle-groups.h"
#include "block/write-threshold.h"
#include "qapi/error.h"
diff --git a/block/qcow2-bitmap.c b/block/qcow2-bitmap.c
index bcad567..385260a 100644
--- a/block/qcow2-bitmap.c
+++ b/block/qcow2-bitmap.c
@@ -26,6 +26,8 @@
*/
#include "qemu/osdep.h"
+#include "block/block-io.h"
+#include "block/dirty-bitmap.h"
#include "qapi/error.h"
#include "qemu/cutils.h"
diff --git a/block/qcow2-cache.c b/block/qcow2-cache.c
index 54b2d5f..01c67bd 100644
--- a/block/qcow2-cache.c
+++ b/block/qcow2-cache.c
@@ -23,6 +23,7 @@
*/
#include "qemu/osdep.h"
+#include "block/block-io.h"
#include "qemu/memalign.h"
#include "qcow2.h"
#include "trace.h"
diff --git a/block/qcow2-cluster.c b/block/qcow2-cluster.c
index 40ed847..870be10 100644
--- a/block/qcow2-cluster.c
+++ b/block/qcow2-cluster.c
@@ -25,6 +25,7 @@
#include "qemu/osdep.h"
#include <zlib.h>
+#include "block/block-io.h"
#include "qapi/error.h"
#include "qcow2.h"
#include "qemu/bswap.h"
diff --git a/block/qcow2-refcount.c b/block/qcow2-refcount.c
index 8126474..5ffbefe 100644
--- a/block/qcow2-refcount.c
+++ b/block/qcow2-refcount.c
@@ -23,6 +23,7 @@
*/
#include "qemu/osdep.h"
+#include "block/block-io.h"
#include "qapi/error.h"
#include "qcow2.h"
#include "qemu/range.h"
diff --git a/block/qcow2-threads.c b/block/qcow2-threads.c
index 1914baf..953bbe6 100644
--- a/block/qcow2-threads.c
+++ b/block/qcow2-threads.c
@@ -34,6 +34,7 @@
#endif
#include "qcow2.h"
+#include "block/block-io.h"
#include "block/thread-pool.h"
#include "crypto.h"
diff --git a/block/qcow2.c b/block/qcow2.c
index bafbd07..2e9c57e 100644
--- a/block/qcow2.c
+++ b/block/qcow2.c
@@ -43,6 +43,7 @@
#include "qapi/qapi-visit-block-core.h"
#include "crypto.h"
#include "block/aio_task.h"
+#include "block/dirty-bitmap.h"
/*
Differences with QCOW:
diff --git a/block/qed-check.c b/block/qed-check.c
index 418033e..a6612be 100644
--- a/block/qed-check.c
+++ b/block/qed-check.c
@@ -12,6 +12,7 @@
*/
#include "qemu/osdep.h"
+#include "block/block-io.h"
#include "qed.h"
typedef struct {
diff --git a/block/qed-table.c b/block/qed-table.c
index aa203f2..e41c87a 100644
--- a/block/qed-table.c
+++ b/block/qed-table.c
@@ -13,6 +13,7 @@
*/
#include "qemu/osdep.h"
+#include "block/block-io.h"
#include "trace.h"
#include "qemu/sockets.h" /* for EINPROGRESS on Windows */
#include "qed.h"
diff --git a/block/raw-format.c b/block/raw-format.c
index 28905b0..b6a0ce5 100644
--- a/block/raw-format.c
+++ b/block/raw-format.c
@@ -27,6 +27,7 @@
*/
#include "qemu/osdep.h"
+#include "block/block-io.h"
#include "block/block_int.h"
#include "qapi/error.h"
#include "qemu/module.h"
diff --git a/block/rbd.c b/block/rbd.c
index 3aa6aae..6167c5e 100644
--- a/block/rbd.c
+++ b/block/rbd.c
@@ -18,6 +18,7 @@
#include "qemu/error-report.h"
#include "qemu/module.h"
#include "qemu/option.h"
+#include "block/block-io.h"
#include "block/block_int.h"
#include "block/qdict.h"
#include "crypto/secret.h"
diff --git a/block/ssh.c b/block/ssh.c
index 8508710..8bd2a13 100644
--- a/block/ssh.c
+++ b/block/ssh.c
@@ -27,6 +27,7 @@
#include <libssh/libssh.h>
#include <libssh/sftp.h>
+#include "block/block-io.h"
#include "block/block_int.h"
#include "block/qdict.h"
#include "qapi/error.h"
diff --git a/block/throttle.c b/block/throttle.c
index 88851c8..00cb46d 100644
--- a/block/throttle.c
+++ b/block/throttle.c
@@ -18,6 +18,8 @@
*/
#include "qemu/osdep.h"
+#include "block/block-io.h"
+#include "block/block_int.h"
#include "block/throttle-groups.h"
#include "qemu/module.h"
#include "qemu/option.h"
diff --git a/block/vhdx-log.c b/block/vhdx-log.c
index 572582b..c48cf65 100644
--- a/block/vhdx-log.c
+++ b/block/vhdx-log.c
@@ -20,6 +20,7 @@
#include "qemu/osdep.h"
#include "qapi/error.h"
+#include "block/block-io.h"
#include "block/block_int.h"
#include "qemu/error-report.h"
#include "qemu/bswap.h"
diff --git a/block/vvfat.c b/block/vvfat.c
index 723c912..d7d775b 100644
--- a/block/vvfat.c
+++ b/block/vvfat.c
@@ -27,6 +27,7 @@
#include <dirent.h>
#include <glib/gstdio.h>
#include "qapi/error.h"
+#include "block/block-io.h"
#include "block/block_int.h"
#include "block/qdict.h"
#include "qemu/module.h"
diff --git a/block/win32-aio.c b/block/win32-aio.c
index aadc7b1..ee87d60 100644
--- a/block/win32-aio.c
+++ b/block/win32-aio.c
@@ -24,6 +24,7 @@
#include "qemu/osdep.h"
#include "qemu/timer.h"
+#include "block/block-io.h"
#include "block/block_int.h"
#include "block/aio.h"
#include "block/raw-aio.h"
diff --git a/block/write-threshold.c b/block/write-threshold.c
index 35cafbc..76d8885 100644
--- a/block/write-threshold.c
+++ b/block/write-threshold.c
@@ -11,6 +11,7 @@
*/
#include "qemu/osdep.h"
+#include "block/block-io.h"
#include "block/block_int.h"
#include "block/write-threshold.h"
#include "qapi/error.h"