projects
/
fio.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
sg: check for error in fcntl() restore of flags
[fio.git]
/
io_u.c
diff --git
a/io_u.c
b/io_u.c
index 0b86d9f3c28158e6ef8da79587ce987b8b02e03a..4b0b5a7a11bdb002f72d552c89ee4ce8c4fd6b4e 100644
(file)
--- a/
io_u.c
+++ b/
io_u.c
@@
-273,7
+273,7
@@
static int get_next_seq_offset(struct thread_data *td, struct fio_file *f,
{
assert(ddir_rw(ddir));
{
assert(ddir_rw(ddir));
- if (f->last_pos >= f->io_size + get_start_offset(td) && td->o.time_based)
+ if (f->last_pos >= f->io_size + get_start_offset(td
, f
) && td->o.time_based)
f->last_pos = f->last_pos - f->io_size;
if (f->last_pos < f->real_file_size) {
f->last_pos = f->last_pos - f->io_size;
if (f->last_pos < f->real_file_size) {
@@
-415,7
+415,7
@@
static inline int io_u_fits(struct thread_data *td, struct io_u *io_u,
{
struct fio_file *f = io_u->file;
{
struct fio_file *f = io_u->file;
- return io_u->offset + buflen <= f->io_size + get_start_offset(td);
+ return io_u->offset + buflen <= f->io_size + get_start_offset(td
, f
);
}
static unsigned int __get_next_buflen(struct thread_data *td, struct io_u *io_u,
}
static unsigned int __get_next_buflen(struct thread_data *td, struct io_u *io_u,
@@
-426,12
+426,10
@@
static unsigned int __get_next_buflen(struct thread_data *td, struct io_u *io_u,
unsigned int minbs, maxbs;
unsigned long r, rand_max;
unsigned int minbs, maxbs;
unsigned long r, rand_max;
- assert(ddir_rw(
io_u->
ddir));
+ assert(ddir_rw(ddir));
if (td->o.bs_is_seq_rand)
ddir = is_random ? DDIR_WRITE: DDIR_READ;
if (td->o.bs_is_seq_rand)
ddir = is_random ? DDIR_WRITE: DDIR_READ;
- else
- ddir = io_u->ddir;
minbs = td->o.min_bs[ddir];
maxbs = td->o.max_bs[ddir];
minbs = td->o.min_bs[ddir];
maxbs = td->o.max_bs[ddir];
@@
-680,7
+678,7
@@
static void set_rw_ddir(struct thread_data *td, struct io_u *io_u)
void put_file_log(struct thread_data *td, struct fio_file *f)
{
void put_file_log(struct thread_data *td, struct fio_file *f)
{
- int ret = put_file(td, f);
+
unsigned
int ret = put_file(td, f);
if (ret)
td_verror(td, ret, "file close");
if (ret)
td_verror(td, ret, "file close");
@@
-1490,7
+1488,8
@@
struct io_u *get_io_u(struct thread_data *td)
if (td->flags & TD_F_REFILL_BUFFERS) {
io_u_fill_buffer(td, io_u,
io_u->xfer_buflen, io_u->xfer_buflen);
if (td->flags & TD_F_REFILL_BUFFERS) {
io_u_fill_buffer(td, io_u,
io_u->xfer_buflen, io_u->xfer_buflen);
- } else if (td->flags & TD_F_SCRAMBLE_BUFFERS)
+ } else if ((td->flags & TD_F_SCRAMBLE_BUFFERS) &&
+ !(td->flags & TD_F_COMPRESS))
do_scramble = 1;
if (td->flags & TD_F_VER_NONE) {
populate_verify_io_u(td, io_u);
do_scramble = 1;
if (td->flags & TD_F_VER_NONE) {
populate_verify_io_u(td, io_u);