fallocate: use 'offset' parameter
authorJens Axboe <axboe@kernel.dk>
Tue, 5 Jun 2018 19:15:27 +0000 (13:15 -0600)
committerJens Axboe <axboe@kernel.dk>
Tue, 5 Jun 2018 19:15:27 +0000 (13:15 -0600)
Signed-off-by: Jens Axboe <axboe@kernel.dk>
os/os-linux.h

index a550bba6e1b3d785d554564258840874c93e8104..6b63d123956afa6f28f20b3e7ff32e583f652e99 100644 (file)
@@ -403,7 +403,7 @@ static inline bool fio_fallocate(struct fio_file *f, uint64_t offset,
                                 uint64_t len)
 {
        int ret;
-       ret = fallocate(f->fd, 0, 0, len);
+       ret = fallocate(f->fd, 0, offset, len);
        if (ret == 0)
                return true;