X-Git-Url: https://git.kernel.dk/?a=blobdiff_plain;f=os%2Fos-linux.h;h=1ad6ebd28497e3257e52c58353881357b0c90f8e;hb=978536ff1750c986fbb624e1bb23df92cd5530af;hp=e7d600dd58cbb3f6ffd1e43f5516fdd6fc0bd18a;hpb=2c3e17be4c7c9a737317ada414b98929652fec15;p=fio.git diff --git a/os/os-linux.h b/os/os-linux.h index e7d600dd..1ad6ebd2 100644 --- a/os/os-linux.h +++ b/os/os-linux.h @@ -281,7 +281,7 @@ static inline unsigned long long get_fs_free_size(const char *path) return ret; } -static inline int os_trim(int fd, unsigned long long start, +static inline int os_trim(struct fio_file *f, unsigned long long start, unsigned long long len) { uint64_t range[2]; @@ -289,7 +289,7 @@ static inline int os_trim(int fd, unsigned long long start, range[0] = start; range[1] = len; - if (!ioctl(fd, BLKDISCARD, range)) + if (!ioctl(f->fd, BLKDISCARD, range)) return 0; return errno;