projects
/
fio.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
t/io_uring: use fio provided memory barriers
[fio.git]
/
io_u.c
diff --git
a/io_u.c
b/io_u.c
index d28d368f694916683ad05ad34f7fa446d3c11e89..bee99c3798d8474afcfaaa71a0bc8d1a0c7de2d8 100644
(file)
--- a/
io_u.c
+++ b/
io_u.c
@@
-570,8
+570,10
@@
static unsigned long long get_next_buflen(struct thread_data *td, struct io_u *i
power_2 = is_power_of_2(minbs);
if (!td->o.bs_unaligned && power_2)
buflen &= ~(minbs - 1);
power_2 = is_power_of_2(minbs);
if (!td->o.bs_unaligned && power_2)
buflen &= ~(minbs - 1);
- else if (!td->o.bs_unaligned && !power_2)
- buflen -= buflen % minbs;
+ else if (!td->o.bs_unaligned && !power_2)
+ buflen -= buflen % minbs;
+ if (buflen > maxbs)
+ buflen = maxbs;
} while (!io_u_fits(td, io_u, buflen));
return buflen;
} while (!io_u_fits(td, io_u, buflen));
return buflen;
@@
-1559,9
+1561,8
@@
again:
assert(!(td->flags & TD_F_CHILD));
ret = pthread_cond_wait(&td->free_cond, &td->io_u_lock);
assert(ret == 0);
assert(!(td->flags & TD_F_CHILD));
ret = pthread_cond_wait(&td->free_cond, &td->io_u_lock);
assert(ret == 0);
- if (td->error)
- return NULL;
- goto again;
+ if (!td->error)
+ goto again;
}
if (needs_lock)
}
if (needs_lock)