if (f->fd == -1) {
char buf[FIO_VERROR_SIZE];
int __e = errno;
- snprintf(buf, sizeof(buf) - 1, "open(%s)", f->file_name);
+ snprintf(buf, sizeof(buf), "open(%s)", f->file_name);
td_verror(td, __e, buf);
}
ret = fallocate(f->fd, flags, io_u->offset, io_u->xfer_buflen);
- if (ret) {
+ if (ret)
io_u->error = errno;
- if (io_u->error)
- td_verror(td, io_u->error, "xfer");
- }
-
- if (io_u->file && ret == 0 && ddir_rw(io_u->ddir))
- io_u->file->file_pos = io_u->offset + ret;
return FIO_Q_COMPLETED;
}