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)
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 f696a006e3..bc4bb7b416 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 6a9ad97a53..824d39acaa 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 ca65b043f0..fa38c1cf7d 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 cef9efe55d..a5bf767184 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 76a0b8d12a..e3b6a3efb2 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 c60a2dc624..0e78bc9dd6 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 5e59d6262f..30a4da0f2e 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 e30e3908d9..46e7958316 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 3ff975a94d..1e5a52d6b2 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 70c4ba7432..c9fb809ba0 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 815ac1d835..13ed4150a6 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 cba4c4cac7..bf45fa3244 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 956feeb2ae..1e7aee4010 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 675e840ca5..e10b9a2ba5 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 1b26ddfcf3..e5fc4af165 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 b9955db205..fa227d9d14 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 ec9d64d0e4..12be9c3d0f 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 305716c86c..0ff8d28661 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 7efc296399..1ad19ae915 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 a09b1b34ab..a09a19f7a7 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 a316d46d96..c16c592042 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 251adc5ae0..634815d78d 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 282363606f..55f778f5af 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 ece22353ac..5e288dfc83 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 75f7d0db40..306e605fa1 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 656624c585..1f1367640a 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 c9dbbf5089..8a109f005a 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 d50ee7f49b..a51fc08515 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 0c7a1423de..7bd7554150 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 fea808425b..9b4da12966 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 bcad567c0c..385260a1b5 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 54b2d5f4de..01c67bdddc 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 40ed847f97..870be106b6 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 81264740f0..5ffbefee2e 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 1914baf456..953bbe6df8 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 bafbd077b9..2e9c57e269 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 418033ee24..a6612be00f 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 aa203f2627..e41c87a157 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 28905b09ee..b6a0ce58f4 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 3aa6aae0e0..6167c5e424 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 8508710f2f..8bd2a134c1 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 88851c84f4..00cb46d0e5 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 572582b87b..c48cf65d62 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 723c91216e..d7d775bd2c 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 aadc7b1bc3..ee87d6048f 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 35cafbc22d..76d8885677 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"