summaryrefslogtreecommitdiff
path: root/engines/sync.c
diff options
context:
space:
mode:
Diffstat (limited to 'engines/sync.c')
-rw-r--r--engines/sync.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/engines/sync.c b/engines/sync.c
index 5194f0f8..3dbce47b 100644
--- a/engines/sync.c
+++ b/engines/sync.c
@@ -75,6 +75,8 @@ static int fio_psyncio_queue(struct thread_data *td, struct io_u *io_u)
ret = pread(f->fd, io_u->xfer_buf, io_u->xfer_buflen, io_u->offset);
else if (io_u->ddir == DDIR_WRITE)
ret = pwrite(f->fd, io_u->xfer_buf, io_u->xfer_buflen, io_u->offset);
+ else if (io_u->ddir == DDIR_TRIM)
+ ret = do_io_u_trim(td, io_u);
else
ret = do_io_u_sync(td, io_u);
@@ -92,6 +94,8 @@ static int fio_syncio_queue(struct thread_data *td, struct io_u *io_u)
ret = read(f->fd, io_u->xfer_buf, io_u->xfer_buflen);
else if (io_u->ddir == DDIR_WRITE)
ret = write(f->fd, io_u->xfer_buf, io_u->xfer_buflen);
+ else if (io_u->ddir == DDIR_TRIM)
+ ret = do_io_u_trim(td, io_u);
else
ret = do_io_u_sync(td, io_u);