X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=engines%2Fbinject.c;h=44a3796c6782f30e69a3dae9b081fdebccadc7a9;hp=65894c2ef7847462c36baeeb2baf7593672e4067;hb=1ef2b6be973eded12827990ae1a9eb28b7b20be7;hpb=9e700a738f816bebb22333de97414b534c79c267 diff --git a/engines/binject.c b/engines/binject.c index 65894c2e..44a3796c 100644 --- a/engines/binject.c +++ b/engines/binject.c @@ -191,7 +191,10 @@ static int fio_binject_prep(struct thread_data *td, struct io_u *io_u) buc->type = B_TYPE_READ; } else if (io_u->ddir == DDIR_WRITE) { binject_buc_init(bd, io_u); - buc->type = B_TYPE_WRITE; + if (io_u->flags & IO_U_F_BARRIER) + buc->type = B_TYPE_WRITEBARRIER; + else + buc->type = B_TYPE_WRITE; } else if (io_u->ddir == DDIR_TRIM) { binject_buc_init(bd, io_u); buc->type = B_TYPE_DISCARD; @@ -407,7 +410,7 @@ static struct ioengine_ops ioengine = { .open_file = fio_binject_open_file, .close_file = fio_binject_close_file, .get_file_size = generic_get_file_size, - .flags = FIO_RAWIO, + .flags = FIO_RAWIO | FIO_BARRIER, }; #else /* FIO_HAVE_BINJECT */