ret = fsync(io_u->file->fd);
if (ret != (int) io_u->xfer_buflen) {
- if (ret > 0) {
+ if (ret >= 0) {
io_u->resid = io_u->xfer_buflen - ret;
io_u->error = 0;
return FIO_Q_COMPLETED;
}
if (io_u->error)
- td_verror(td, io_u->error);
+ td_verror(td, io_u->error, "xfer");
return FIO_Q_COMPLETED;
}
struct spliceio_data *sd = malloc(sizeof(*sd));
if (pipe(sd->pipe) < 0) {
- td_verror(td, errno);
+ td_verror(td, errno, "pipe");
free(sd);
return 1;
}
.init = fio_spliceio_init,
.queue = fio_spliceio_queue,
.cleanup = fio_spliceio_cleanup,
+ .open_file = generic_open_file,
+ .close_file = generic_close_file,
.flags = FIO_SYNCIO,
};