iolog: Use %llu for 64-bit
authorJens Axboe <axboe@kernel.dk>
Fri, 8 Apr 2022 18:46:44 +0000 (12:46 -0600)
committerJens Axboe <axboe@kernel.dk>
Fri, 8 Apr 2022 18:46:44 +0000 (12:46 -0600)
The previous fix was a bit dump, we need %llu on 32-bit. Fi that and
the cast.

Fixes: 11cb686eeda8 ("iolog: fix warning for 32-bit compilation")
Signed-off-by: Jens Axboe <axboe@kernel.dk>
iolog.c

diff --git a/iolog.c b/iolog.c
index 42d2b0e909ce29716d35ce5a796ee6f03cb9874a..37e799a13ca6c9eb11f9d50f4f2f1faa43010a5f 100644 (file)
--- a/iolog.c
+++ b/iolog.c
@@ -47,10 +47,10 @@ void log_io_u(const struct thread_data *td, const struct io_u *io_u)
                return;
 
        fio_gettime(&now, NULL);
-       fprintf(td->iolog_f, "%lu %s %s %llu %llu\n",
-                       (unsigned long) utime_since_now(&td->io_log_start_time),
-                       io_u->file->file_name, io_ddir_name(io_u->ddir),
-                       io_u->offset, io_u->buflen);
+       fprintf(td->iolog_f, "%llu %s %s %llu %llu\n",
+               (unsigned long long) utime_since_now(&td->io_log_start_time),
+               io_u->file->file_name, io_ddir_name(io_u->ddir), io_u->offset,
+               io_u->buflen);
 
 }
 
@@ -73,9 +73,9 @@ void log_file(struct thread_data *td, struct fio_file *f,
                return;
 
        fio_gettime(&now, NULL);
-       fprintf(td->iolog_f, "%lu %s %s\n",
-                       (unsigned long) utime_since_now(&td->io_log_start_time),
-                       f->file_name, act[what]);
+       fprintf(td->iolog_f, "%llu %s %s\n",
+               (unsigned long long) utime_since_now(&td->io_log_start_time),
+               f->file_name, act[what]);
 }
 
 static void iolog_delay(struct thread_data *td, unsigned long delay)