Don't add the file offset twice for trim
authorJens Axboe <jaxboe@fusionio.com>
Fri, 24 Sep 2010 17:36:34 +0000 (19:36 +0200)
committerJens Axboe <jaxboe@fusionio.com>
Fri, 24 Sep 2010 17:36:34 +0000 (19:36 +0200)
We added it when storing the io_piece, don't add it again
when calling trim.

Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
ioengines.c

index 7df0abac0bf9a427fbb8273ddf6f151797c8fead..e0b0f22e96d994b74f00153dd64509dd7b2a930d 100644 (file)
@@ -489,7 +489,7 @@ int do_io_u_trim(struct thread_data *td, struct io_u *io_u)
        struct fio_file *f = io_u->file;
        int ret;
 
        struct fio_file *f = io_u->file;
        int ret;
 
-       ret = os_trim(f->fd, io_u->offset + f->file_offset, io_u->xfer_buflen);
+       ret = os_trim(f->fd, io_u->offset, io_u->xfer_buflen);
        if (!ret)
                return io_u->xfer_buflen;;
 
        if (!ret)
                return io_u->xfer_buflen;;