Jens Axboe | ebac465 | 2005-12-08 15:25:21 +0100 | [diff] [blame] | 1 | /* |
| 2 | * The io parts of the fio tool, includes workers for sync and mmap'ed |
| 3 | * io, as well as both posix and linux libaio support. |
| 4 | * |
| 5 | * sync io is implemented on top of aio. |
| 6 | * |
| 7 | * This is not really specific to fio, if the get_io_u/put_io_u and |
| 8 | * structures was pulled into this as well it would be a perfectly |
| 9 | * generic io engine that could be used for other projects. |
| 10 | * |
| 11 | */ |
| 12 | #include <stdio.h> |
| 13 | #include <stdlib.h> |
| 14 | #include <unistd.h> |
Jens Axboe | 5c4e1db | 2006-06-07 14:17:08 +0200 | [diff] [blame] | 15 | #include <string.h> |
Jens Axboe | 2866c82 | 2006-10-09 15:57:48 +0200 | [diff] [blame] | 16 | #include <dlfcn.h> |
Jens Axboe | 0c6e751 | 2007-02-22 11:19:39 +0100 | [diff] [blame] | 17 | #include <assert.h> |
Jens Axboe | 8c16d84 | 2006-10-20 11:48:33 +0200 | [diff] [blame] | 18 | |
Jens Axboe | ebac465 | 2005-12-08 15:25:21 +0100 | [diff] [blame] | 19 | #include "fio.h" |
Jens Axboe | ebac465 | 2005-12-08 15:25:21 +0100 | [diff] [blame] | 20 | |
Jens Axboe | 5f35095 | 2006-11-07 15:20:59 +0100 | [diff] [blame] | 21 | static LIST_HEAD(engine_list); |
| 22 | |
Jens Axboe | 8c16d84 | 2006-10-20 11:48:33 +0200 | [diff] [blame] | 23 | static int check_engine_ops(struct ioengine_ops *ops) |
| 24 | { |
Jens Axboe | 5f35095 | 2006-11-07 15:20:59 +0100 | [diff] [blame] | 25 | if (ops->version != FIO_IOOPS_VERSION) { |
| 26 | log_err("bad ioops version %d (want %d)\n", ops->version, FIO_IOOPS_VERSION); |
| 27 | return 1; |
| 28 | } |
| 29 | |
Jens Axboe | 36167d8 | 2007-02-18 05:41:31 +0100 | [diff] [blame] | 30 | if (!ops->queue) { |
| 31 | log_err("%s: no queue handler\n", ops->name); |
| 32 | return 1; |
| 33 | } |
| 34 | |
| 35 | /* |
| 36 | * sync engines only need a ->queue() |
| 37 | */ |
| 38 | if (ops->flags & FIO_SYNCIO) |
| 39 | return 0; |
| 40 | |
Jens Axboe | 8c16d84 | 2006-10-20 11:48:33 +0200 | [diff] [blame] | 41 | if (!ops->event) { |
Jens Axboe | 36167d8 | 2007-02-18 05:41:31 +0100 | [diff] [blame] | 42 | log_err("%s: no event handler\n", ops->name); |
Jens Axboe | 8c16d84 | 2006-10-20 11:48:33 +0200 | [diff] [blame] | 43 | return 1; |
| 44 | } |
| 45 | if (!ops->getevents) { |
Jens Axboe | 36167d8 | 2007-02-18 05:41:31 +0100 | [diff] [blame] | 46 | log_err("%s: no getevents handler\n", ops->name); |
Jens Axboe | 8c16d84 | 2006-10-20 11:48:33 +0200 | [diff] [blame] | 47 | return 1; |
| 48 | } |
| 49 | if (!ops->queue) { |
Jens Axboe | 36167d8 | 2007-02-18 05:41:31 +0100 | [diff] [blame] | 50 | log_err("%s: no queue handler\n", ops->name); |
Jens Axboe | 8c16d84 | 2006-10-20 11:48:33 +0200 | [diff] [blame] | 51 | return 1; |
| 52 | } |
| 53 | |
| 54 | return 0; |
| 55 | } |
| 56 | |
Jens Axboe | 5f35095 | 2006-11-07 15:20:59 +0100 | [diff] [blame] | 57 | void unregister_ioengine(struct ioengine_ops *ops) |
Jens Axboe | ebac465 | 2005-12-08 15:25:21 +0100 | [diff] [blame] | 58 | { |
Jens Axboe | 5f35095 | 2006-11-07 15:20:59 +0100 | [diff] [blame] | 59 | list_del(&ops->list); |
| 60 | INIT_LIST_HEAD(&ops->list); |
| 61 | } |
| 62 | |
Jens Axboe | b2fdda4 | 2007-02-20 20:52:51 +0100 | [diff] [blame] | 63 | void register_ioengine(struct ioengine_ops *ops) |
Jens Axboe | 5f35095 | 2006-11-07 15:20:59 +0100 | [diff] [blame] | 64 | { |
Jens Axboe | 5f35095 | 2006-11-07 15:20:59 +0100 | [diff] [blame] | 65 | INIT_LIST_HEAD(&ops->list); |
| 66 | list_add_tail(&ops->list, &engine_list); |
Jens Axboe | 5f35095 | 2006-11-07 15:20:59 +0100 | [diff] [blame] | 67 | } |
| 68 | |
| 69 | static struct ioengine_ops *find_ioengine(const char *name) |
| 70 | { |
| 71 | struct ioengine_ops *ops; |
| 72 | struct list_head *entry; |
Jens Axboe | 2866c82 | 2006-10-09 15:57:48 +0200 | [diff] [blame] | 73 | |
Jens Axboe | 5f35095 | 2006-11-07 15:20:59 +0100 | [diff] [blame] | 74 | list_for_each(entry, &engine_list) { |
| 75 | ops = list_entry(entry, struct ioengine_ops, list); |
Jens Axboe | bc5b77a | 2007-02-28 09:32:54 +0100 | [diff] [blame] | 76 | if (!strcmp(name, ops->name)) |
Jens Axboe | 5f35095 | 2006-11-07 15:20:59 +0100 | [diff] [blame] | 77 | return ops; |
| 78 | } |
| 79 | |
| 80 | return NULL; |
| 81 | } |
| 82 | |
| 83 | static struct ioengine_ops *dlopen_ioengine(struct thread_data *td, |
| 84 | const char *engine_lib) |
| 85 | { |
| 86 | struct ioengine_ops *ops; |
| 87 | void *dlhandle; |
| 88 | |
Jens Axboe | 2866c82 | 2006-10-09 15:57:48 +0200 | [diff] [blame] | 89 | dlerror(); |
| 90 | dlhandle = dlopen(engine_lib, RTLD_LAZY); |
Jens Axboe | d4dbaaa | 2006-10-09 16:01:27 +0200 | [diff] [blame] | 91 | if (!dlhandle) { |
Jens Axboe | e1161c3 | 2007-02-22 19:36:48 +0100 | [diff] [blame] | 92 | td_vmsg(td, -1, dlerror(), "dlopen"); |
Jens Axboe | d4dbaaa | 2006-10-09 16:01:27 +0200 | [diff] [blame] | 93 | return NULL; |
| 94 | } |
Jens Axboe | 2866c82 | 2006-10-09 15:57:48 +0200 | [diff] [blame] | 95 | |
Jens Axboe | da51c05 | 2006-11-07 16:02:11 +0100 | [diff] [blame] | 96 | /* |
| 97 | * Unlike the included modules, external engines should have a |
| 98 | * non-static ioengine structure that we can reference. |
| 99 | */ |
Jens Axboe | 2866c82 | 2006-10-09 15:57:48 +0200 | [diff] [blame] | 100 | ops = dlsym(dlhandle, "ioengine"); |
Jens Axboe | d4dbaaa | 2006-10-09 16:01:27 +0200 | [diff] [blame] | 101 | if (!ops) { |
Jens Axboe | e1161c3 | 2007-02-22 19:36:48 +0100 | [diff] [blame] | 102 | td_vmsg(td, -1, dlerror(), "dlsym"); |
Jens Axboe | d4dbaaa | 2006-10-09 16:01:27 +0200 | [diff] [blame] | 103 | dlclose(dlhandle); |
| 104 | return NULL; |
| 105 | } |
Jens Axboe | 2866c82 | 2006-10-09 15:57:48 +0200 | [diff] [blame] | 106 | |
Jens Axboe | 5f35095 | 2006-11-07 15:20:59 +0100 | [diff] [blame] | 107 | ops->dlhandle = dlhandle; |
| 108 | return ops; |
| 109 | } |
| 110 | |
| 111 | struct ioengine_ops *load_ioengine(struct thread_data *td, const char *name) |
| 112 | { |
| 113 | struct ioengine_ops *ops, *ret; |
| 114 | char engine[16]; |
| 115 | |
| 116 | strncpy(engine, name, sizeof(engine) - 1); |
| 117 | |
| 118 | /* |
| 119 | * linux libaio has alias names, so convert to what we want |
| 120 | */ |
| 121 | if (!strncmp(engine, "linuxaio", 8) || !strncmp(engine, "aio", 3)) |
| 122 | strcpy(engine, "libaio"); |
| 123 | |
| 124 | ops = find_ioengine(engine); |
| 125 | if (!ops) |
| 126 | ops = dlopen_ioengine(td, name); |
| 127 | |
| 128 | if (!ops) { |
| 129 | log_err("fio: engine %s not loadable\n", name); |
Jens Axboe | b902ceb | 2006-10-09 16:11:45 +0200 | [diff] [blame] | 130 | return NULL; |
| 131 | } |
| 132 | |
Jens Axboe | 8c16d84 | 2006-10-20 11:48:33 +0200 | [diff] [blame] | 133 | /* |
| 134 | * Check that the required methods are there. |
| 135 | */ |
Jens Axboe | 5f35095 | 2006-11-07 15:20:59 +0100 | [diff] [blame] | 136 | if (check_engine_ops(ops)) |
Jens Axboe | 8c16d84 | 2006-10-20 11:48:33 +0200 | [diff] [blame] | 137 | return NULL; |
Jens Axboe | 8c16d84 | 2006-10-20 11:48:33 +0200 | [diff] [blame] | 138 | |
Jens Axboe | 8458500 | 2006-10-19 20:26:22 +0200 | [diff] [blame] | 139 | ret = malloc(sizeof(*ret)); |
| 140 | memcpy(ret, ops, sizeof(*ret)); |
| 141 | ret->data = NULL; |
Jens Axboe | 8458500 | 2006-10-19 20:26:22 +0200 | [diff] [blame] | 142 | |
| 143 | return ret; |
Jens Axboe | ebac465 | 2005-12-08 15:25:21 +0100 | [diff] [blame] | 144 | } |
| 145 | |
Jens Axboe | 2866c82 | 2006-10-09 15:57:48 +0200 | [diff] [blame] | 146 | void close_ioengine(struct thread_data *td) |
Jens Axboe | ebac465 | 2005-12-08 15:25:21 +0100 | [diff] [blame] | 147 | { |
Jens Axboe | 2866c82 | 2006-10-09 15:57:48 +0200 | [diff] [blame] | 148 | if (td->io_ops->cleanup) |
| 149 | td->io_ops->cleanup(td); |
Jens Axboe | ebac465 | 2005-12-08 15:25:21 +0100 | [diff] [blame] | 150 | |
Jens Axboe | 5f35095 | 2006-11-07 15:20:59 +0100 | [diff] [blame] | 151 | if (td->io_ops->dlhandle) |
| 152 | dlclose(td->io_ops->dlhandle); |
| 153 | |
Jens Axboe | 8458500 | 2006-10-19 20:26:22 +0200 | [diff] [blame] | 154 | free(td->io_ops); |
| 155 | td->io_ops = NULL; |
Jens Axboe | b990b5c | 2006-09-14 09:48:22 +0200 | [diff] [blame] | 156 | } |
Jens Axboe | 10ba535 | 2006-10-20 11:39:27 +0200 | [diff] [blame] | 157 | |
| 158 | int td_io_prep(struct thread_data *td, struct io_u *io_u) |
| 159 | { |
Jens Axboe | 36167d8 | 2007-02-18 05:41:31 +0100 | [diff] [blame] | 160 | if (td->io_ops->prep) |
| 161 | return td->io_ops->prep(td, io_u); |
Jens Axboe | 10ba535 | 2006-10-20 11:39:27 +0200 | [diff] [blame] | 162 | |
| 163 | return 0; |
| 164 | } |
| 165 | |
Jens Axboe | 10ba535 | 2006-10-20 11:39:27 +0200 | [diff] [blame] | 166 | int td_io_getevents(struct thread_data *td, int min, int max, |
| 167 | struct timespec *t) |
| 168 | { |
Jens Axboe | face81b | 2007-02-26 10:40:03 +0100 | [diff] [blame] | 169 | if (min > 0 && td->io_ops->commit) { |
| 170 | int r = td->io_ops->commit(td); |
| 171 | |
| 172 | if (r < 0) |
| 173 | return r; |
| 174 | } |
Jens Axboe | 36167d8 | 2007-02-18 05:41:31 +0100 | [diff] [blame] | 175 | if (td->io_ops->getevents) |
| 176 | return td->io_ops->getevents(td, min, max, t); |
| 177 | |
| 178 | return 0; |
Jens Axboe | 10ba535 | 2006-10-20 11:39:27 +0200 | [diff] [blame] | 179 | } |
| 180 | |
| 181 | int td_io_queue(struct thread_data *td, struct io_u *io_u) |
| 182 | { |
Jens Axboe | 7e77dd0 | 2007-02-20 10:57:34 +0100 | [diff] [blame] | 183 | int ret; |
| 184 | |
Jens Axboe | 0c6e751 | 2007-02-22 11:19:39 +0100 | [diff] [blame] | 185 | assert((io_u->flags & IO_U_F_FLIGHT) == 0); |
| 186 | io_u->flags |= IO_U_F_FLIGHT; |
| 187 | |
Jens Axboe | 3d7b485 | 2007-03-13 14:50:28 +0100 | [diff] [blame] | 188 | assert(io_u->file->flags & FIO_FILE_OPEN); |
| 189 | |
Jens Axboe | 1178680 | 2007-03-05 18:33:22 +0100 | [diff] [blame] | 190 | io_u->error = 0; |
| 191 | io_u->resid = 0; |
| 192 | |
Jens Axboe | 433afcb | 2007-02-22 10:39:01 +0100 | [diff] [blame] | 193 | if (td->io_ops->flags & FIO_SYNCIO) { |
Jens Axboe | 5aeb77d | 2007-02-20 11:34:54 +0100 | [diff] [blame] | 194 | fio_gettime(&io_u->issue_time, NULL); |
Jens Axboe | a61edde | 2007-05-15 14:29:58 +0200 | [diff] [blame] | 195 | memcpy(&td->last_issue, &io_u->issue_time, sizeof(struct timeval)); |
Jens Axboe | 10ba535 | 2006-10-20 11:39:27 +0200 | [diff] [blame] | 196 | |
Jens Axboe | 433afcb | 2007-02-22 10:39:01 +0100 | [diff] [blame] | 197 | /* |
| 198 | * for a sync engine, set the timeout upfront |
| 199 | */ |
| 200 | if (mtime_since(&td->timeout_end, &io_u->issue_time) < IO_U_TIMEOUT) |
| 201 | io_u_set_timeout(td); |
| 202 | } |
| 203 | |
Jens Axboe | 755200a | 2007-02-19 13:08:12 +0100 | [diff] [blame] | 204 | if (io_u->ddir != DDIR_SYNC) |
| 205 | td->io_issues[io_u->ddir]++; |
| 206 | |
Jens Axboe | b360506 | 2007-03-12 14:19:47 +0100 | [diff] [blame] | 207 | io_u_mark_depth(td, io_u); |
| 208 | |
Jens Axboe | 7e77dd0 | 2007-02-20 10:57:34 +0100 | [diff] [blame] | 209 | ret = td->io_ops->queue(td, io_u); |
Jens Axboe | 5aeb77d | 2007-02-20 11:34:54 +0100 | [diff] [blame] | 210 | |
Jens Axboe | eb7c8ae | 2007-02-26 14:45:12 +0100 | [diff] [blame] | 211 | if (ret == FIO_Q_QUEUED) { |
| 212 | int r; |
| 213 | |
Jens Axboe | cb5ab51 | 2007-02-26 12:57:09 +0100 | [diff] [blame] | 214 | td->io_u_queued++; |
Jens Axboe | 2dc1bbe | 2007-03-15 15:01:33 +0100 | [diff] [blame] | 215 | if (td->io_u_queued > td->o.iodepth_batch) { |
Jens Axboe | eb7c8ae | 2007-02-26 14:45:12 +0100 | [diff] [blame] | 216 | r = td_io_commit(td); |
| 217 | if (r < 0) |
| 218 | return r; |
| 219 | } |
| 220 | } |
Jens Axboe | cb5ab51 | 2007-02-26 12:57:09 +0100 | [diff] [blame] | 221 | |
Jens Axboe | 433afcb | 2007-02-22 10:39:01 +0100 | [diff] [blame] | 222 | if ((td->io_ops->flags & FIO_SYNCIO) == 0) { |
Jens Axboe | 5aeb77d | 2007-02-20 11:34:54 +0100 | [diff] [blame] | 223 | fio_gettime(&io_u->issue_time, NULL); |
Jens Axboe | a61edde | 2007-05-15 14:29:58 +0200 | [diff] [blame] | 224 | memcpy(&td->last_issue, &io_u->issue_time, sizeof(struct timeval)); |
Jens Axboe | 5aeb77d | 2007-02-20 11:34:54 +0100 | [diff] [blame] | 225 | |
Jens Axboe | 433afcb | 2007-02-22 10:39:01 +0100 | [diff] [blame] | 226 | /* |
| 227 | * async engine, set the timeout here |
| 228 | */ |
| 229 | if (ret == FIO_Q_QUEUED && |
| 230 | mtime_since(&td->timeout_end, &io_u->issue_time) < IO_U_TIMEOUT) |
| 231 | io_u_set_timeout(td); |
| 232 | } |
| 233 | |
Jens Axboe | 7e77dd0 | 2007-02-20 10:57:34 +0100 | [diff] [blame] | 234 | return ret; |
Jens Axboe | 10ba535 | 2006-10-20 11:39:27 +0200 | [diff] [blame] | 235 | } |
Jens Axboe | 8c16d84 | 2006-10-20 11:48:33 +0200 | [diff] [blame] | 236 | |
| 237 | int td_io_init(struct thread_data *td) |
| 238 | { |
Jens Axboe | eeb1216 | 2007-03-20 10:47:45 +0100 | [diff] [blame] | 239 | int ret = 0; |
Jens Axboe | 8c16d84 | 2006-10-20 11:48:33 +0200 | [diff] [blame] | 240 | |
Jens Axboe | eeb1216 | 2007-03-20 10:47:45 +0100 | [diff] [blame] | 241 | if (td->io_ops->init) { |
| 242 | ret = td->io_ops->init(td); |
| 243 | if (ret && td->o.iodepth > 1) |
| 244 | log_err("fio: io engine init failed. Perhaps try reducing io dpeth?\n"); |
| 245 | } |
| 246 | |
| 247 | return ret; |
Jens Axboe | 8c16d84 | 2006-10-20 11:48:33 +0200 | [diff] [blame] | 248 | } |
Jens Axboe | 755200a | 2007-02-19 13:08:12 +0100 | [diff] [blame] | 249 | |
| 250 | int td_io_commit(struct thread_data *td) |
| 251 | { |
Jens Axboe | e1161c3 | 2007-02-22 19:36:48 +0100 | [diff] [blame] | 252 | if (!td->cur_depth) |
| 253 | return 0; |
Jens Axboe | cb5ab51 | 2007-02-26 12:57:09 +0100 | [diff] [blame] | 254 | |
| 255 | td->io_u_queued = 0; |
Jens Axboe | 755200a | 2007-02-19 13:08:12 +0100 | [diff] [blame] | 256 | if (td->io_ops->commit) |
| 257 | return td->io_ops->commit(td); |
| 258 | |
| 259 | return 0; |
| 260 | } |
Jens Axboe | b5af829 | 2007-03-08 12:43:13 +0100 | [diff] [blame] | 261 | |
| 262 | int td_io_open_file(struct thread_data *td, struct fio_file *f) |
| 263 | { |
Jens Axboe | 413d669 | 2007-03-27 15:38:21 +0200 | [diff] [blame] | 264 | if (td->io_ops->open_file(td, f)) { |
| 265 | if (td->error == EINVAL && td->o.odirect) |
| 266 | log_err("fio: destination does not support O_DIRECT\n"); |
| 267 | if (td->error == EMFILE) |
| 268 | log_err("fio: try reducing/setting openfiles (failed at %u of %u)\n", td->nr_open_files, td->o.nr_files); |
Jens Axboe | b5af829 | 2007-03-08 12:43:13 +0100 | [diff] [blame] | 269 | |
Jens Axboe | 413d669 | 2007-03-27 15:38:21 +0200 | [diff] [blame] | 270 | return 1; |
Jens Axboe | 7bb48f8 | 2007-03-27 15:30:28 +0200 | [diff] [blame] | 271 | } |
Jens Axboe | a978ba6 | 2007-03-08 14:29:03 +0100 | [diff] [blame] | 272 | |
Jens Axboe | 6615982 | 2007-04-16 21:54:24 +0200 | [diff] [blame] | 273 | if (f->filetype == FIO_TYPE_PIPE) { |
| 274 | if (td_random(td)) { |
| 275 | log_err("fio: can't seek on pipes (no random io)\n"); |
| 276 | goto err; |
| 277 | } |
| 278 | } |
| 279 | |
Jens Axboe | 413d669 | 2007-03-27 15:38:21 +0200 | [diff] [blame] | 280 | f->last_free_lookup = 0; |
| 281 | f->last_completed_pos = 0; |
| 282 | f->last_pos = 0; |
| 283 | f->flags |= FIO_FILE_OPEN; |
| 284 | f->flags &= ~FIO_FILE_CLOSING; |
Jens Axboe | 7bb48f8 | 2007-03-27 15:30:28 +0200 | [diff] [blame] | 285 | |
Jens Axboe | 413d669 | 2007-03-27 15:38:21 +0200 | [diff] [blame] | 286 | if (td->io_ops->flags & FIO_DISKLESSIO) |
| 287 | goto done; |
| 288 | |
| 289 | if (td->o.invalidate_cache && file_invalidate_cache(td, f)) |
| 290 | goto err; |
| 291 | |
Jens Axboe | 6615982 | 2007-04-16 21:54:24 +0200 | [diff] [blame] | 292 | if (td->o.fadvise_hint && |
| 293 | (f->filetype == FIO_TYPE_BD || f->filetype == FIO_TYPE_FILE)) { |
| 294 | |
Jens Axboe | 413d669 | 2007-03-27 15:38:21 +0200 | [diff] [blame] | 295 | int flags; |
| 296 | |
| 297 | if (td_random(td)) |
| 298 | flags = POSIX_FADV_RANDOM; |
| 299 | else |
| 300 | flags = POSIX_FADV_SEQUENTIAL; |
| 301 | |
| 302 | if (fadvise(f->fd, f->file_offset, f->io_size, flags) < 0) { |
| 303 | td_verror(td, errno, "fadvise"); |
| 304 | goto err; |
| 305 | } |
| 306 | } |
| 307 | |
| 308 | if (f->file_map) |
| 309 | memset(f->file_map, 0, f->num_maps * sizeof(long)); |
| 310 | |
| 311 | done: |
Jens Axboe | f29b25a | 2007-07-23 08:56:43 +0200 | [diff] [blame] | 312 | log_file(td, f, FIO_LOG_OPEN_FILE); |
Jens Axboe | 413d669 | 2007-03-27 15:38:21 +0200 | [diff] [blame] | 313 | td->nr_open_files++; |
| 314 | get_file(f); |
| 315 | return 0; |
| 316 | err: |
Jens Axboe | b284075 | 2007-04-12 12:57:27 +0200 | [diff] [blame] | 317 | if (td->io_ops->close_file) |
| 318 | td->io_ops->close_file(td, f); |
Jens Axboe | 7bb48f8 | 2007-03-27 15:30:28 +0200 | [diff] [blame] | 319 | return 1; |
Jens Axboe | b5af829 | 2007-03-08 12:43:13 +0100 | [diff] [blame] | 320 | } |
| 321 | |
| 322 | void td_io_close_file(struct thread_data *td, struct fio_file *f) |
| 323 | { |
Jens Axboe | f29b25a | 2007-07-23 08:56:43 +0200 | [diff] [blame] | 324 | if (!(f->flags & FIO_FILE_CLOSING)) |
| 325 | log_file(td, f, FIO_LOG_CLOSE_FILE); |
| 326 | |
Jens Axboe | 0ad920e | 2007-03-13 11:06:45 +0100 | [diff] [blame] | 327 | /* |
| 328 | * mark as closing, do real close when last io on it has completed |
| 329 | */ |
| 330 | f->flags |= FIO_FILE_CLOSING; |
| 331 | |
| 332 | put_file(td, f); |
Jens Axboe | b5af829 | 2007-03-08 12:43:13 +0100 | [diff] [blame] | 333 | } |