projects
/
fio.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Convert unit_base to posval[]
[fio.git]
/
io_u.c
diff --git
a/io_u.c
b/io_u.c
index 8567e11664bebe0a00cb8277d9ad054bc3a7b6a9..7941a6d739483edfc5e3b3e81403716133eee97a 100644
(file)
--- a/
io_u.c
+++ b/
io_u.c
@@
-16,7
+16,7
@@
struct io_completion_data {
int nr; /* input */
int error; /* output */
int nr; /* input */
int error; /* output */
- u
nsigned long bytes_done[DDIR_RWDIR_CNT];
/* output */
+ u
int64_t bytes_done[DDIR_RWDIR_CNT];
/* output */
struct timeval time; /* output */
};
struct timeval time; /* output */
};
@@
-101,7
+101,7
@@
static int __get_next_rand_offset(struct thread_data *td, struct fio_file *f,
r = __rand(&td->__random_state);
}
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 {
*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;
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)
*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",
}
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;
}
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",
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",
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;
}
return 1;
}
@@
-497,7
+501,7
@@
static enum fio_ddir rate_ddir(struct thread_data *td, enum fio_ddir ddir)
* We have too much pending sleep in this direction. See if we
* should switch.
*/
* We have too much pending sleep in this direction. See if we
* should switch.
*/
- if (td_rw(td)) {
+ if (td_rw(td)
&& td->o.rwmix[odir]
) {
/*
* Other direction does not have too much pending, switch
*/
/*
* Other direction does not have too much pending, switch
*/
@@
-527,10
+531,10
@@
static enum fio_ddir rate_ddir(struct thread_data *td, enum fio_ddir ddir)
* io's that have been actually submitted to an async engine,
* and cur_depth is meaningless for sync engines.
*/
* io's that have been actually submitted to an async engine,
* and cur_depth is meaningless for sync engines.
*/
-
if
(td->io_u_in_flight) {
+
while
(td->io_u_in_flight) {
int fio_unused ret;
int fio_unused ret;
- ret = io_u_queued_complete(td,
td->io_u_in_flight
, NULL);
+ ret = io_u_queued_complete(td,
1
, NULL);
}
fio_gettime(&t, NULL);
}
fio_gettime(&t, NULL);
@@
-545,6
+549,7
@@
static enum fio_ddir rate_ddir(struct thread_data *td, enum fio_ddir ddir)
if (ddir_trim(ddir))
return ddir;
if (ddir_trim(ddir))
return ddir;
+
return ddir;
}
return ddir;
}
@@
-715,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);
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;
}
return 1;
}
@@
-1493,7
+1499,7
@@
static void ios_completed(struct thread_data *td,
* Complete a single io_u for the sync engines.
*/
int io_u_sync_complete(struct thread_data *td, struct io_u *io_u,
* Complete a single io_u for the sync engines.
*/
int io_u_sync_complete(struct thread_data *td, struct io_u *io_u,
- u
nsigned long
*bytes)
+ u
int64_t
*bytes)
{
struct io_completion_data icd;
{
struct io_completion_data icd;
@@
-1522,7
+1528,7
@@
int io_u_sync_complete(struct thread_data *td, struct io_u *io_u,
* Called to complete min_events number of io for the async engines.
*/
int io_u_queued_complete(struct thread_data *td, int min_evts,
* Called to complete min_events number of io for the async engines.
*/
int io_u_queued_complete(struct thread_data *td, int min_evts,
- u
nsigned long
*bytes)
+ u
int64_t
*bytes)
{
struct io_completion_data icd;
struct timespec *tvp = NULL;
{
struct io_completion_data icd;
struct timespec *tvp = NULL;