change os_trim() prototype not to use int fd
[fio.git] / os / os-linux.h
index e7d600dd58cbb3f6ffd1e43f5516fdd6fc0bd18a..1ad6ebd28497e3257e52c58353881357b0c90f8e 100644 (file)
@@ -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;