diff --git a/backend.c b/backend.c index d82d49487c..a92b1e3c02 100644 --- a/backend.c +++ b/backend.c @@ -22,29 +22,17 @@ * */ #include -#include #include -#include #include -#include -#include #include -#include #include #include #include -#include -#include #include #include "fio.h" -#ifndef FIO_NO_HAVE_SHM_H -#include -#endif -#include "hash.h" #include "smalloc.h" #include "verify.h" -#include "trim.h" #include "diskutil.h" #include "cgroup.h" #include "profile.h" diff --git a/blktrace.c b/blktrace.c index 4b791d7eb3..6e4d0a4c96 100644 --- a/blktrace.c +++ b/blktrace.c @@ -3,10 +3,8 @@ */ #include #include -#include #include #include -#include #include "flist.h" #include "fio.h" diff --git a/cconv.c b/cconv.c index 92996b1e43..dbe0071a1d 100644 --- a/cconv.c +++ b/cconv.c @@ -1,5 +1,6 @@ #include +#include "log.h" #include "thread_options.h" static void string_to_cpu(char **dst, const uint8_t *src) diff --git a/cgroup.c b/cgroup.c index 4fab977aeb..380e37e487 100644 --- a/cgroup.c +++ b/cgroup.c @@ -5,7 +5,6 @@ #include #include #include -#include #include "fio.h" #include "flist.h" #include "cgroup.h" diff --git a/client.c b/client.c index bff0adc0d9..43825d9e27 100644 --- a/client.c +++ b/client.c @@ -1,13 +1,11 @@ #include #include #include -#include #include #include #include #include #include -#include #include #include #include @@ -23,7 +21,7 @@ #include "server.h" #include "flist.h" #include "hash.h" -#include "verify.h" +#include "verify-state.h" static void handle_du(struct fio_client *client, struct fio_net_cmd *cmd); static void handle_ts(struct fio_client *client, struct fio_net_cmd *cmd); diff --git a/client.h b/client.h index 90082a3491..29e84d0dc2 100644 --- a/client.h +++ b/client.h @@ -1,7 +1,6 @@ #ifndef CLIENT_H #define CLIENT_H -#include #include #include #include @@ -10,7 +9,6 @@ #include "stat.h" struct fio_net_cmd; -struct client_ops; enum { Client_created = 0, @@ -83,6 +81,8 @@ typedef void (client_eta_op)(struct jobs_eta *je); typedef void (client_timed_out_op)(struct fio_client *); typedef void (client_jobs_eta_op)(struct fio_client *client, struct jobs_eta *je); +extern struct client_ops fio_client_ops; + struct client_ops { client_cmd_op *text; client_cmd_op *disk_util; @@ -105,8 +105,6 @@ struct client_ops { uint32_t client_type; }; -extern struct client_ops fio_client_ops; - struct client_eta { unsigned int pending; struct jobs_eta eta; diff --git a/compiler/compiler.h b/compiler/compiler.h index 91a988369e..8488aa0d4b 100644 --- a/compiler/compiler.h +++ b/compiler/compiler.h @@ -1,6 +1,5 @@ #ifndef FIO_COMPILER_H #define FIO_COMPILER_H -#include #if __GNUC__ >= 4 #include "compiler-gcc4.h" diff --git a/crc/crc32.c b/crc/crc32.c index 4140a8d4ad..e35f5d9308 100644 --- a/crc/crc32.c +++ b/crc/crc32.c @@ -15,7 +15,6 @@ along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include #include "crc32.h" static const uint32_t crctab[256] = { diff --git a/crc/crc32.h b/crc/crc32.h index a37d7ada96..6378e815b1 100644 --- a/crc/crc32.h +++ b/crc/crc32.h @@ -18,6 +18,8 @@ #ifndef CRC32_H #define CRC32_H +#include + extern uint32_t fio_crc32(const void * const, unsigned long); #endif diff --git a/crc/crc32c-intel.c b/crc/crc32c-intel.c index 05a087dcb6..9a2cefdedc 100644 --- a/crc/crc32c-intel.c +++ b/crc/crc32c-intel.c @@ -1,10 +1,3 @@ -#include -#include -#include -#include -#include -#include -#include #include "crc32c.h" /* diff --git a/crc/crc32c.c b/crc/crc32c.c index f6fc688748..34944aea92 100644 --- a/crc/crc32c.c +++ b/crc/crc32c.c @@ -30,8 +30,6 @@ * any later version. * */ -#include - #include "crc32c.h" /* diff --git a/crc/crc32c.h b/crc/crc32c.h index be03c1a27c..60f6014196 100644 --- a/crc/crc32c.h +++ b/crc/crc32c.h @@ -18,6 +18,8 @@ #ifndef CRC32C_H #define CRC32C_H +#include + #include "../arch/arch.h" #include "../lib/types.h" diff --git a/crc/md5.c b/crc/md5.c index 64fe48a9a4..ade4f69721 100644 --- a/crc/md5.c +++ b/crc/md5.c @@ -2,7 +2,6 @@ * Shamelessly lifted from the 2.6 kernel (crypto/md5.c) */ #include -#include #include "md5.h" static void md5_transform(uint32_t *hash, uint32_t const *in) diff --git a/crc/sha1.h b/crc/sha1.h index 75317f76c6..416199baff 100644 --- a/crc/sha1.h +++ b/crc/sha1.h @@ -1,6 +1,8 @@ #ifndef FIO_SHA1 #define FIO_SHA1 +#include + /* * Based on the Mozilla SHA1 (see mozilla-sha1/sha1.h), * optimized to do word accesses rather than byte accesses, diff --git a/crc/sha256.c b/crc/sha256.c index 2fd17a32d1..2b39c42e22 100644 --- a/crc/sha256.c +++ b/crc/sha256.c @@ -17,7 +17,6 @@ * */ #include -#include #include "../lib/bswap.h" #include "sha256.h" diff --git a/crc/sha256.h b/crc/sha256.h index b6360336d2..b904c7d1d3 100644 --- a/crc/sha256.h +++ b/crc/sha256.h @@ -1,6 +1,8 @@ #ifndef FIO_SHA256_H #define FIO_SHA256_H +#include + #define SHA256_DIGEST_SIZE 32 #define SHA256_BLOCK_SIZE 64 diff --git a/crc/sha3.c b/crc/sha3.c index 2685dce60f..c136550aae 100644 --- a/crc/sha3.c +++ b/crc/sha3.c @@ -13,7 +13,6 @@ * */ #include -#include #include "../os/os.h" diff --git a/crc/sha512.c b/crc/sha512.c index e069a4489e..f599cdcc82 100644 --- a/crc/sha512.c +++ b/crc/sha512.c @@ -12,7 +12,6 @@ */ #include -#include #include "../lib/bswap.h" #include "sha512.h" diff --git a/crc/sha512.h b/crc/sha512.h index f8b2112aed..5adf6271cd 100644 --- a/crc/sha512.h +++ b/crc/sha512.h @@ -1,6 +1,8 @@ #ifndef FIO_SHA512_H #define FIO_SHA512_H +#include + struct fio_sha512_ctx { uint64_t state[8]; uint32_t count[4]; diff --git a/crc/test.c b/crc/test.c index b119872625..b57f07a4d7 100644 --- a/crc/test.c +++ b/crc/test.c @@ -1,11 +1,12 @@ +#include #include #include #include -#include "../fio.h" #include "../gettime.h" #include "../fio_time.h" -#include "../verify.h" +#include "../lib/rand.h" +#include "../os/os.h" #include "../crc/md5.h" #include "../crc/crc64.h" diff --git a/debug.c b/debug.c index 2bee5078c1..d1e2987ba3 100644 --- a/debug.c +++ b/debug.c @@ -1,7 +1,8 @@ +#include #include -#include -#include + #include "debug.h" +#include "log.h" #ifdef FIO_INC_DEBUG void __dprint(int type, const char *str, ...) diff --git a/debug.h b/debug.h index 1765fdb61e..8a8cf8710e 100644 --- a/debug.h +++ b/debug.h @@ -1,9 +1,7 @@ #ifndef FIO_DEBUG_H #define FIO_DEBUG_H -#include #include "lib/types.h" -#include "log.h" enum { FD_PROCESS = 0, diff --git a/diskutil.c b/diskutil.c index dd8fc6a20b..b973120c1a 100644 --- a/diskutil.c +++ b/diskutil.c @@ -1,13 +1,10 @@ #include #include -#include #include #include #include #include #include -#include -#include #ifdef CONFIG_VALGRIND_DEV #include #else diff --git a/diskutil.h b/diskutil.h index c1035785c0..15ec681a44 100644 --- a/diskutil.h +++ b/diskutil.h @@ -3,7 +3,6 @@ #include "json.h" #define FIO_DU_NAME_SZ 64 -#include "lib/output_buffer.h" #include "helper_thread.h" #include "fio_sem.h" diff --git a/engines/e4defrag.c b/engines/e4defrag.c index 4b444888aa..3619450d29 100644 --- a/engines/e4defrag.c +++ b/engines/e4defrag.c @@ -9,11 +9,7 @@ #include #include #include -#include -#include -#include #include -#include #include #include "../fio.h" diff --git a/engines/falloc.c b/engines/falloc.c index 2b00d525d6..bb3ac85045 100644 --- a/engines/falloc.c +++ b/engines/falloc.c @@ -9,11 +9,7 @@ * */ #include -#include -#include -#include #include -#include #include #include "../fio.h" diff --git a/engines/filecreate.c b/engines/filecreate.c index 0c3bcdd6b1..6fa041cdba 100644 --- a/engines/filecreate.c +++ b/engines/filecreate.c @@ -5,12 +5,10 @@ * of the file creation. */ #include -#include #include #include #include "../fio.h" -#include "../filehash.h" struct fc_data { enum fio_ddir stat_ddir; diff --git a/engines/ftruncate.c b/engines/ftruncate.c index e86dbac009..14e115f221 100644 --- a/engines/ftruncate.c +++ b/engines/ftruncate.c @@ -6,16 +6,10 @@ * DDIR_WRITE does ftruncate * */ -#include -#include -#include -#include #include -#include -#include +#include #include "../fio.h" -#include "../filehash.h" static int fio_ftruncate_queue(struct thread_data *td, struct io_u *io_u) { diff --git a/engines/libaio.c b/engines/libaio.c index e0d7cbbafb..7d59df3869 100644 --- a/engines/libaio.c +++ b/engines/libaio.c @@ -4,11 +4,9 @@ * IO engine using the Linux native aio interface. * */ -#include #include #include #include -#include #include #include "../fio.h" diff --git a/engines/mmap.c b/engines/mmap.c index ea7179da23..9dbefc8214 100644 --- a/engines/mmap.c +++ b/engines/mmap.c @@ -7,7 +7,6 @@ */ #include #include -#include #include #include diff --git a/engines/mtd.c b/engines/mtd.c index b4a660041c..5f822fc1f5 100644 --- a/engines/mtd.c +++ b/engines/mtd.c @@ -4,17 +4,14 @@ * IO engine that reads/writes from MTD character devices. * */ -#include #include #include -#include #include #include #include #include "../fio.h" #include "../optgroup.h" -#include "../verify.h" #include "../oslib/libmtd.h" static libmtd_t desc; diff --git a/engines/net.c b/engines/net.c index 37d44fd803..9b385b0cf0 100644 --- a/engines/net.c +++ b/engines/net.c @@ -9,13 +9,11 @@ #include #include #include -#include #include #include #include #include #include -#include #include #include #include diff --git a/engines/null.c b/engines/null.c index 0cfc22ad9e..8c26ad7179 100644 --- a/engines/null.c +++ b/engines/null.c @@ -13,10 +13,7 @@ * LD_LIBRARY_PATH=./engines ./fio examples/cpp_null.fio * */ -#include #include -#include -#include #include #include "../fio.h" diff --git a/engines/sg.c b/engines/sg.c index f240755595..7b18c28ef2 100644 --- a/engines/sg.c +++ b/engines/sg.c @@ -8,7 +8,6 @@ #include #include #include -#include #include #include "../fio.h" diff --git a/engines/splice.c b/engines/splice.c index d5d8ab0eba..d322f40212 100644 --- a/engines/splice.c +++ b/engines/splice.c @@ -9,7 +9,6 @@ #include #include #include -#include #include #include diff --git a/engines/sync.c b/engines/sync.c index 26b98b60e2..d5b4012f80 100644 --- a/engines/sync.c +++ b/engines/sync.c @@ -10,7 +10,6 @@ #include #include #include -#include #include "../fio.h" #include "../optgroup.h" diff --git a/eta.c b/eta.c index 3126f217d4..2d549ee9c8 100644 --- a/eta.c +++ b/eta.c @@ -2,7 +2,6 @@ * Status and ETA code */ #include -#include #include #ifdef CONFIG_VALGRIND_DEV #include diff --git a/fifo.c b/fifo.c index 98737e9c83..ac0d21576d 100644 --- a/fifo.c +++ b/fifo.c @@ -24,6 +24,7 @@ #include #include "fifo.h" +#include "minmax.h" struct fifo *fifo_alloc(unsigned int size) { diff --git a/fifo.h b/fifo.h index 5e3d33967a..61cc5a87bd 100644 --- a/fifo.h +++ b/fifo.h @@ -20,7 +20,6 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ -#include "minmax.h" struct fifo { unsigned char *buffer; /* the buffer holding the data */ diff --git a/filesetup.c b/filesetup.c index 7cbce1327f..c115f7b168 100644 --- a/filesetup.c +++ b/filesetup.c @@ -5,8 +5,6 @@ #include #include #include -#include -#include #include "fio.h" #include "smalloc.h" diff --git a/fio.c b/fio.c index 7b61ffca34..f19db1be6f 100644 --- a/fio.c +++ b/fio.c @@ -21,12 +21,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ -#include -#include -#include - #include "fio.h" -#include "smalloc.h" int main(int argc, char *argv[], char *envp[]) { diff --git a/fio.h b/fio.h index 9551048745..488fa9a62e 100644 --- a/fio.h +++ b/fio.h @@ -27,6 +27,7 @@ #include "ioengines.h" #include "iolog.h" #include "helpers.h" +#include "minmax.h" #include "options.h" #include "profile.h" #include "fio_time.h" diff --git a/fio_sem.c b/fio_sem.c index 20fcfccc02..3b48061cd2 100644 --- a/fio_sem.c +++ b/fio_sem.c @@ -1,3 +1,4 @@ +#include #include #include #include @@ -7,7 +8,6 @@ #define RUNNING_ON_VALGRIND 0 #endif -#include "log.h" #include "fio_sem.h" #include "pshared.h" #include "os/os.h" diff --git a/fio_time.h b/fio_time.h index 8b4bb255f0..39fb17ba24 100644 --- a/fio_time.h +++ b/fio_time.h @@ -1,6 +1,7 @@ #ifndef FIO_TIME_H #define FIO_TIME_H +#include #include #include #include "lib/types.h" diff --git a/gettime-thread.c b/gettime-thread.c index 87f50600cc..eb535a07cf 100644 --- a/gettime-thread.c +++ b/gettime-thread.c @@ -1,5 +1,3 @@ -#include -#include #include #include diff --git a/gettime.c b/gettime.c index 57c66f7e6f..87fc29b501 100644 --- a/gettime.c +++ b/gettime.c @@ -2,16 +2,9 @@ * Clock functions */ -#include #include -#include -#include #include "fio.h" -#include "fio_sem.h" -#include "smalloc.h" - -#include "hash.h" #include "os/os.h" #if defined(ARCH_HAVE_CPU_CLOCK) diff --git a/gettime.h b/gettime.h index 11e2a7b9c2..1c4a25c877 100644 --- a/gettime.h +++ b/gettime.h @@ -1,6 +1,8 @@ #ifndef FIO_GETTIME_H #define FIO_GETTIME_H +#include + #include "arch/arch.h" /* diff --git a/helpers.c b/helpers.c index 4342b2d2fa..a0ee37044e 100644 --- a/helpers.c +++ b/helpers.c @@ -1,13 +1,6 @@ -#include #include -#include -#include -#include -#include -#include "compiler/compiler.h" -#include "arch/arch.h" -#include "os/os.h" +#include "helpers.h" #ifndef CONFIG_LINUX_FALLOCATE int fallocate(int fd, int mode, off_t offset, off_t len) diff --git a/helpers.h b/helpers.h index 5f1865bba8..a0b328581f 100644 --- a/helpers.h +++ b/helpers.h @@ -1,10 +1,9 @@ #ifndef FIO_HELPERS_H #define FIO_HELPERS_H -#include "compiler/compiler.h" - #include -#include + +#include "os/os.h" extern int fallocate(int fd, int mode, off_t offset, off_t len); extern int posix_fallocate(int fd, off_t offset, off_t len); diff --git a/idletime.c b/idletime.c index 90bc1d9eb0..8762c8565e 100644 --- a/idletime.c +++ b/idletime.c @@ -1,4 +1,5 @@ #include +#include "fio.h" #include "json.h" #include "idletime.h" diff --git a/idletime.h b/idletime.h index b8376c2ce6..6c1161a7c2 100644 --- a/idletime.h +++ b/idletime.h @@ -1,8 +1,9 @@ #ifndef FIO_IDLETIME_H #define FIO_IDLETIME_H -#include "fio.h" -#include "lib/output_buffer.h" +#include +#include +#include "os/os.h" #define CALIBRATE_RUNS 10 #define CALIBRATE_SCALE 1000 diff --git a/init.c b/init.c index e47e538411..ab7e399752 100644 --- a/init.c +++ b/init.c @@ -4,13 +4,11 @@ #include #include #include -#include #include #include #include #include #include -#include #include #ifdef CONFIG_VALGRIND_DEV #include diff --git a/io_u.c b/io_u.c index f3b5932270..98a7dc5606 100644 --- a/io_u.c +++ b/io_u.c @@ -1,12 +1,8 @@ #include -#include #include -#include -#include #include #include "fio.h" -#include "hash.h" #include "verify.h" #include "trim.h" #include "lib/rand.h" diff --git a/io_u.h b/io_u.h index da25efb90b..aaa7d9723e 100644 --- a/io_u.h +++ b/io_u.h @@ -3,7 +3,6 @@ #include "compiler/compiler.h" #include "os/os.h" -#include "log.h" #include "io_ddir.h" #include "debug.h" #include "file.h" diff --git a/io_u_queue.h b/io_u_queue.h index b5b8d2faf3..545e2c41fa 100644 --- a/io_u_queue.h +++ b/io_u_queue.h @@ -2,6 +2,8 @@ #define FIO_IO_U_QUEUE #include +#include + #include "lib/types.h" struct io_u; diff --git a/ioengines.c b/ioengines.c index 965581aa41..a8ec79de47 100644 --- a/ioengines.c +++ b/ioengines.c @@ -9,7 +9,6 @@ * generic io engine that could be used for other projects. * */ -#include #include #include #include diff --git a/ioengines.h b/ioengines.h index 32b18edadf..a0674aeabe 100644 --- a/ioengines.h +++ b/ioengines.h @@ -1,9 +1,10 @@ #ifndef FIO_IOENGINE_H #define FIO_IOENGINE_H +#include + #include "compiler/compiler.h" -#include "os/os.h" -#include "file.h" +#include "flist.h" #include "io_u.h" #define FIO_IOOPS_VERSION 23 diff --git a/iolog.c b/iolog.c index 460d7a2e51..2b5eaf0c52 100644 --- a/iolog.c +++ b/iolog.c @@ -4,7 +4,6 @@ */ #include #include -#include #include #include #include @@ -15,7 +14,6 @@ #include "flist.h" #include "fio.h" -#include "verify.h" #include "trim.h" #include "filelock.h" #include "smalloc.h" diff --git a/iolog.h b/iolog.h index 70981f99de..f70eb61e6e 100644 --- a/iolog.h +++ b/iolog.h @@ -1,6 +1,8 @@ #ifndef FIO_IOLOG_H #define FIO_IOLOG_H +#include + #include "lib/rbtree.h" #include "lib/ieee754.h" #include "flist.h" diff --git a/json.c b/json.c index e0227ec644..75212c8552 100644 --- a/json.c +++ b/json.c @@ -1,6 +1,5 @@ #include #include -#include #include #include #include "json.h" diff --git a/json.h b/json.h index d7017e0662..bcc712cd4d 100644 --- a/json.h +++ b/json.h @@ -3,10 +3,6 @@ #include "lib/output_buffer.h" -struct json_object; -struct json_array; -struct json_pair; - #define JSON_TYPE_STRING 0 #define JSON_TYPE_INTEGER 1 #define JSON_TYPE_FLOAT 2 diff --git a/lib/bloom.c b/lib/bloom.c index bb81dbbdf8..f4f9b6b9ee 100644 --- a/lib/bloom.c +++ b/lib/bloom.c @@ -1,9 +1,7 @@ #include -#include #include "bloom.h" #include "../hash.h" -#include "../minmax.h" #include "../crc/xxhash.h" #include "../crc/murmur3.h" #include "../crc/crc32c.h" diff --git a/lib/gauss.c b/lib/gauss.c index f974490f72..1d24e187ab 100644 --- a/lib/gauss.c +++ b/lib/gauss.c @@ -1,6 +1,5 @@ #include #include -#include #include "../hash.h" #include "gauss.h" diff --git a/lib/ieee754.c b/lib/ieee754.c index c7742a2d29..2154065cc1 100644 --- a/lib/ieee754.c +++ b/lib/ieee754.c @@ -5,7 +5,6 @@ * * Below code was granted to the public domain. */ -#include #include "ieee754.h" uint64_t pack754(long double f, unsigned bits, unsigned expbits) diff --git a/lib/lfsr.c b/lib/lfsr.c index 0c0072ccb3..a4f1fb13b6 100644 --- a/lib/lfsr.c +++ b/lib/lfsr.c @@ -1,5 +1,4 @@ #include -#include #include "lfsr.h" #include "../compiler/compiler.h" diff --git a/lib/memalign.c b/lib/memalign.c index bfbd1e80c8..e774c19c3e 100644 --- a/lib/memalign.c +++ b/lib/memalign.c @@ -1,6 +1,5 @@ -#include #include -#include +#include #include "memalign.h" diff --git a/lib/memalign.h b/lib/memalign.h index df412e283a..c2eb17027d 100644 --- a/lib/memalign.h +++ b/lib/memalign.h @@ -1,6 +1,8 @@ #ifndef FIO_MEMALIGN_H #define FIO_MEMALIGN_H +#include + extern void *fio_memalign(size_t alignment, size_t size); extern void fio_memfree(void *ptr, size_t size); diff --git a/lib/memcpy.c b/lib/memcpy.c index 00e65aa7d5..cf8572e270 100644 --- a/lib/memcpy.c +++ b/lib/memcpy.c @@ -1,3 +1,4 @@ +#include #include #include #include @@ -6,7 +7,7 @@ #include "rand.h" #include "../fio_time.h" #include "../gettime.h" -#include "../fio.h" +#include "../os/os.h" #define BUF_SIZE 32 * 1024 * 1024ULL diff --git a/lib/num2str.c b/lib/num2str.c index 8d0884132f..387c5d7b32 100644 --- a/lib/num2str.c +++ b/lib/num2str.c @@ -1,3 +1,4 @@ +#include #include #include #include diff --git a/lib/output_buffer.c b/lib/output_buffer.c index f6c304bdf0..beb8a1426a 100644 --- a/lib/output_buffer.c +++ b/lib/output_buffer.c @@ -1,4 +1,3 @@ -#include #include #include diff --git a/lib/output_buffer.h b/lib/output_buffer.h index a235af2073..389ed5b7bc 100644 --- a/lib/output_buffer.h +++ b/lib/output_buffer.h @@ -1,7 +1,7 @@ #ifndef FIO_OUTPUT_BUFFER_H #define FIO_OUTPUT_BUFFER_H -#include +#include struct buf_output { char *buf; diff --git a/lib/pattern.c b/lib/pattern.c index 31ee4eaf98..2024f2e9cf 100644 --- a/lib/pattern.c +++ b/lib/pattern.c @@ -4,8 +4,6 @@ #include #include #include -#include -#include #include #include diff --git a/lib/pattern.h b/lib/pattern.h index 9f937f0216..2d655ad0d0 100644 --- a/lib/pattern.h +++ b/lib/pattern.h @@ -1,8 +1,6 @@ #ifndef FIO_PARSE_PATTERN_H #define FIO_PARSE_PATTERN_H -struct pattern_fmt; - /** * Pattern format description. The input for 'parse_pattern'. * Describes format with its name and callback, which should diff --git a/lib/prio_tree.c b/lib/prio_tree.c index de3fe1c025..d8e1b89a94 100644 --- a/lib/prio_tree.c +++ b/lib/prio_tree.c @@ -11,6 +11,7 @@ * 02Feb2004 Initial version */ +#include #include #include diff --git a/lib/prio_tree.h b/lib/prio_tree.h index e1491dbd56..9bd458f1b6 100644 --- a/lib/prio_tree.h +++ b/lib/prio_tree.h @@ -2,7 +2,6 @@ #define _LINUX_PRIO_TREE_H #include -#include "../hash.h" struct prio_tree_node { struct prio_tree_node *left; diff --git a/lib/rand.c b/lib/rand.c index 3f60a67ab7..46ffe4fb0c 100644 --- a/lib/rand.c +++ b/lib/rand.c @@ -34,7 +34,6 @@ */ #include -#include #include "rand.h" #include "pattern.h" #include "../hash.h" diff --git a/lib/rand.h b/lib/rand.h index bff4a35167..8832c73a76 100644 --- a/lib/rand.h +++ b/lib/rand.h @@ -4,7 +4,6 @@ #include #include #include "types.h" -#include "../arch/arch.h" #define FRAND32_MAX (-1U) #define FRAND64_MAX (-1ULL) diff --git a/lib/strntol.h b/lib/strntol.h index 68f5d1b7db..59c090d3de 100644 --- a/lib/strntol.h +++ b/lib/strntol.h @@ -1,6 +1,8 @@ #ifndef FIO_STRNTOL_H #define FIO_STRNTOL_H +#include + long strntol(const char *str, size_t sz, char **end, int base); #endif diff --git a/lib/zipf.c b/lib/zipf.c index 3d535c79d3..1ff8568094 100644 --- a/lib/zipf.c +++ b/lib/zipf.c @@ -1,11 +1,5 @@ #include #include -#include -#include -#include -#include -#include -#include "ieee754.h" #include "zipf.h" #include "../minmax.h" #include "../hash.h" diff --git a/lib/zipf.h b/lib/zipf.h index af2d0e645c..a4aa163c80 100644 --- a/lib/zipf.h +++ b/lib/zipf.h @@ -3,6 +3,7 @@ #include #include "rand.h" +#include "types.h" struct zipf_state { uint64_t nranges; diff --git a/libfio.c b/libfio.c index 80159b4d0d..6faf32a4e9 100644 --- a/libfio.c +++ b/libfio.c @@ -23,7 +23,6 @@ */ #include -#include #include #include #include diff --git a/log.c b/log.c index 7e8b13b31a..46e5034e3d 100644 --- a/log.c +++ b/log.c @@ -1,5 +1,4 @@ #include -#include #include #include #include diff --git a/memory.c b/memory.c index 04dc3be8bf..5f0225f710 100644 --- a/memory.c +++ b/memory.c @@ -1,11 +1,10 @@ /* * Memory helpers */ -#include -#include #include #include #include +#include #include "fio.h" #ifndef FIO_NO_HAVE_SHM_H diff --git a/options.c b/options.c index 681052127b..45a5b82be4 100644 --- a/options.c +++ b/options.c @@ -4,16 +4,12 @@ #include #include #include -#include -#include -#include #include #include #include "fio.h" #include "verify.h" #include "parse.h" -#include "lib/fls.h" #include "lib/pattern.h" #include "options.h" #include "optgroup.h" diff --git a/options.h b/options.h index 83a58e27d5..59024efc8a 100644 --- a/options.h +++ b/options.h @@ -6,7 +6,6 @@ #include #include #include "parse.h" -#include "flist.h" #include "lib/types.h" int add_option(struct fio_option *); diff --git a/oslib/strlcat.h b/oslib/strlcat.h index baeace40d4..720034fe72 100644 --- a/oslib/strlcat.h +++ b/oslib/strlcat.h @@ -1,6 +1,8 @@ #ifndef FIO_STRLCAT_H #define FIO_STRLCAT_H +#include + size_t strlcat(char *dst, const char *src, size_t size); #endif diff --git a/oslib/strndup.c b/oslib/strndup.c index 7b0fcb5161..40e92f820d 100644 --- a/oslib/strndup.c +++ b/oslib/strndup.c @@ -1,4 +1,5 @@ #include + #include "strndup.h" #ifndef CONFIG_HAVE_STRNDUP diff --git a/parse.c b/parse.c index fdb66115c3..33fcf465ca 100644 --- a/parse.c +++ b/parse.c @@ -3,18 +3,16 @@ */ #include #include -#include #include #include #include #include -#include -#include #include #include "compiler/compiler.h" #include "parse.h" #include "debug.h" +#include "log.h" #include "options.h" #include "optgroup.h" #include "minmax.h" diff --git a/server.c b/server.c index 65d4484eda..6f85810963 100644 --- a/server.c +++ b/server.c @@ -1,8 +1,6 @@ #include #include -#include #include -#include #include #include #include @@ -25,7 +23,7 @@ #include "server.h" #include "crc/crc16.h" #include "lib/ieee754.h" -#include "verify.h" +#include "verify-state.h" #include "smalloc.h" int fio_net_port = FIO_NET_PORT; diff --git a/server.h b/server.h index d652d31cf8..1eee7dcf97 100644 --- a/server.h +++ b/server.h @@ -7,7 +7,6 @@ #include #include "stat.h" -#include "os/os.h" #include "diskutil.h" #define FIO_NET_PORT 8765 @@ -217,8 +216,6 @@ extern int fio_server_parse_host(const char *, int, struct in_addr *, struct in6 extern const char *fio_server_op(unsigned int); extern void fio_server_got_signal(int); -struct thread_stat; -struct group_run_stats; extern void fio_server_send_ts(struct thread_stat *, struct group_run_stats *); extern void fio_server_send_gs(struct group_run_stats *); extern void fio_server_send_du(void); diff --git a/smalloc.c b/smalloc.c index 13995acce0..7b1690ada9 100644 --- a/smalloc.c +++ b/smalloc.c @@ -3,15 +3,8 @@ * that can be shared across processes and threads */ #include -#include -#include #include #include -#include -#include -#include -#include -#include #ifdef CONFIG_VALGRIND_DEV #include #else @@ -22,7 +15,6 @@ #include "fio.h" #include "fio_sem.h" -#include "arch/arch.h" #include "os/os.h" #include "smalloc.h" #include "log.h" diff --git a/smalloc.h b/smalloc.h index 4b551e3e4b..8df10e6f67 100644 --- a/smalloc.h +++ b/smalloc.h @@ -1,6 +1,8 @@ #ifndef FIO_SMALLOC_H #define FIO_SMALLOC_H +#include + extern void *smalloc(size_t); extern void *scalloc(size_t, size_t); extern void sfree(void *); diff --git a/stat.c b/stat.c index 98ab638939..a837ed9025 100644 --- a/stat.c +++ b/stat.c @@ -1,10 +1,7 @@ #include #include #include -#include #include -#include -#include #include #include "fio.h" diff --git a/steadystate.c b/steadystate.c index 2017ca67a8..1e3a546896 100644 --- a/steadystate.c +++ b/steadystate.c @@ -2,7 +2,6 @@ #include "fio.h" #include "steadystate.h" -#include "helper_thread.h" bool steadystate_enabled = false; diff --git a/steadystate.h b/steadystate.h index 9fd88ee8ce..51472c4698 100644 --- a/steadystate.h +++ b/steadystate.h @@ -1,9 +1,7 @@ #ifndef FIO_STEADYSTATE_H #define FIO_STEADYSTATE_H -#include "stat.h" #include "thread_options.h" -#include "lib/ieee754.h" extern void steadystate_free(struct thread_data *); extern void steadystate_check(void); diff --git a/t/axmap.c b/t/axmap.c index a803ce47bf..eef464ff2d 100644 --- a/t/axmap.c +++ b/t/axmap.c @@ -1,8 +1,5 @@ #include #include -#include -#include -#include #include #include "../lib/lfsr.h" diff --git a/t/btrace2fio.c b/t/btrace2fio.c index 4cdb38d10d..a8a9d62914 100644 --- a/t/btrace2fio.c +++ b/t/btrace2fio.c @@ -1,5 +1,4 @@ #include -#include #include #include #include @@ -12,6 +11,7 @@ #include "../blktrace_api.h" #include "../os/os.h" #include "../log.h" +#include "../minmax.h" #include "../oslib/linux-dev-lookup.h" #define TRACE_FIFO_SIZE 8192 diff --git a/t/dedupe.c b/t/dedupe.c index 1b4277c1b9..37120e1895 100644 --- a/t/dedupe.c +++ b/t/dedupe.c @@ -3,16 +3,12 @@ * just scans the filename for extents of the given size, checksums them, * and orders them up. */ +#include +#include #include -#include +#include #include -#include -#include -#include #include -#include -#include -#include #include "../flist.h" #include "../log.h" diff --git a/t/gen-rand.c b/t/gen-rand.c index 4e9d39c643..c379053db6 100644 --- a/t/gen-rand.c +++ b/t/gen-rand.c @@ -1,17 +1,11 @@ +#include +#include #include #include -#include -#include -#include -#include #include "../lib/types.h" -#include "../log.h" -#include "../lib/lfsr.h" -#include "../lib/axmap.h" -#include "../smalloc.h" -#include "../minmax.h" #include "../lib/rand.h" +#include "../log.h" int main(int argc, char *argv[]) { diff --git a/t/genzipf.c b/t/genzipf.c index 9faec38934..4fc10ae72d 100644 --- a/t/genzipf.c +++ b/t/genzipf.c @@ -14,7 +14,6 @@ */ #include #include -#include #include #include diff --git a/t/lfsr-test.c b/t/lfsr-test.c index 4009b62e38..abdbafb599 100644 --- a/t/lfsr-test.c +++ b/t/lfsr-test.c @@ -1,11 +1,7 @@ #include #include -#include #include #include -#include -#include -#include #include "../lib/lfsr.h" #include "../gettime.h" diff --git a/td_error.h b/td_error.h index 1b38a5349f..1cc3a75390 100644 --- a/td_error.h +++ b/td_error.h @@ -1,6 +1,8 @@ #ifndef FIO_TD_ERROR_H #define FIO_TD_ERROR_H +#include "io_ddir.h" + /* * What type of errors to continue on when continue_on_error is used, * and what type of errors to ignore when ignore_error is used. diff --git a/trim.c b/trim.c index 78cf67244e..bf825db346 100644 --- a/trim.c +++ b/trim.c @@ -1,11 +1,8 @@ /* * TRIM/DISCARD support */ -#include -#include #include #include -#include #include "fio.h" #include "trim.h" diff --git a/trim.h b/trim.h index 37f5d7c871..fe8f9fe990 100644 --- a/trim.h +++ b/trim.h @@ -1,9 +1,13 @@ #ifndef FIO_TRIM_H #define FIO_TRIM_H -#include "fio.h" - #ifdef FIO_HAVE_TRIM +#include "flist.h" +#include "iolog.h" +#include "compiler/compiler.h" +#include "lib/types.h" +#include "os/os.h" + extern bool __must_check get_next_trim(struct thread_data *td, struct io_u *io_u); extern bool io_u_should_trim(struct thread_data *td, struct io_u *io_u); diff --git a/verify.h b/verify.h index 321e6485e6..64121a51af 100644 --- a/verify.h +++ b/verify.h @@ -2,6 +2,7 @@ #define FIO_VERIFY_H #include +#include "compiler/compiler.h" #include "verify-state.h" #define FIO_HDR_MAGIC 0xacca diff --git a/workqueue.h b/workqueue.h index e35c181a23..0a62b5f7d3 100644 --- a/workqueue.h +++ b/workqueue.h @@ -1,7 +1,14 @@ #ifndef FIO_RATE_H #define FIO_RATE_H +#include +#include + #include "flist.h" +#include "lib/types.h" + +struct sk_out; +struct thread_data; struct workqueue_work { struct flist_head list;