{
struct fio_file *f = io_u->file;
if (f->filetype == FIO_TYPE_BD)
return fio_sgio_ioctl_doio(td, f, io_u);
{
struct fio_file *f = io_u->file;
if (f->filetype == FIO_TYPE_BD)
return fio_sgio_ioctl_doio(td, f, io_u);
static int fio_sgio_queue(struct thread_data *td, struct io_u *io_u)
{
struct sg_io_hdr *hdr = &io_u->hdr;
static int fio_sgio_queue(struct thread_data *td, struct io_u *io_u)
{
struct sg_io_hdr *hdr = &io_u->hdr;
- ret = fio_sgio_doio(td, io_u, io_u->ddir == DDIR_SYNC);
+ if (td->o.sync_io || td->o.odirect || ddir_sync(io_u->ddir))
+ do_sync = 1;
+
+ ret = fio_sgio_doio(td, io_u, do_sync);
static int fio_sgio_get_bs(struct thread_data *td, unsigned int *bs)
{
struct sgio_data *sd = td->io_ops->data;
static int fio_sgio_get_bs(struct thread_data *td, unsigned int *bs)
{
struct sgio_data *sd = td->io_ops->data;
- hdr = &io_u->hdr;
- sgio_hdr_init(sd, hdr, io_u, 0);
+ hdr = &io_u.hdr;
+ sgio_hdr_init(sd, hdr, &io_u, 0);
.cleanup = fio_sgio_cleanup,
.open_file = fio_sgio_open,
.close_file = generic_close_file,
.cleanup = fio_sgio_cleanup,
.open_file = fio_sgio_open,
.close_file = generic_close_file,