Fixup wrong types for dprint()
authorJens Axboe <axboe@kernel.dk>
Mon, 25 Feb 2013 09:18:33 +0000 (10:18 +0100)
committerJens Axboe <axboe@kernel.dk>
Mon, 25 Feb 2013 09:18:33 +0000 (10:18 +0100)
Signed-off-by: Jens Axboe <axboe@kernel.dk>
filesetup.c
gettime.c
io_u.c
memory.c
server.c

index ac1804bdf42daca3204d8385da0e0c7a9a1f4320..220ceb90a1f9f343983d3c483eba65590b2104c3 100644 (file)
@@ -79,7 +79,8 @@ static int extend_file(struct thread_data *td, struct fio_file *f)
                        break;
                case FIO_FALLOCATE_POSIX:
                        dprint(FD_FILE, "posix_fallocate file %s size %llu\n",
-                                f->file_name, f->real_file_size);
+                                f->file_name,
+                                (unsigned long long) f->real_file_size);
 
                        r = posix_fallocate(f->fd, 0, f->real_file_size);
                        if (r > 0) {
@@ -91,8 +92,8 @@ static int extend_file(struct thread_data *td, struct fio_file *f)
                case FIO_FALLOCATE_KEEP_SIZE:
                        dprint(FD_FILE,
                                "fallocate(FALLOC_FL_KEEP_SIZE) "
-                               "file %s size %llu\n",
-                               f->file_name, f->real_file_size);
+                               "file %s size %llu\n", f->file_name,
+                               (unsigned long long) f->real_file_size);
 
                        r = fallocate(f->fd, FALLOC_FL_KEEP_SIZE, 0,
                                        f->real_file_size);
@@ -118,7 +119,7 @@ static int extend_file(struct thread_data *td, struct fio_file *f)
         */
        if (!td->o.fill_device) {
                dprint(FD_FILE, "truncate file %s, size %llu\n", f->file_name,
-                                                       f->real_file_size);
+                                       (unsigned long long) f->real_file_size);
                if (ftruncate(f->fd, f->real_file_size) == -1) {
                        td_verror(td, errno, "ftruncate");
                        goto err;
index d56045c58919812df17d46dd8148b78471810190..352c1d3d7611be0277d3e038d737c1465f9ec820 100644 (file)
--- a/gettime.c
+++ b/gettime.c
@@ -302,11 +302,12 @@ static int calibrate_cpu_clock(void)
        mean /= 10.0;
 
        for (i = 0; i < NR_TIME_ITERS; i++)
-               dprint(FD_TIME, "cycles[%d]=%lu\n", i, cycles[i] / 10);
+               dprint(FD_TIME, "cycles[%d]=%llu\n", i,
+                                       (unsigned long long) cycles[i] / 10);
 
        avg /= samples;
        avg = (avg + 5) / 10;
-       dprint(FD_TIME, "avg: %lu\n", avg);
+       dprint(FD_TIME, "avg: %llu\n", (unsigned long long) avg);
        dprint(FD_TIME, "mean=%f, S=%f\n", mean, S);
 
        cycles_per_usec = avg;
diff --git a/io_u.c b/io_u.c
index 1013c7fd0aeaa515b41cd2465272f0ecda4514ae..e474b48f9ca0c4ab5a26f49363f90e2a4bacc1d2 100644 (file)
--- a/io_u.c
+++ b/io_u.c
@@ -101,7 +101,7 @@ static int __get_next_rand_offset(struct thread_data *td, struct fio_file *f,
                        r = __rand(&td->__random_state);
                }
 
-               dprint(FD_RANDOM, "off rand %llu\n", r);
+               dprint(FD_RANDOM, "off rand %llu\n", (unsigned long long) r);
 
                *b = (lastb - 1) * (r / ((uint64_t) rmax + 1.0));
        } else {
@@ -125,7 +125,8 @@ static int __get_next_rand_offset(struct thread_data *td, struct fio_file *f,
        if (random_map_free(f, *b))
                goto ret;
 
-       dprint(FD_RANDOM, "get_next_rand_offset: offset %llu busy\n", *b);
+       dprint(FD_RANDOM, "get_next_rand_offset: offset %llu busy\n",
+                                               (unsigned long long) *b);
 
        *b = axmap_next_free(f->io_axmap, *b);
        if (*b == (uint64_t) -1ULL)
@@ -242,7 +243,8 @@ static int get_next_rand_block(struct thread_data *td, struct fio_file *f,
        }
 
        dprint(FD_IO, "%s: rand offset failed, last=%llu, size=%llu\n",
-                       f->file_name, f->last_pos, f->real_file_size);
+                       f->file_name, (unsigned long long) f->last_pos,
+                       (unsigned long long) f->real_file_size);
        return 1;
 }
 
@@ -344,14 +346,16 @@ static int __get_next_offset(struct thread_data *td, struct io_u *io_u)
 
        if (io_u->offset >= f->io_size) {
                dprint(FD_IO, "get_next_offset: offset %llu >= io_size %llu\n",
-                                       io_u->offset, f->io_size);
+                                       (unsigned long long) io_u->offset,
+                                       (unsigned long long) f->io_size);
                return 1;
        }
 
        io_u->offset += f->file_offset;
        if (io_u->offset >= f->real_file_size) {
                dprint(FD_IO, "get_next_offset: offset %llu >= size %llu\n",
-                                       io_u->offset, f->real_file_size);
+                                       (unsigned long long) io_u->offset,
+                                       (unsigned long long) f->real_file_size);
                return 1;
        }
 
@@ -716,8 +720,9 @@ static int fill_io_u(struct thread_data *td, struct io_u *io_u)
 
        if (io_u->offset + io_u->buflen > io_u->file->real_file_size) {
                dprint(FD_IO, "io_u %p, offset too large\n", io_u);
-               dprint(FD_IO, "  off=%llu/%lu > %llu\n", io_u->offset,
-                               io_u->buflen, io_u->file->real_file_size);
+               dprint(FD_IO, "  off=%llu/%lu > %llu\n",
+                       (unsigned long long) io_u->offset, io_u->buflen,
+                       (unsigned long long) io_u->file->real_file_size);
                return 1;
        }
 
index 3759c8c58ae51fb5b1b3cef1e36f6dc24fd23c2a..ee5f895d2b0b0f88e6bd50a2a2a50149c45591fd 100644 (file)
--- a/memory.c
+++ b/memory.c
@@ -155,8 +155,8 @@ static int alloc_mem_mmap(struct thread_data *td, size_t total_mem)
 
        td->orig_buffer = mmap(NULL, total_mem, PROT_READ | PROT_WRITE, flags,
                                td->mmapfd, 0);
-       dprint(FD_MEM, "mmap %u/%d %p\n", total_mem, td->mmapfd,
-                                               td->orig_buffer);
+       dprint(FD_MEM, "mmap %llu/%d %p\n", (unsigned long long) total_mem,
+                                               td->mmapfd, td->orig_buffer);
        if (td->orig_buffer == MAP_FAILED) {
                td_verror(td, errno, "mmap");
                td->orig_buffer = NULL;
@@ -173,7 +173,8 @@ static int alloc_mem_mmap(struct thread_data *td, size_t total_mem)
 
 static void free_mem_mmap(struct thread_data *td, size_t total_mem)
 {
-       dprint(FD_MEM, "munmap %u %p\n", total_mem, td->orig_buffer);
+       dprint(FD_MEM, "munmap %llu %p\n", (unsigned long long) total_mem,
+                                               td->orig_buffer);
        munmap(td->orig_buffer, td->orig_buffer_size);
        if (td->mmapfile) {
                close(td->mmapfd);
@@ -185,7 +186,8 @@ static void free_mem_mmap(struct thread_data *td, size_t total_mem)
 static int alloc_mem_malloc(struct thread_data *td, size_t total_mem)
 {
        td->orig_buffer = malloc(total_mem);
-       dprint(FD_MEM, "malloc %u %p\n", total_mem, td->orig_buffer);
+       dprint(FD_MEM, "malloc %llu %p\n", (unsigned long long) total_mem,
+                                                       td->orig_buffer);
 
        return td->orig_buffer == NULL;
 }
@@ -216,7 +218,7 @@ int allocate_io_mem(struct thread_data *td)
                        total_mem += td->o.mem_align - page_size;
        }
 
-       dprint(FD_MEM, "Alloc %lu for buffers\n", (size_t) total_mem);
+       dprint(FD_MEM, "Alloc %llu for buffers\n", (unsigned long long) total_mem);
 
        if (td->o.mem_type == MEM_MALLOC)
                ret = alloc_mem_malloc(td, total_mem);
index ad785720fa0010b681e6d6c5d28e153480fd8e6d..d4676ddab40cf733007a5685700edda0b27ee67d 100644 (file)
--- a/server.c
+++ b/server.c
@@ -463,8 +463,9 @@ static int handle_command(struct fio_net_cmd *cmd)
 {
        int ret;
 
-       dprint(FD_NET, "server: got op [%s], pdu=%u, tag=%lx\n",
-                       fio_server_op(cmd->opcode), cmd->pdu_len, cmd->tag);
+       dprint(FD_NET, "server: got op [%s], pdu=%u, tag=%llx\n",
+                       fio_server_op(cmd->opcode), cmd->pdu_len,
+                       (unsigned long long) cmd->tag);
 
        switch (cmd->opcode) {
        case FIO_NET_CMD_QUIT: