#ifdef FIO_HAVE_SOLARISAIO
aio_result_t resultp;
#endif
+ void *mmap_data;
};
struct timeval start_time;
struct timeval issue_time;
void *buf;
unsigned long buflen;
unsigned long long offset;
- unsigned long long endpos;
/*
* IO engine state, may be different from above when we get
* filename and possible memory mapping
*/
char *file_name;
- void *mmap;
unsigned int major, minor;
+ void *mmap_ptr;
+ size_t mmap_sz;
+ off_t mmap_off;
+
/*
* size of the file, offset into file, and io size from that offset
*/
int references;
enum fio_file_flags flags;
+
+ struct disk_util *du;
};
/*
unsigned int create_fsync;
unsigned int create_on_open;
unsigned int end_fsync;
+ unsigned int pre_read;
unsigned int sync_io;
unsigned int verify;
unsigned int do_verify;
unsigned long msec;
struct timeval time;
+
+ struct fio_mutex *lock;
+ unsigned long users;
};
+static inline void disk_util_inc(struct disk_util *du)
+{
+ if (du) {
+ fio_mutex_down(du->lock);
+ du->users++;
+ fio_mutex_up(du->lock);
+ }
+}
+
+static inline void disk_util_dec(struct disk_util *du)
+{
+ if (du) {
+ fio_mutex_down(du->lock);
+ du->users--;
+ fio_mutex_up(du->lock);
+ }
+}
+
#define DISK_UTIL_MSEC (250)
/*
extern int __must_check generic_open_file(struct thread_data *, struct fio_file *);
extern int __must_check generic_close_file(struct thread_data *, struct fio_file *);
extern int __must_check generic_get_file_size(struct thread_data *, struct fio_file *);
+extern int __must_check pre_read_files(struct thread_data *);
extern int add_file(struct thread_data *, const char *);
extern void get_file(struct fio_file *);
extern int __must_check put_file(struct thread_data *, struct fio_file *);
TD_INITIALIZED,
TD_RAMP,
TD_RUNNING,
+ TD_PRE_READING,
TD_VERIFYING,
TD_FSYNCING,
TD_EXITED,