Lines Matching refs:f
147 struct file *f; in init_io() local
156 f = &s->files[0]; in init_io()
158 f = &s->files[s->cur_file]; in init_io()
159 if (f->pending_ios >= file_depth(s)) { in init_io()
163 f = &s->files[s->cur_file]; in init_io()
166 f->pending_ios++; in init_io()
169 offset = (r % (f->max_blocks - 1)) * BS; in init_io()
173 sqe->fd = f->fixed_fd; in init_io()
176 sqe->fd = f->real_fd; in init_io()
191 sqe->user_data = (unsigned long) f; in init_io()
222 static int get_file_size(struct file *f) in get_file_size() argument
226 if (fstat(f->real_fd, &st) < 0) in get_file_size()
231 if (ioctl(f->real_fd, BLKGETSIZE64, &bytes) != 0) in get_file_size()
234 f->max_blocks = bytes / BS; in get_file_size()
237 f->max_blocks = st.st_size / BS; in get_file_size()
252 struct file *f; in reap_events() local
259 f = (struct file *) (uintptr_t) cqe->user_data; in reap_events()
260 f->pending_ios--; in reap_events()
471 struct file *f = &s->files[i]; in file_depths() local
474 p += sprintf(p, "%d", f->pending_ios); in file_depths()
476 p += sprintf(p, "%d, ", f->pending_ios); in file_depths()
499 struct file *f; in main() local
511 f = &s->files[s->nr_files]; in main()
512 f->real_fd = fd; in main()
513 if (get_file_size(f)) { in main()
517 if (f->max_blocks <= 1) { in main()
521 f->max_blocks--; in main()