Jens Axboe | 214e1ec | 2007-03-15 10:48:13 +0100 | [diff] [blame] | 1 | #include <stdio.h> |
| 2 | #include <stdlib.h> |
| 3 | #include <unistd.h> |
| 4 | #include <ctype.h> |
| 5 | #include <string.h> |
| 6 | #include <getopt.h> |
| 7 | #include <assert.h> |
Jens Axboe | 921c766 | 2008-03-26 09:17:55 +0100 | [diff] [blame^] | 8 | #include <libgen.h> |
Jens Axboe | 214e1ec | 2007-03-15 10:48:13 +0100 | [diff] [blame] | 9 | |
| 10 | #include "fio.h" |
| 11 | #include "parse.h" |
Jens Axboe | 90059d6 | 2007-07-30 09:33:12 +0200 | [diff] [blame] | 12 | #include "fls.h" |
Jens Axboe | 214e1ec | 2007-03-15 10:48:13 +0100 | [diff] [blame] | 13 | |
Jens Axboe | 2dc1bbe | 2007-03-15 15:01:33 +0100 | [diff] [blame] | 14 | #define td_var_offset(var) ((size_t) &((struct thread_options *)0)->var) |
Jens Axboe | 214e1ec | 2007-03-15 10:48:13 +0100 | [diff] [blame] | 15 | |
| 16 | /* |
| 17 | * Check if mmap/mmaphuge has a :/foo/bar/file at the end. If so, return that. |
| 18 | */ |
| 19 | static char *get_opt_postfix(const char *str) |
| 20 | { |
| 21 | char *p = strstr(str, ":"); |
| 22 | |
| 23 | if (!p) |
| 24 | return NULL; |
| 25 | |
| 26 | p++; |
| 27 | strip_blank_front(&p); |
| 28 | strip_blank_end(p); |
| 29 | return strdup(p); |
| 30 | } |
| 31 | |
Jens Axboe | 564ca97 | 2007-12-14 12:21:19 +0100 | [diff] [blame] | 32 | static int bs_cmp(const void *p1, const void *p2) |
| 33 | { |
| 34 | const struct bssplit *bsp1 = p1; |
| 35 | const struct bssplit *bsp2 = p2; |
| 36 | |
| 37 | return bsp1->perc < bsp2->perc; |
| 38 | } |
| 39 | |
| 40 | static int str_bssplit_cb(void *data, const char *input) |
| 41 | { |
| 42 | struct thread_data *td = data; |
| 43 | char *fname, *str, *p; |
| 44 | unsigned int i, perc, perc_missing; |
| 45 | unsigned int max_bs, min_bs; |
| 46 | long long val; |
| 47 | |
| 48 | p = str = strdup(input); |
| 49 | |
| 50 | strip_blank_front(&str); |
| 51 | strip_blank_end(str); |
| 52 | |
| 53 | td->o.bssplit_nr = 4; |
| 54 | td->o.bssplit = malloc(4 * sizeof(struct bssplit)); |
| 55 | |
| 56 | i = 0; |
| 57 | max_bs = 0; |
| 58 | min_bs = -1; |
| 59 | while ((fname = strsep(&str, ":")) != NULL) { |
| 60 | char *perc_str; |
| 61 | |
| 62 | if (!strlen(fname)) |
| 63 | break; |
| 64 | |
| 65 | /* |
| 66 | * grow struct buffer, if needed |
| 67 | */ |
| 68 | if (i == td->o.bssplit_nr) { |
| 69 | td->o.bssplit_nr <<= 1; |
Jens Axboe | 5ec10ea | 2008-03-06 15:42:00 +0100 | [diff] [blame] | 70 | td->o.bssplit = realloc(td->o.bssplit, |
| 71 | td->o.bssplit_nr |
| 72 | * sizeof(struct bssplit)); |
Jens Axboe | 564ca97 | 2007-12-14 12:21:19 +0100 | [diff] [blame] | 73 | } |
| 74 | |
| 75 | perc_str = strstr(fname, "/"); |
| 76 | if (perc_str) { |
| 77 | *perc_str = '\0'; |
| 78 | perc_str++; |
| 79 | perc = atoi(perc_str); |
| 80 | if (perc > 100) |
| 81 | perc = 100; |
| 82 | else if (!perc) |
| 83 | perc = -1; |
| 84 | } else |
| 85 | perc = -1; |
| 86 | |
| 87 | if (str_to_decimal(fname, &val, 1)) { |
| 88 | log_err("fio: bssplit conversion failed\n"); |
| 89 | free(td->o.bssplit); |
| 90 | return 1; |
| 91 | } |
| 92 | |
| 93 | if (val > max_bs) |
| 94 | max_bs = val; |
| 95 | if (val < min_bs) |
| 96 | min_bs = val; |
| 97 | |
| 98 | td->o.bssplit[i].bs = val; |
| 99 | td->o.bssplit[i].perc = perc; |
| 100 | i++; |
| 101 | } |
| 102 | |
| 103 | td->o.bssplit_nr = i; |
| 104 | |
| 105 | /* |
| 106 | * Now check if the percentages add up, and how much is missing |
| 107 | */ |
| 108 | perc = perc_missing = 0; |
| 109 | for (i = 0; i < td->o.bssplit_nr; i++) { |
| 110 | struct bssplit *bsp = &td->o.bssplit[i]; |
| 111 | |
| 112 | if (bsp->perc == (unsigned char) -1) |
| 113 | perc_missing++; |
| 114 | else |
| 115 | perc += bsp->perc; |
| 116 | } |
| 117 | |
| 118 | if (perc > 100) { |
| 119 | log_err("fio: bssplit percentages add to more than 100%%\n"); |
| 120 | free(td->o.bssplit); |
| 121 | return 1; |
| 122 | } |
| 123 | /* |
| 124 | * If values didn't have a percentage set, divide the remains between |
| 125 | * them. |
| 126 | */ |
| 127 | if (perc_missing) { |
| 128 | for (i = 0; i < td->o.bssplit_nr; i++) { |
| 129 | struct bssplit *bsp = &td->o.bssplit[i]; |
| 130 | |
| 131 | if (bsp->perc == (unsigned char) -1) |
| 132 | bsp->perc = (100 - perc) / perc_missing; |
| 133 | } |
| 134 | } |
| 135 | |
| 136 | td->o.min_bs[DDIR_READ] = td->o.min_bs[DDIR_WRITE] = min_bs; |
| 137 | td->o.max_bs[DDIR_READ] = td->o.max_bs[DDIR_WRITE] = max_bs; |
| 138 | |
| 139 | /* |
| 140 | * now sort based on percentages, for ease of lookup |
| 141 | */ |
| 142 | qsort(td->o.bssplit, td->o.bssplit_nr, sizeof(struct bssplit), bs_cmp); |
| 143 | |
| 144 | free(p); |
| 145 | return 0; |
| 146 | } |
| 147 | |
Jens Axboe | 211097b | 2007-03-22 18:56:45 +0100 | [diff] [blame] | 148 | static int str_rw_cb(void *data, const char *str) |
| 149 | { |
| 150 | struct thread_data *td = data; |
| 151 | char *nr = get_opt_postfix(str); |
| 152 | |
Jens Axboe | fafdba3 | 2007-03-26 10:09:12 +0200 | [diff] [blame] | 153 | td->o.ddir_nr = 1; |
Jens Axboe | 211097b | 2007-03-22 18:56:45 +0100 | [diff] [blame] | 154 | if (nr) |
| 155 | td->o.ddir_nr = atoi(nr); |
| 156 | |
Jens Axboe | 211097b | 2007-03-22 18:56:45 +0100 | [diff] [blame] | 157 | return 0; |
| 158 | } |
| 159 | |
Jens Axboe | 214e1ec | 2007-03-15 10:48:13 +0100 | [diff] [blame] | 160 | static int str_mem_cb(void *data, const char *mem) |
| 161 | { |
| 162 | struct thread_data *td = data; |
| 163 | |
Jens Axboe | 2dc1bbe | 2007-03-15 15:01:33 +0100 | [diff] [blame] | 164 | if (td->o.mem_type == MEM_MMAPHUGE || td->o.mem_type == MEM_MMAP) { |
Jens Axboe | 214e1ec | 2007-03-15 10:48:13 +0100 | [diff] [blame] | 165 | td->mmapfile = get_opt_postfix(mem); |
Jens Axboe | 2dc1bbe | 2007-03-15 15:01:33 +0100 | [diff] [blame] | 166 | if (td->o.mem_type == MEM_MMAPHUGE && !td->mmapfile) { |
Jens Axboe | 214e1ec | 2007-03-15 10:48:13 +0100 | [diff] [blame] | 167 | log_err("fio: mmaphuge:/path/to/file\n"); |
| 168 | return 1; |
| 169 | } |
| 170 | } |
| 171 | |
| 172 | return 0; |
| 173 | } |
| 174 | |
| 175 | static int str_lockmem_cb(void fio_unused *data, unsigned long *val) |
| 176 | { |
| 177 | mlock_size = *val; |
| 178 | return 0; |
| 179 | } |
| 180 | |
| 181 | #ifdef FIO_HAVE_IOPRIO |
| 182 | static int str_prioclass_cb(void *data, unsigned int *val) |
| 183 | { |
| 184 | struct thread_data *td = data; |
Jens Axboe | 6cefbe3 | 2007-04-18 12:46:56 +0200 | [diff] [blame] | 185 | unsigned short mask; |
| 186 | |
| 187 | /* |
| 188 | * mask off old class bits, str_prio_cb() may have set a default class |
| 189 | */ |
| 190 | mask = (1 << IOPRIO_CLASS_SHIFT) - 1; |
| 191 | td->ioprio &= mask; |
Jens Axboe | 214e1ec | 2007-03-15 10:48:13 +0100 | [diff] [blame] | 192 | |
| 193 | td->ioprio |= *val << IOPRIO_CLASS_SHIFT; |
Jens Axboe | ac68478 | 2007-11-08 08:29:07 +0100 | [diff] [blame] | 194 | td->ioprio_set = 1; |
Jens Axboe | 214e1ec | 2007-03-15 10:48:13 +0100 | [diff] [blame] | 195 | return 0; |
| 196 | } |
| 197 | |
| 198 | static int str_prio_cb(void *data, unsigned int *val) |
| 199 | { |
| 200 | struct thread_data *td = data; |
| 201 | |
| 202 | td->ioprio |= *val; |
Jens Axboe | 6cefbe3 | 2007-04-18 12:46:56 +0200 | [diff] [blame] | 203 | |
| 204 | /* |
| 205 | * If no class is set, assume BE |
| 206 | */ |
| 207 | if ((td->ioprio >> IOPRIO_CLASS_SHIFT) == 0) |
| 208 | td->ioprio |= IOPRIO_CLASS_BE << IOPRIO_CLASS_SHIFT; |
| 209 | |
Jens Axboe | ac68478 | 2007-11-08 08:29:07 +0100 | [diff] [blame] | 210 | td->ioprio_set = 1; |
Jens Axboe | 214e1ec | 2007-03-15 10:48:13 +0100 | [diff] [blame] | 211 | return 0; |
| 212 | } |
| 213 | #endif |
| 214 | |
| 215 | static int str_exitall_cb(void) |
| 216 | { |
| 217 | exitall_on_terminate = 1; |
| 218 | return 0; |
| 219 | } |
| 220 | |
Jens Axboe | 214e1ec | 2007-03-15 10:48:13 +0100 | [diff] [blame] | 221 | #ifdef FIO_HAVE_CPU_AFFINITY |
Jens Axboe | 214e1ec | 2007-03-15 10:48:13 +0100 | [diff] [blame] | 222 | static int str_cpumask_cb(void *data, unsigned int *val) |
| 223 | { |
| 224 | struct thread_data *td = data; |
Jens Axboe | d2e268b | 2007-06-15 10:33:49 +0200 | [diff] [blame] | 225 | unsigned int i; |
Jens Axboe | 214e1ec | 2007-03-15 10:48:13 +0100 | [diff] [blame] | 226 | |
Jens Axboe | d2e268b | 2007-06-15 10:33:49 +0200 | [diff] [blame] | 227 | CPU_ZERO(&td->o.cpumask); |
| 228 | |
| 229 | for (i = 0; i < sizeof(int) * 8; i++) |
| 230 | if ((1 << i) & *val) |
| 231 | CPU_SET(*val, &td->o.cpumask); |
| 232 | |
Jens Axboe | 375b269 | 2007-05-22 09:13:02 +0200 | [diff] [blame] | 233 | td->o.cpumask_set = 1; |
Jens Axboe | 214e1ec | 2007-03-15 10:48:13 +0100 | [diff] [blame] | 234 | return 0; |
| 235 | } |
| 236 | |
Jens Axboe | d2e268b | 2007-06-15 10:33:49 +0200 | [diff] [blame] | 237 | static int str_cpus_allowed_cb(void *data, const char *input) |
| 238 | { |
| 239 | struct thread_data *td = data; |
| 240 | char *cpu, *str, *p; |
| 241 | |
| 242 | CPU_ZERO(&td->o.cpumask); |
| 243 | |
| 244 | p = str = strdup(input); |
| 245 | |
| 246 | strip_blank_front(&str); |
| 247 | strip_blank_end(str); |
| 248 | |
| 249 | while ((cpu = strsep(&str, ",")) != NULL) { |
| 250 | if (!strlen(cpu)) |
| 251 | break; |
| 252 | CPU_SET(atoi(cpu), &td->o.cpumask); |
| 253 | } |
| 254 | |
| 255 | free(p); |
| 256 | td->o.cpumask_set = 1; |
Jens Axboe | d2e268b | 2007-06-15 10:33:49 +0200 | [diff] [blame] | 257 | return 0; |
| 258 | } |
| 259 | #endif |
| 260 | |
Jens Axboe | 214e1ec | 2007-03-15 10:48:13 +0100 | [diff] [blame] | 261 | static int str_fst_cb(void *data, const char *str) |
| 262 | { |
| 263 | struct thread_data *td = data; |
| 264 | char *nr = get_opt_postfix(str); |
| 265 | |
| 266 | td->file_service_nr = 1; |
| 267 | if (nr) |
| 268 | td->file_service_nr = atoi(nr); |
| 269 | |
| 270 | return 0; |
| 271 | } |
| 272 | |
Jens Axboe | 921c766 | 2008-03-26 09:17:55 +0100 | [diff] [blame^] | 273 | static int check_dir(struct thread_data *td, char *fname) |
| 274 | { |
| 275 | char file[PATH_MAX], *dir; |
| 276 | struct stat sb; |
| 277 | |
| 278 | strcpy(file, fname); |
| 279 | dir = dirname(file); |
| 280 | |
| 281 | if (lstat(dir, &sb) < 0) { |
| 282 | int ret = errno; |
| 283 | |
| 284 | log_err("fio: %s is not a directory\n", dir); |
| 285 | td_verror(td, ret, "lstat"); |
| 286 | return 1; |
| 287 | } |
| 288 | |
| 289 | if (!S_ISDIR(sb.st_mode)) { |
| 290 | log_err("fio: %s is not a directory\n", dir); |
| 291 | return 1; |
| 292 | } |
| 293 | |
| 294 | return 0; |
| 295 | } |
| 296 | |
Jens Axboe | 214e1ec | 2007-03-15 10:48:13 +0100 | [diff] [blame] | 297 | static int str_filename_cb(void *data, const char *input) |
| 298 | { |
| 299 | struct thread_data *td = data; |
| 300 | char *fname, *str, *p; |
| 301 | |
| 302 | p = str = strdup(input); |
| 303 | |
| 304 | strip_blank_front(&str); |
| 305 | strip_blank_end(str); |
| 306 | |
| 307 | if (!td->files_index) |
Jens Axboe | 2dc1bbe | 2007-03-15 15:01:33 +0100 | [diff] [blame] | 308 | td->o.nr_files = 0; |
Jens Axboe | 214e1ec | 2007-03-15 10:48:13 +0100 | [diff] [blame] | 309 | |
| 310 | while ((fname = strsep(&str, ":")) != NULL) { |
| 311 | if (!strlen(fname)) |
| 312 | break; |
Jens Axboe | 921c766 | 2008-03-26 09:17:55 +0100 | [diff] [blame^] | 313 | if (check_dir(td, fname)) { |
| 314 | free(p); |
| 315 | return 1; |
| 316 | } |
Jens Axboe | 214e1ec | 2007-03-15 10:48:13 +0100 | [diff] [blame] | 317 | add_file(td, fname); |
Jens Axboe | 2dc1bbe | 2007-03-15 15:01:33 +0100 | [diff] [blame] | 318 | td->o.nr_files++; |
Jens Axboe | 214e1ec | 2007-03-15 10:48:13 +0100 | [diff] [blame] | 319 | } |
| 320 | |
| 321 | free(p); |
| 322 | return 0; |
| 323 | } |
| 324 | |
| 325 | static int str_directory_cb(void *data, const char fio_unused *str) |
| 326 | { |
| 327 | struct thread_data *td = data; |
| 328 | struct stat sb; |
| 329 | |
Jens Axboe | 2dc1bbe | 2007-03-15 15:01:33 +0100 | [diff] [blame] | 330 | if (lstat(td->o.directory, &sb) < 0) { |
Jens Axboe | 921c766 | 2008-03-26 09:17:55 +0100 | [diff] [blame^] | 331 | int ret = errno; |
| 332 | |
Jens Axboe | 2dc1bbe | 2007-03-15 15:01:33 +0100 | [diff] [blame] | 333 | log_err("fio: %s is not a directory\n", td->o.directory); |
Jens Axboe | 921c766 | 2008-03-26 09:17:55 +0100 | [diff] [blame^] | 334 | td_verror(td, ret, "lstat"); |
Jens Axboe | 214e1ec | 2007-03-15 10:48:13 +0100 | [diff] [blame] | 335 | return 1; |
| 336 | } |
| 337 | if (!S_ISDIR(sb.st_mode)) { |
Jens Axboe | 2dc1bbe | 2007-03-15 15:01:33 +0100 | [diff] [blame] | 338 | log_err("fio: %s is not a directory\n", td->o.directory); |
Jens Axboe | 214e1ec | 2007-03-15 10:48:13 +0100 | [diff] [blame] | 339 | return 1; |
| 340 | } |
| 341 | |
| 342 | return 0; |
| 343 | } |
| 344 | |
| 345 | static int str_opendir_cb(void *data, const char fio_unused *str) |
| 346 | { |
| 347 | struct thread_data *td = data; |
| 348 | |
| 349 | if (!td->files_index) |
Jens Axboe | 2dc1bbe | 2007-03-15 15:01:33 +0100 | [diff] [blame] | 350 | td->o.nr_files = 0; |
Jens Axboe | 214e1ec | 2007-03-15 10:48:13 +0100 | [diff] [blame] | 351 | |
Jens Axboe | 2dc1bbe | 2007-03-15 15:01:33 +0100 | [diff] [blame] | 352 | return add_dir_files(td, td->o.opendir); |
Jens Axboe | 214e1ec | 2007-03-15 10:48:13 +0100 | [diff] [blame] | 353 | } |
| 354 | |
Jens Axboe | a59e170 | 2007-07-30 08:53:27 +0200 | [diff] [blame] | 355 | static int str_verify_offset_cb(void *data, unsigned int *off) |
Shawn Lewis | 546a914 | 2007-07-28 21:11:37 +0200 | [diff] [blame] | 356 | { |
| 357 | struct thread_data *td = data; |
Jens Axboe | a59e170 | 2007-07-30 08:53:27 +0200 | [diff] [blame] | 358 | |
Shawn Lewis | 546a914 | 2007-07-28 21:11:37 +0200 | [diff] [blame] | 359 | if (*off && *off < sizeof(struct verify_header)) { |
Jens Axboe | a59e170 | 2007-07-30 08:53:27 +0200 | [diff] [blame] | 360 | log_err("fio: verify_offset too small\n"); |
Shawn Lewis | 546a914 | 2007-07-28 21:11:37 +0200 | [diff] [blame] | 361 | return 1; |
| 362 | } |
Jens Axboe | a59e170 | 2007-07-30 08:53:27 +0200 | [diff] [blame] | 363 | |
| 364 | td->o.verify_offset = *off; |
Shawn Lewis | 546a914 | 2007-07-28 21:11:37 +0200 | [diff] [blame] | 365 | return 0; |
| 366 | } |
| 367 | |
Shawn Lewis | e28218f | 2008-01-16 11:01:33 +0100 | [diff] [blame] | 368 | static int str_verify_pattern_cb(void *data, unsigned int *off) |
Jens Axboe | 90059d6 | 2007-07-30 09:33:12 +0200 | [diff] [blame] | 369 | { |
| 370 | struct thread_data *td = data; |
Shawn Lewis | e28218f | 2008-01-16 11:01:33 +0100 | [diff] [blame] | 371 | unsigned int msb; |
Jens Axboe | 90059d6 | 2007-07-30 09:33:12 +0200 | [diff] [blame] | 372 | |
Shawn Lewis | e28218f | 2008-01-16 11:01:33 +0100 | [diff] [blame] | 373 | msb = fls(*off); |
Jens Axboe | 90059d6 | 2007-07-30 09:33:12 +0200 | [diff] [blame] | 374 | if (msb <= 8) |
| 375 | td->o.verify_pattern_bytes = 1; |
| 376 | else if (msb <= 16) |
| 377 | td->o.verify_pattern_bytes = 2; |
| 378 | else if (msb <= 24) |
| 379 | td->o.verify_pattern_bytes = 3; |
| 380 | else |
| 381 | td->o.verify_pattern_bytes = 4; |
| 382 | |
Shawn Lewis | e28218f | 2008-01-16 11:01:33 +0100 | [diff] [blame] | 383 | td->o.verify_pattern = *off; |
Jens Axboe | 90059d6 | 2007-07-30 09:33:12 +0200 | [diff] [blame] | 384 | return 0; |
| 385 | } |
Jens Axboe | 214e1ec | 2007-03-15 10:48:13 +0100 | [diff] [blame] | 386 | |
Jens Axboe | 4d4e80f | 2008-03-04 10:18:56 +0100 | [diff] [blame] | 387 | static int str_lockfile_cb(void *data, const char *str) |
| 388 | { |
| 389 | struct thread_data *td = data; |
| 390 | char *nr = get_opt_postfix(str); |
| 391 | |
| 392 | td->o.lockfile_batch = 1; |
| 393 | if (nr) |
| 394 | td->o.lockfile_batch = atoi(nr); |
| 395 | |
| 396 | return 0; |
| 397 | } |
| 398 | |
Jens Axboe | 214e1ec | 2007-03-15 10:48:13 +0100 | [diff] [blame] | 399 | #define __stringify_1(x) #x |
| 400 | #define __stringify(x) __stringify_1(x) |
| 401 | |
| 402 | /* |
| 403 | * Map of job/command line options |
| 404 | */ |
| 405 | static struct fio_option options[] = { |
| 406 | { |
| 407 | .name = "description", |
| 408 | .type = FIO_OPT_STR_STORE, |
| 409 | .off1 = td_var_offset(description), |
| 410 | .help = "Text job description", |
| 411 | }, |
| 412 | { |
| 413 | .name = "name", |
| 414 | .type = FIO_OPT_STR_STORE, |
| 415 | .off1 = td_var_offset(name), |
| 416 | .help = "Name of this job", |
| 417 | }, |
| 418 | { |
| 419 | .name = "directory", |
| 420 | .type = FIO_OPT_STR_STORE, |
| 421 | .off1 = td_var_offset(directory), |
| 422 | .cb = str_directory_cb, |
| 423 | .help = "Directory to store files in", |
| 424 | }, |
| 425 | { |
| 426 | .name = "filename", |
| 427 | .type = FIO_OPT_STR_STORE, |
| 428 | .off1 = td_var_offset(filename), |
| 429 | .cb = str_filename_cb, |
| 430 | .help = "File(s) to use for the workload", |
| 431 | }, |
| 432 | { |
Jens Axboe | 29c1349 | 2008-03-01 19:25:20 +0100 | [diff] [blame] | 433 | .name = "lockfile", |
Jens Axboe | 4d4e80f | 2008-03-04 10:18:56 +0100 | [diff] [blame] | 434 | .type = FIO_OPT_STR, |
| 435 | .cb = str_lockfile_cb, |
| 436 | .off1 = td_var_offset(file_lock_mode), |
Jens Axboe | 29c1349 | 2008-03-01 19:25:20 +0100 | [diff] [blame] | 437 | .help = "Lock file when doing IO to it", |
| 438 | .parent = "filename", |
Jens Axboe | 4d4e80f | 2008-03-04 10:18:56 +0100 | [diff] [blame] | 439 | .def = "none", |
| 440 | .posval = { |
| 441 | { .ival = "none", |
| 442 | .oval = FILE_LOCK_NONE, |
| 443 | .help = "No file locking", |
| 444 | }, |
| 445 | { .ival = "exclusive", |
| 446 | .oval = FILE_LOCK_EXCLUSIVE, |
| 447 | .help = "Exclusive file lock", |
| 448 | }, |
| 449 | { |
| 450 | .ival = "readwrite", |
| 451 | .oval = FILE_LOCK_READWRITE, |
| 452 | .help = "Read vs write lock", |
| 453 | }, |
| 454 | }, |
Jens Axboe | 29c1349 | 2008-03-01 19:25:20 +0100 | [diff] [blame] | 455 | }, |
| 456 | { |
Jens Axboe | 214e1ec | 2007-03-15 10:48:13 +0100 | [diff] [blame] | 457 | .name = "opendir", |
| 458 | .type = FIO_OPT_STR_STORE, |
| 459 | .off1 = td_var_offset(opendir), |
| 460 | .cb = str_opendir_cb, |
| 461 | .help = "Recursively add files from this directory and down", |
| 462 | }, |
| 463 | { |
| 464 | .name = "rw", |
Jens Axboe | d3aad8f | 2007-03-15 14:12:05 +0100 | [diff] [blame] | 465 | .alias = "readwrite", |
Jens Axboe | 214e1ec | 2007-03-15 10:48:13 +0100 | [diff] [blame] | 466 | .type = FIO_OPT_STR, |
Jens Axboe | 211097b | 2007-03-22 18:56:45 +0100 | [diff] [blame] | 467 | .cb = str_rw_cb, |
Jens Axboe | 214e1ec | 2007-03-15 10:48:13 +0100 | [diff] [blame] | 468 | .off1 = td_var_offset(td_ddir), |
| 469 | .help = "IO direction", |
| 470 | .def = "read", |
| 471 | .posval = { |
| 472 | { .ival = "read", |
| 473 | .oval = TD_DDIR_READ, |
| 474 | .help = "Sequential read", |
| 475 | }, |
| 476 | { .ival = "write", |
| 477 | .oval = TD_DDIR_WRITE, |
| 478 | .help = "Sequential write", |
| 479 | }, |
| 480 | { .ival = "randread", |
| 481 | .oval = TD_DDIR_RANDREAD, |
| 482 | .help = "Random read", |
| 483 | }, |
| 484 | { .ival = "randwrite", |
| 485 | .oval = TD_DDIR_RANDWRITE, |
| 486 | .help = "Random write", |
| 487 | }, |
| 488 | { .ival = "rw", |
| 489 | .oval = TD_DDIR_RW, |
| 490 | .help = "Sequential read and write mix", |
| 491 | }, |
| 492 | { .ival = "randrw", |
| 493 | .oval = TD_DDIR_RANDRW, |
| 494 | .help = "Random read and write mix" |
| 495 | }, |
| 496 | }, |
| 497 | }, |
| 498 | { |
| 499 | .name = "ioengine", |
| 500 | .type = FIO_OPT_STR_STORE, |
| 501 | .off1 = td_var_offset(ioengine), |
| 502 | .help = "IO engine to use", |
| 503 | .def = "sync", |
| 504 | .posval = { |
| 505 | { .ival = "sync", |
| 506 | .help = "Use read/write", |
| 507 | }, |
gurudas pai | a31041e | 2007-10-23 15:12:30 +0200 | [diff] [blame] | 508 | { .ival = "psync", |
| 509 | .help = "Use pread/pwrite", |
| 510 | }, |
Jens Axboe | 1d2af02 | 2008-02-04 10:59:07 +0100 | [diff] [blame] | 511 | { .ival = "vsync", |
| 512 | .help = "Use readv/writev", |
| 513 | }, |
Jens Axboe | 214e1ec | 2007-03-15 10:48:13 +0100 | [diff] [blame] | 514 | #ifdef FIO_HAVE_LIBAIO |
| 515 | { .ival = "libaio", |
| 516 | .help = "Linux native asynchronous IO", |
| 517 | }, |
| 518 | #endif |
| 519 | #ifdef FIO_HAVE_POSIXAIO |
| 520 | { .ival = "posixaio", |
| 521 | .help = "POSIX asynchronous IO", |
| 522 | }, |
| 523 | #endif |
| 524 | { .ival = "mmap", |
| 525 | .help = "Memory mapped IO", |
| 526 | }, |
| 527 | #ifdef FIO_HAVE_SPLICE |
| 528 | { .ival = "splice", |
| 529 | .help = "splice/vmsplice based IO", |
| 530 | }, |
Jens Axboe | 9cce02e | 2007-06-22 15:42:21 +0200 | [diff] [blame] | 531 | { .ival = "netsplice", |
| 532 | .help = "splice/vmsplice to/from the network", |
| 533 | }, |
Jens Axboe | 214e1ec | 2007-03-15 10:48:13 +0100 | [diff] [blame] | 534 | #endif |
| 535 | #ifdef FIO_HAVE_SGIO |
| 536 | { .ival = "sg", |
| 537 | .help = "SCSI generic v3 IO", |
| 538 | }, |
| 539 | #endif |
| 540 | { .ival = "null", |
| 541 | .help = "Testing engine (no data transfer)", |
| 542 | }, |
| 543 | { .ival = "net", |
| 544 | .help = "Network IO", |
| 545 | }, |
| 546 | #ifdef FIO_HAVE_SYSLET |
| 547 | { .ival = "syslet-rw", |
| 548 | .help = "syslet enabled async pread/pwrite IO", |
| 549 | }, |
| 550 | #endif |
| 551 | { .ival = "cpuio", |
| 552 | .help = "CPU cycler burner engine", |
| 553 | }, |
Jens Axboe | b8c82a4 | 2007-03-21 08:48:26 +0100 | [diff] [blame] | 554 | #ifdef FIO_HAVE_GUASI |
| 555 | { .ival = "guasi", |
| 556 | .help = "GUASI IO engine", |
| 557 | }, |
| 558 | #endif |
Jens Axboe | 214e1ec | 2007-03-15 10:48:13 +0100 | [diff] [blame] | 559 | { .ival = "external", |
| 560 | .help = "Load external engine (append name)", |
| 561 | }, |
| 562 | }, |
| 563 | }, |
| 564 | { |
| 565 | .name = "iodepth", |
| 566 | .type = FIO_OPT_INT, |
| 567 | .off1 = td_var_offset(iodepth), |
| 568 | .help = "Amount of IO buffers to keep in flight", |
Jens Axboe | 757aff4 | 2007-12-12 19:42:13 +0100 | [diff] [blame] | 569 | .minval = 1, |
Jens Axboe | 214e1ec | 2007-03-15 10:48:13 +0100 | [diff] [blame] | 570 | .def = "1", |
| 571 | }, |
| 572 | { |
| 573 | .name = "iodepth_batch", |
| 574 | .type = FIO_OPT_INT, |
| 575 | .off1 = td_var_offset(iodepth_batch), |
| 576 | .help = "Number of IO to submit in one go", |
Jens Axboe | afdf935 | 2007-07-31 16:14:34 +0200 | [diff] [blame] | 577 | .parent = "iodepth", |
Jens Axboe | a2e6f8a | 2008-01-18 10:28:11 +0100 | [diff] [blame] | 578 | .minval = 1, |
| 579 | .def = "1", |
Jens Axboe | 214e1ec | 2007-03-15 10:48:13 +0100 | [diff] [blame] | 580 | }, |
| 581 | { |
| 582 | .name = "iodepth_low", |
| 583 | .type = FIO_OPT_INT, |
| 584 | .off1 = td_var_offset(iodepth_low), |
| 585 | .help = "Low water mark for queuing depth", |
Jens Axboe | afdf935 | 2007-07-31 16:14:34 +0200 | [diff] [blame] | 586 | .parent = "iodepth", |
Jens Axboe | 214e1ec | 2007-03-15 10:48:13 +0100 | [diff] [blame] | 587 | }, |
| 588 | { |
| 589 | .name = "size", |
| 590 | .type = FIO_OPT_STR_VAL, |
Jens Axboe | 2dc1bbe | 2007-03-15 15:01:33 +0100 | [diff] [blame] | 591 | .off1 = td_var_offset(size), |
Jens Axboe | c3edbdb | 2007-07-20 14:25:31 +0200 | [diff] [blame] | 592 | .minval = 1, |
Jens Axboe | 214e1ec | 2007-03-15 10:48:13 +0100 | [diff] [blame] | 593 | .help = "Total size of device or files", |
| 594 | }, |
| 595 | { |
Shawn Lewis | aa31f1f | 2008-01-11 09:45:11 +0100 | [diff] [blame] | 596 | .name = "fill_device", |
| 597 | .type = FIO_OPT_BOOL, |
| 598 | .off1 = td_var_offset(fill_device), |
| 599 | .help = "Write until an ENOSPC error occurs", |
| 600 | .def = "0", |
| 601 | }, |
| 602 | { |
Jens Axboe | 214e1ec | 2007-03-15 10:48:13 +0100 | [diff] [blame] | 603 | .name = "filesize", |
| 604 | .type = FIO_OPT_STR_VAL, |
| 605 | .off1 = td_var_offset(file_size_low), |
| 606 | .off2 = td_var_offset(file_size_high), |
Jens Axboe | c3edbdb | 2007-07-20 14:25:31 +0200 | [diff] [blame] | 607 | .minval = 1, |
Jens Axboe | 214e1ec | 2007-03-15 10:48:13 +0100 | [diff] [blame] | 608 | .help = "Size of individual files", |
| 609 | }, |
| 610 | { |
Jens Axboe | 67a1000 | 2007-07-31 23:12:16 +0200 | [diff] [blame] | 611 | .name = "offset", |
| 612 | .alias = "fileoffset", |
| 613 | .type = FIO_OPT_STR_VAL, |
| 614 | .off1 = td_var_offset(start_offset), |
| 615 | .help = "Start IO from this offset", |
| 616 | .def = "0", |
| 617 | }, |
| 618 | { |
Jens Axboe | 214e1ec | 2007-03-15 10:48:13 +0100 | [diff] [blame] | 619 | .name = "bs", |
Jens Axboe | d3aad8f | 2007-03-15 14:12:05 +0100 | [diff] [blame] | 620 | .alias = "blocksize", |
Jens Axboe | 214e1ec | 2007-03-15 10:48:13 +0100 | [diff] [blame] | 621 | .type = FIO_OPT_STR_VAL_INT, |
| 622 | .off1 = td_var_offset(bs[DDIR_READ]), |
| 623 | .off2 = td_var_offset(bs[DDIR_WRITE]), |
Jens Axboe | c3edbdb | 2007-07-20 14:25:31 +0200 | [diff] [blame] | 624 | .minval = 1, |
Jens Axboe | 214e1ec | 2007-03-15 10:48:13 +0100 | [diff] [blame] | 625 | .help = "Block size unit", |
| 626 | .def = "4k", |
Jens Axboe | 67a1000 | 2007-07-31 23:12:16 +0200 | [diff] [blame] | 627 | .parent = "rw", |
Jens Axboe | 214e1ec | 2007-03-15 10:48:13 +0100 | [diff] [blame] | 628 | }, |
| 629 | { |
| 630 | .name = "bsrange", |
Jens Axboe | d3aad8f | 2007-03-15 14:12:05 +0100 | [diff] [blame] | 631 | .alias = "blocksize_range", |
Jens Axboe | 214e1ec | 2007-03-15 10:48:13 +0100 | [diff] [blame] | 632 | .type = FIO_OPT_RANGE, |
| 633 | .off1 = td_var_offset(min_bs[DDIR_READ]), |
| 634 | .off2 = td_var_offset(max_bs[DDIR_READ]), |
| 635 | .off3 = td_var_offset(min_bs[DDIR_WRITE]), |
| 636 | .off4 = td_var_offset(max_bs[DDIR_WRITE]), |
Jens Axboe | c3edbdb | 2007-07-20 14:25:31 +0200 | [diff] [blame] | 637 | .minval = 1, |
Jens Axboe | 214e1ec | 2007-03-15 10:48:13 +0100 | [diff] [blame] | 638 | .help = "Set block size range (in more detail than bs)", |
Jens Axboe | 67a1000 | 2007-07-31 23:12:16 +0200 | [diff] [blame] | 639 | .parent = "rw", |
Jens Axboe | 214e1ec | 2007-03-15 10:48:13 +0100 | [diff] [blame] | 640 | }, |
| 641 | { |
Jens Axboe | 564ca97 | 2007-12-14 12:21:19 +0100 | [diff] [blame] | 642 | .name = "bssplit", |
| 643 | .type = FIO_OPT_STR, |
| 644 | .cb = str_bssplit_cb, |
| 645 | .help = "Set a specific mix of block sizes", |
| 646 | .parent = "rw", |
| 647 | }, |
| 648 | { |
Jens Axboe | 214e1ec | 2007-03-15 10:48:13 +0100 | [diff] [blame] | 649 | .name = "bs_unaligned", |
Jens Axboe | d3aad8f | 2007-03-15 14:12:05 +0100 | [diff] [blame] | 650 | .alias = "blocksize_unaligned", |
Jens Axboe | 214e1ec | 2007-03-15 10:48:13 +0100 | [diff] [blame] | 651 | .type = FIO_OPT_STR_SET, |
| 652 | .off1 = td_var_offset(bs_unaligned), |
| 653 | .help = "Don't sector align IO buffer sizes", |
Jens Axboe | 67a1000 | 2007-07-31 23:12:16 +0200 | [diff] [blame] | 654 | .parent = "rw", |
Jens Axboe | 214e1ec | 2007-03-15 10:48:13 +0100 | [diff] [blame] | 655 | }, |
| 656 | { |
| 657 | .name = "randrepeat", |
| 658 | .type = FIO_OPT_BOOL, |
| 659 | .off1 = td_var_offset(rand_repeatable), |
| 660 | .help = "Use repeatable random IO pattern", |
| 661 | .def = "1", |
Jens Axboe | 67a1000 | 2007-07-31 23:12:16 +0200 | [diff] [blame] | 662 | .parent = "rw", |
Jens Axboe | 214e1ec | 2007-03-15 10:48:13 +0100 | [diff] [blame] | 663 | }, |
| 664 | { |
| 665 | .name = "norandommap", |
| 666 | .type = FIO_OPT_STR_SET, |
| 667 | .off1 = td_var_offset(norandommap), |
| 668 | .help = "Accept potential duplicate random blocks", |
Jens Axboe | 67a1000 | 2007-07-31 23:12:16 +0200 | [diff] [blame] | 669 | .parent = "rw", |
Jens Axboe | 214e1ec | 2007-03-15 10:48:13 +0100 | [diff] [blame] | 670 | }, |
| 671 | { |
| 672 | .name = "nrfiles", |
| 673 | .type = FIO_OPT_INT, |
| 674 | .off1 = td_var_offset(nr_files), |
| 675 | .help = "Split job workload between this number of files", |
| 676 | .def = "1", |
| 677 | }, |
| 678 | { |
| 679 | .name = "openfiles", |
| 680 | .type = FIO_OPT_INT, |
| 681 | .off1 = td_var_offset(open_files), |
| 682 | .help = "Number of files to keep open at the same time", |
| 683 | }, |
| 684 | { |
| 685 | .name = "file_service_type", |
| 686 | .type = FIO_OPT_STR, |
| 687 | .cb = str_fst_cb, |
| 688 | .off1 = td_var_offset(file_service_type), |
| 689 | .help = "How to select which file to service next", |
| 690 | .def = "roundrobin", |
| 691 | .posval = { |
| 692 | { .ival = "random", |
| 693 | .oval = FIO_FSERVICE_RANDOM, |
| 694 | .help = "Choose a file at random", |
| 695 | }, |
| 696 | { .ival = "roundrobin", |
| 697 | .oval = FIO_FSERVICE_RR, |
| 698 | .help = "Round robin select files", |
| 699 | }, |
| 700 | }, |
Jens Axboe | 67a1000 | 2007-07-31 23:12:16 +0200 | [diff] [blame] | 701 | .parent = "nrfiles", |
| 702 | }, |
| 703 | { |
| 704 | .name = "fadvise_hint", |
| 705 | .type = FIO_OPT_BOOL, |
| 706 | .off1 = td_var_offset(fadvise_hint), |
| 707 | .help = "Use fadvise() to advise the kernel on IO pattern", |
| 708 | .def = "1", |
Jens Axboe | 214e1ec | 2007-03-15 10:48:13 +0100 | [diff] [blame] | 709 | }, |
| 710 | { |
| 711 | .name = "fsync", |
| 712 | .type = FIO_OPT_INT, |
| 713 | .off1 = td_var_offset(fsync_blocks), |
| 714 | .help = "Issue fsync for writes every given number of blocks", |
| 715 | .def = "0", |
| 716 | }, |
| 717 | { |
| 718 | .name = "direct", |
| 719 | .type = FIO_OPT_BOOL, |
| 720 | .off1 = td_var_offset(odirect), |
| 721 | .help = "Use O_DIRECT IO (negates buffered)", |
| 722 | .def = "0", |
| 723 | }, |
| 724 | { |
| 725 | .name = "buffered", |
| 726 | .type = FIO_OPT_BOOL, |
| 727 | .off1 = td_var_offset(odirect), |
| 728 | .neg = 1, |
| 729 | .help = "Use buffered IO (negates direct)", |
| 730 | .def = "1", |
| 731 | }, |
| 732 | { |
| 733 | .name = "overwrite", |
| 734 | .type = FIO_OPT_BOOL, |
| 735 | .off1 = td_var_offset(overwrite), |
| 736 | .help = "When writing, set whether to overwrite current data", |
| 737 | .def = "0", |
| 738 | }, |
| 739 | { |
| 740 | .name = "loops", |
| 741 | .type = FIO_OPT_INT, |
| 742 | .off1 = td_var_offset(loops), |
| 743 | .help = "Number of times to run the job", |
| 744 | .def = "1", |
| 745 | }, |
| 746 | { |
| 747 | .name = "numjobs", |
| 748 | .type = FIO_OPT_INT, |
| 749 | .off1 = td_var_offset(numjobs), |
| 750 | .help = "Duplicate this job this many times", |
| 751 | .def = "1", |
| 752 | }, |
| 753 | { |
| 754 | .name = "startdelay", |
| 755 | .type = FIO_OPT_INT, |
| 756 | .off1 = td_var_offset(start_delay), |
| 757 | .help = "Only start job when this period has passed", |
| 758 | .def = "0", |
| 759 | }, |
| 760 | { |
| 761 | .name = "runtime", |
| 762 | .alias = "timeout", |
| 763 | .type = FIO_OPT_STR_VAL_TIME, |
| 764 | .off1 = td_var_offset(timeout), |
| 765 | .help = "Stop workload when this amount of time has passed", |
| 766 | .def = "0", |
| 767 | }, |
| 768 | { |
Jens Axboe | cf4464c | 2007-04-17 20:14:42 +0200 | [diff] [blame] | 769 | .name = "time_based", |
| 770 | .type = FIO_OPT_STR_SET, |
| 771 | .off1 = td_var_offset(time_based), |
| 772 | .help = "Keep running until runtime/timeout is met", |
| 773 | }, |
| 774 | { |
Jens Axboe | 214e1ec | 2007-03-15 10:48:13 +0100 | [diff] [blame] | 775 | .name = "mem", |
Jens Axboe | d3aad8f | 2007-03-15 14:12:05 +0100 | [diff] [blame] | 776 | .alias = "iomem", |
Jens Axboe | 214e1ec | 2007-03-15 10:48:13 +0100 | [diff] [blame] | 777 | .type = FIO_OPT_STR, |
| 778 | .cb = str_mem_cb, |
| 779 | .off1 = td_var_offset(mem_type), |
| 780 | .help = "Backing type for IO buffers", |
| 781 | .def = "malloc", |
| 782 | .posval = { |
| 783 | { .ival = "malloc", |
| 784 | .oval = MEM_MALLOC, |
| 785 | .help = "Use malloc(3) for IO buffers", |
| 786 | }, |
Jens Axboe | b370e46 | 2007-03-19 10:51:49 +0100 | [diff] [blame] | 787 | { .ival = "shm", |
| 788 | .oval = MEM_SHM, |
| 789 | .help = "Use shared memory segments for IO buffers", |
Jens Axboe | 214e1ec | 2007-03-15 10:48:13 +0100 | [diff] [blame] | 790 | }, |
| 791 | #ifdef FIO_HAVE_HUGETLB |
Jens Axboe | 37c8cdf | 2007-03-19 13:14:03 +0100 | [diff] [blame] | 792 | { .ival = "shmhuge", |
| 793 | .oval = MEM_SHMHUGE, |
| 794 | .help = "Like shm, but use huge pages", |
Jens Axboe | 214e1ec | 2007-03-15 10:48:13 +0100 | [diff] [blame] | 795 | }, |
| 796 | #endif |
Jens Axboe | b370e46 | 2007-03-19 10:51:49 +0100 | [diff] [blame] | 797 | { .ival = "mmap", |
| 798 | .oval = MEM_MMAP, |
| 799 | .help = "Use mmap(2) (file or anon) for IO buffers", |
| 800 | }, |
Jens Axboe | 37c8cdf | 2007-03-19 13:14:03 +0100 | [diff] [blame] | 801 | #ifdef FIO_HAVE_HUGETLB |
| 802 | { .ival = "mmaphuge", |
| 803 | .oval = MEM_MMAPHUGE, |
| 804 | .help = "Like mmap, but use huge pages", |
| 805 | }, |
| 806 | #endif |
Jens Axboe | 214e1ec | 2007-03-15 10:48:13 +0100 | [diff] [blame] | 807 | }, |
| 808 | }, |
| 809 | { |
| 810 | .name = "verify", |
| 811 | .type = FIO_OPT_STR, |
| 812 | .off1 = td_var_offset(verify), |
| 813 | .help = "Verify data written", |
| 814 | .def = "0", |
| 815 | .posval = { |
| 816 | { .ival = "0", |
| 817 | .oval = VERIFY_NONE, |
| 818 | .help = "Don't do IO verification", |
| 819 | }, |
Jens Axboe | fcca4b5 | 2007-07-27 15:42:00 +0200 | [diff] [blame] | 820 | { .ival = "md5", |
| 821 | .oval = VERIFY_MD5, |
| 822 | .help = "Use md5 checksums for verification", |
| 823 | }, |
Jens Axboe | d77a7af | 2007-07-27 15:35:06 +0200 | [diff] [blame] | 824 | { .ival = "crc64", |
| 825 | .oval = VERIFY_CRC64, |
| 826 | .help = "Use crc64 checksums for verification", |
| 827 | }, |
Jens Axboe | 214e1ec | 2007-03-15 10:48:13 +0100 | [diff] [blame] | 828 | { .ival = "crc32", |
| 829 | .oval = VERIFY_CRC32, |
| 830 | .help = "Use crc32 checksums for verification", |
| 831 | }, |
Jens Axboe | 969f7ed | 2007-07-27 09:07:17 +0200 | [diff] [blame] | 832 | { .ival = "crc16", |
| 833 | .oval = VERIFY_CRC16, |
| 834 | .help = "Use crc16 checksums for verification", |
| 835 | }, |
Jens Axboe | 1e154bd | 2007-07-27 09:52:40 +0200 | [diff] [blame] | 836 | { .ival = "crc7", |
| 837 | .oval = VERIFY_CRC7, |
| 838 | .help = "Use crc7 checksums for verification", |
| 839 | }, |
Jens Axboe | cd14cc1 | 2007-07-30 10:59:33 +0200 | [diff] [blame] | 840 | { .ival = "sha256", |
| 841 | .oval = VERIFY_SHA256, |
| 842 | .help = "Use sha256 checksums for verification", |
| 843 | }, |
| 844 | { .ival = "sha512", |
| 845 | .oval = VERIFY_SHA512, |
| 846 | .help = "Use sha512 checksums for verification", |
| 847 | }, |
Shawn Lewis | 7437ee8 | 2007-08-02 21:05:58 +0200 | [diff] [blame] | 848 | { .ival = "meta", |
| 849 | .oval = VERIFY_META, |
| 850 | .help = "Use io information", |
| 851 | }, |
Jens Axboe | 36690c9 | 2007-03-26 10:23:34 +0200 | [diff] [blame] | 852 | { |
| 853 | .ival = "null", |
| 854 | .oval = VERIFY_NULL, |
| 855 | .help = "Pretend to verify", |
| 856 | }, |
Jens Axboe | 214e1ec | 2007-03-15 10:48:13 +0100 | [diff] [blame] | 857 | }, |
| 858 | }, |
| 859 | { |
Jens Axboe | 005c565 | 2007-08-02 22:21:36 +0200 | [diff] [blame] | 860 | .name = "do_verify", |
Jens Axboe | 68e1f29 | 2007-08-10 10:32:14 +0200 | [diff] [blame] | 861 | .type = FIO_OPT_BOOL, |
Jens Axboe | 005c565 | 2007-08-02 22:21:36 +0200 | [diff] [blame] | 862 | .off1 = td_var_offset(do_verify), |
| 863 | .help = "Run verification stage after write", |
| 864 | .def = "1", |
| 865 | .parent = "verify", |
| 866 | }, |
| 867 | { |
Jens Axboe | 160b966 | 2007-03-27 10:59:49 +0200 | [diff] [blame] | 868 | .name = "verifysort", |
| 869 | .type = FIO_OPT_BOOL, |
| 870 | .off1 = td_var_offset(verifysort), |
| 871 | .help = "Sort written verify blocks for read back", |
| 872 | .def = "1", |
Jens Axboe | c83f2df | 2007-07-31 22:51:47 +0200 | [diff] [blame] | 873 | .parent = "verify", |
Jens Axboe | 160b966 | 2007-03-27 10:59:49 +0200 | [diff] [blame] | 874 | }, |
| 875 | { |
Jens Axboe | a59e170 | 2007-07-30 08:53:27 +0200 | [diff] [blame] | 876 | .name = "verify_interval", |
Shawn Lewis | 3f9f4e2 | 2007-07-28 21:10:37 +0200 | [diff] [blame] | 877 | .type = FIO_OPT_STR_VAL_INT, |
Jens Axboe | a59e170 | 2007-07-30 08:53:27 +0200 | [diff] [blame] | 878 | .off1 = td_var_offset(verify_interval), |
Jens Axboe | 819a968 | 2007-07-28 21:30:31 +0200 | [diff] [blame] | 879 | .minval = 2 * sizeof(struct verify_header), |
Jens Axboe | a59e170 | 2007-07-30 08:53:27 +0200 | [diff] [blame] | 880 | .help = "Store verify buffer header every N bytes", |
Jens Axboe | afdf935 | 2007-07-31 16:14:34 +0200 | [diff] [blame] | 881 | .parent = "verify", |
Shawn Lewis | 3f9f4e2 | 2007-07-28 21:10:37 +0200 | [diff] [blame] | 882 | }, |
| 883 | { |
Jens Axboe | a59e170 | 2007-07-30 08:53:27 +0200 | [diff] [blame] | 884 | .name = "verify_offset", |
Shawn Lewis | 546a914 | 2007-07-28 21:11:37 +0200 | [diff] [blame] | 885 | .type = FIO_OPT_STR_VAL_INT, |
Jens Axboe | a59e170 | 2007-07-30 08:53:27 +0200 | [diff] [blame] | 886 | .help = "Offset verify header location by N bytes", |
Shawn Lewis | 546a914 | 2007-07-28 21:11:37 +0200 | [diff] [blame] | 887 | .def = "0", |
Jens Axboe | 5ec10ea | 2008-03-06 15:42:00 +0100 | [diff] [blame] | 888 | .cb = str_verify_offset_cb, |
Jens Axboe | afdf935 | 2007-07-31 16:14:34 +0200 | [diff] [blame] | 889 | .parent = "verify", |
Shawn Lewis | 546a914 | 2007-07-28 21:11:37 +0200 | [diff] [blame] | 890 | }, |
| 891 | { |
Shawn Lewis | e28218f | 2008-01-16 11:01:33 +0100 | [diff] [blame] | 892 | .name = "verify_pattern", |
| 893 | .type = FIO_OPT_INT, |
| 894 | .cb = str_verify_pattern_cb, |
| 895 | .help = "Fill pattern for IO buffers", |
| 896 | .parent = "verify", |
| 897 | }, |
| 898 | { |
Jens Axboe | a12a3b4 | 2007-08-09 10:20:54 +0200 | [diff] [blame] | 899 | .name = "verify_fatal", |
Jens Axboe | 68e1f29 | 2007-08-10 10:32:14 +0200 | [diff] [blame] | 900 | .type = FIO_OPT_BOOL, |
Jens Axboe | a12a3b4 | 2007-08-09 10:20:54 +0200 | [diff] [blame] | 901 | .off1 = td_var_offset(verify_fatal), |
| 902 | .def = "0", |
| 903 | .help = "Exit on a single verify failure, don't continue", |
| 904 | .parent = "verify", |
| 905 | }, |
| 906 | { |
Jens Axboe | 214e1ec | 2007-03-15 10:48:13 +0100 | [diff] [blame] | 907 | .name = "write_iolog", |
| 908 | .type = FIO_OPT_STR_STORE, |
| 909 | .off1 = td_var_offset(write_iolog_file), |
| 910 | .help = "Store IO pattern to file", |
| 911 | }, |
| 912 | { |
| 913 | .name = "read_iolog", |
| 914 | .type = FIO_OPT_STR_STORE, |
| 915 | .off1 = td_var_offset(read_iolog_file), |
| 916 | .help = "Playback IO pattern from file", |
| 917 | }, |
| 918 | { |
| 919 | .name = "exec_prerun", |
| 920 | .type = FIO_OPT_STR_STORE, |
| 921 | .off1 = td_var_offset(exec_prerun), |
| 922 | .help = "Execute this file prior to running job", |
| 923 | }, |
| 924 | { |
| 925 | .name = "exec_postrun", |
| 926 | .type = FIO_OPT_STR_STORE, |
| 927 | .off1 = td_var_offset(exec_postrun), |
| 928 | .help = "Execute this file after running job", |
| 929 | }, |
| 930 | #ifdef FIO_HAVE_IOSCHED_SWITCH |
| 931 | { |
| 932 | .name = "ioscheduler", |
| 933 | .type = FIO_OPT_STR_STORE, |
| 934 | .off1 = td_var_offset(ioscheduler), |
| 935 | .help = "Use this IO scheduler on the backing device", |
| 936 | }, |
| 937 | #endif |
| 938 | { |
| 939 | .name = "zonesize", |
| 940 | .type = FIO_OPT_STR_VAL, |
| 941 | .off1 = td_var_offset(zone_size), |
| 942 | .help = "Give size of an IO zone", |
| 943 | .def = "0", |
| 944 | }, |
| 945 | { |
| 946 | .name = "zoneskip", |
| 947 | .type = FIO_OPT_STR_VAL, |
| 948 | .off1 = td_var_offset(zone_skip), |
| 949 | .help = "Space between IO zones", |
| 950 | .def = "0", |
| 951 | }, |
| 952 | { |
| 953 | .name = "lockmem", |
| 954 | .type = FIO_OPT_STR_VAL, |
| 955 | .cb = str_lockmem_cb, |
| 956 | .help = "Lock down this amount of memory", |
| 957 | .def = "0", |
| 958 | }, |
| 959 | { |
Jens Axboe | 214e1ec | 2007-03-15 10:48:13 +0100 | [diff] [blame] | 960 | .name = "rwmixread", |
| 961 | .type = FIO_OPT_INT, |
Jens Axboe | e47f799 | 2007-03-21 14:05:39 +0100 | [diff] [blame] | 962 | .off1 = td_var_offset(rwmix[DDIR_READ]), |
Jens Axboe | 214e1ec | 2007-03-15 10:48:13 +0100 | [diff] [blame] | 963 | .maxval = 100, |
| 964 | .help = "Percentage of mixed workload that is reads", |
| 965 | .def = "50", |
| 966 | }, |
| 967 | { |
| 968 | .name = "rwmixwrite", |
| 969 | .type = FIO_OPT_INT, |
Jens Axboe | e47f799 | 2007-03-21 14:05:39 +0100 | [diff] [blame] | 970 | .off1 = td_var_offset(rwmix[DDIR_WRITE]), |
Jens Axboe | 214e1ec | 2007-03-15 10:48:13 +0100 | [diff] [blame] | 971 | .maxval = 100, |
| 972 | .help = "Percentage of mixed workload that is writes", |
| 973 | .def = "50", |
| 974 | }, |
| 975 | { |
Jens Axboe | afdf935 | 2007-07-31 16:14:34 +0200 | [diff] [blame] | 976 | .name = "rwmixcycle", |
| 977 | .type = FIO_OPT_INT, |
| 978 | .off1 = td_var_offset(rwmixcycle), |
| 979 | .help = "Cycle period for mixed read/write workloads (msec)", |
| 980 | .def = "500", |
| 981 | .parent = "rwmixread", |
| 982 | }, |
| 983 | { |
Jens Axboe | 214e1ec | 2007-03-15 10:48:13 +0100 | [diff] [blame] | 984 | .name = "nice", |
| 985 | .type = FIO_OPT_INT, |
| 986 | .off1 = td_var_offset(nice), |
| 987 | .help = "Set job CPU nice value", |
| 988 | .minval = -19, |
| 989 | .maxval = 20, |
| 990 | .def = "0", |
| 991 | }, |
| 992 | #ifdef FIO_HAVE_IOPRIO |
| 993 | { |
| 994 | .name = "prio", |
| 995 | .type = FIO_OPT_INT, |
| 996 | .cb = str_prio_cb, |
| 997 | .help = "Set job IO priority value", |
| 998 | .minval = 0, |
| 999 | .maxval = 7, |
| 1000 | }, |
| 1001 | { |
| 1002 | .name = "prioclass", |
| 1003 | .type = FIO_OPT_INT, |
| 1004 | .cb = str_prioclass_cb, |
| 1005 | .help = "Set job IO priority class", |
| 1006 | .minval = 0, |
| 1007 | .maxval = 3, |
| 1008 | }, |
| 1009 | #endif |
| 1010 | { |
| 1011 | .name = "thinktime", |
| 1012 | .type = FIO_OPT_INT, |
| 1013 | .off1 = td_var_offset(thinktime), |
| 1014 | .help = "Idle time between IO buffers (usec)", |
| 1015 | .def = "0", |
| 1016 | }, |
| 1017 | { |
| 1018 | .name = "thinktime_spin", |
| 1019 | .type = FIO_OPT_INT, |
| 1020 | .off1 = td_var_offset(thinktime_spin), |
| 1021 | .help = "Start think time by spinning this amount (usec)", |
| 1022 | .def = "0", |
Jens Axboe | afdf935 | 2007-07-31 16:14:34 +0200 | [diff] [blame] | 1023 | .parent = "thinktime", |
Jens Axboe | 214e1ec | 2007-03-15 10:48:13 +0100 | [diff] [blame] | 1024 | }, |
| 1025 | { |
| 1026 | .name = "thinktime_blocks", |
| 1027 | .type = FIO_OPT_INT, |
| 1028 | .off1 = td_var_offset(thinktime_blocks), |
| 1029 | .help = "IO buffer period between 'thinktime'", |
| 1030 | .def = "1", |
Jens Axboe | afdf935 | 2007-07-31 16:14:34 +0200 | [diff] [blame] | 1031 | .parent = "thinktime", |
Jens Axboe | 214e1ec | 2007-03-15 10:48:13 +0100 | [diff] [blame] | 1032 | }, |
| 1033 | { |
| 1034 | .name = "rate", |
| 1035 | .type = FIO_OPT_INT, |
| 1036 | .off1 = td_var_offset(rate), |
| 1037 | .help = "Set bandwidth rate", |
| 1038 | }, |
| 1039 | { |
| 1040 | .name = "ratemin", |
| 1041 | .type = FIO_OPT_INT, |
| 1042 | .off1 = td_var_offset(ratemin), |
Jens Axboe | 4e991c2 | 2007-03-15 11:41:11 +0100 | [diff] [blame] | 1043 | .help = "Job must meet this rate or it will be shutdown", |
Jens Axboe | afdf935 | 2007-07-31 16:14:34 +0200 | [diff] [blame] | 1044 | .parent = "rate", |
Jens Axboe | 4e991c2 | 2007-03-15 11:41:11 +0100 | [diff] [blame] | 1045 | }, |
| 1046 | { |
| 1047 | .name = "rate_iops", |
| 1048 | .type = FIO_OPT_INT, |
| 1049 | .off1 = td_var_offset(rate_iops), |
| 1050 | .help = "Limit IO used to this number of IO operations/sec", |
| 1051 | }, |
| 1052 | { |
| 1053 | .name = "rate_iops_min", |
| 1054 | .type = FIO_OPT_INT, |
| 1055 | .off1 = td_var_offset(rate_iops_min), |
| 1056 | .help = "Job must meet this rate or it will be shutdown", |
Jens Axboe | afdf935 | 2007-07-31 16:14:34 +0200 | [diff] [blame] | 1057 | .parent = "rate_iops", |
Jens Axboe | 214e1ec | 2007-03-15 10:48:13 +0100 | [diff] [blame] | 1058 | }, |
| 1059 | { |
| 1060 | .name = "ratecycle", |
| 1061 | .type = FIO_OPT_INT, |
| 1062 | .off1 = td_var_offset(ratecycle), |
| 1063 | .help = "Window average for rate limits (msec)", |
| 1064 | .def = "1000", |
Jens Axboe | afdf935 | 2007-07-31 16:14:34 +0200 | [diff] [blame] | 1065 | .parent = "rate", |
Jens Axboe | 214e1ec | 2007-03-15 10:48:13 +0100 | [diff] [blame] | 1066 | }, |
| 1067 | { |
| 1068 | .name = "invalidate", |
| 1069 | .type = FIO_OPT_BOOL, |
| 1070 | .off1 = td_var_offset(invalidate_cache), |
| 1071 | .help = "Invalidate buffer/page cache prior to running job", |
| 1072 | .def = "1", |
| 1073 | }, |
| 1074 | { |
| 1075 | .name = "sync", |
| 1076 | .type = FIO_OPT_BOOL, |
| 1077 | .off1 = td_var_offset(sync_io), |
| 1078 | .help = "Use O_SYNC for buffered writes", |
| 1079 | .def = "0", |
Jens Axboe | 67a1000 | 2007-07-31 23:12:16 +0200 | [diff] [blame] | 1080 | .parent = "buffered", |
Jens Axboe | 214e1ec | 2007-03-15 10:48:13 +0100 | [diff] [blame] | 1081 | }, |
| 1082 | { |
| 1083 | .name = "bwavgtime", |
| 1084 | .type = FIO_OPT_INT, |
| 1085 | .off1 = td_var_offset(bw_avg_time), |
Jens Axboe | 5ec10ea | 2008-03-06 15:42:00 +0100 | [diff] [blame] | 1086 | .help = "Time window over which to calculate bandwidth" |
| 1087 | " (msec)", |
Jens Axboe | 214e1ec | 2007-03-15 10:48:13 +0100 | [diff] [blame] | 1088 | .def = "500", |
| 1089 | }, |
| 1090 | { |
| 1091 | .name = "create_serialize", |
| 1092 | .type = FIO_OPT_BOOL, |
| 1093 | .off1 = td_var_offset(create_serialize), |
| 1094 | .help = "Serialize creating of job files", |
| 1095 | .def = "1", |
| 1096 | }, |
| 1097 | { |
| 1098 | .name = "create_fsync", |
| 1099 | .type = FIO_OPT_BOOL, |
| 1100 | .off1 = td_var_offset(create_fsync), |
| 1101 | .help = "Fsync file after creation", |
| 1102 | .def = "1", |
| 1103 | }, |
| 1104 | { |
| 1105 | .name = "cpuload", |
| 1106 | .type = FIO_OPT_INT, |
| 1107 | .off1 = td_var_offset(cpuload), |
| 1108 | .help = "Use this percentage of CPU", |
| 1109 | }, |
| 1110 | { |
| 1111 | .name = "cpuchunks", |
| 1112 | .type = FIO_OPT_INT, |
| 1113 | .off1 = td_var_offset(cpucycle), |
| 1114 | .help = "Length of the CPU burn cycles (usecs)", |
| 1115 | .def = "50000", |
Jens Axboe | 67a1000 | 2007-07-31 23:12:16 +0200 | [diff] [blame] | 1116 | .parent = "cpuload", |
Jens Axboe | 214e1ec | 2007-03-15 10:48:13 +0100 | [diff] [blame] | 1117 | }, |
| 1118 | #ifdef FIO_HAVE_CPU_AFFINITY |
| 1119 | { |
| 1120 | .name = "cpumask", |
| 1121 | .type = FIO_OPT_INT, |
| 1122 | .cb = str_cpumask_cb, |
| 1123 | .help = "CPU affinity mask", |
| 1124 | }, |
Jens Axboe | d2e268b | 2007-06-15 10:33:49 +0200 | [diff] [blame] | 1125 | { |
| 1126 | .name = "cpus_allowed", |
| 1127 | .type = FIO_OPT_STR, |
| 1128 | .cb = str_cpus_allowed_cb, |
| 1129 | .help = "Set CPUs allowed", |
| 1130 | }, |
Jens Axboe | 214e1ec | 2007-03-15 10:48:13 +0100 | [diff] [blame] | 1131 | #endif |
| 1132 | { |
| 1133 | .name = "end_fsync", |
| 1134 | .type = FIO_OPT_BOOL, |
| 1135 | .off1 = td_var_offset(end_fsync), |
| 1136 | .help = "Include fsync at the end of job", |
| 1137 | .def = "0", |
| 1138 | }, |
| 1139 | { |
| 1140 | .name = "fsync_on_close", |
| 1141 | .type = FIO_OPT_BOOL, |
| 1142 | .off1 = td_var_offset(fsync_on_close), |
| 1143 | .help = "fsync files on close", |
| 1144 | .def = "0", |
| 1145 | }, |
| 1146 | { |
| 1147 | .name = "unlink", |
| 1148 | .type = FIO_OPT_BOOL, |
| 1149 | .off1 = td_var_offset(unlink), |
| 1150 | .help = "Unlink created files after job has completed", |
| 1151 | .def = "0", |
| 1152 | }, |
| 1153 | { |
| 1154 | .name = "exitall", |
| 1155 | .type = FIO_OPT_STR_SET, |
| 1156 | .cb = str_exitall_cb, |
| 1157 | .help = "Terminate all jobs when one exits", |
| 1158 | }, |
| 1159 | { |
| 1160 | .name = "stonewall", |
| 1161 | .type = FIO_OPT_STR_SET, |
| 1162 | .off1 = td_var_offset(stonewall), |
| 1163 | .help = "Insert a hard barrier between this job and previous", |
| 1164 | }, |
| 1165 | { |
Jens Axboe | b3d62a7 | 2007-03-20 14:23:26 +0100 | [diff] [blame] | 1166 | .name = "new_group", |
| 1167 | .type = FIO_OPT_STR_SET, |
| 1168 | .off1 = td_var_offset(new_group), |
| 1169 | .help = "Mark the start of a new group (for reporting)", |
| 1170 | }, |
| 1171 | { |
Jens Axboe | 214e1ec | 2007-03-15 10:48:13 +0100 | [diff] [blame] | 1172 | .name = "thread", |
| 1173 | .type = FIO_OPT_STR_SET, |
| 1174 | .off1 = td_var_offset(use_thread), |
| 1175 | .help = "Use threads instead of forks", |
| 1176 | }, |
| 1177 | { |
| 1178 | .name = "write_bw_log", |
| 1179 | .type = FIO_OPT_STR_SET, |
| 1180 | .off1 = td_var_offset(write_bw_log), |
| 1181 | .help = "Write log of bandwidth during run", |
| 1182 | }, |
| 1183 | { |
| 1184 | .name = "write_lat_log", |
| 1185 | .type = FIO_OPT_STR_SET, |
| 1186 | .off1 = td_var_offset(write_lat_log), |
| 1187 | .help = "Write log of latency during run", |
| 1188 | }, |
| 1189 | { |
| 1190 | .name = "hugepage-size", |
Aaron Carroll | 357f618 | 2008-02-20 09:14:13 +0100 | [diff] [blame] | 1191 | .type = FIO_OPT_STR_VAL_INT, |
Jens Axboe | 214e1ec | 2007-03-15 10:48:13 +0100 | [diff] [blame] | 1192 | .off1 = td_var_offset(hugepage_size), |
| 1193 | .help = "When using hugepages, specify size of each page", |
| 1194 | .def = __stringify(FIO_HUGE_PAGE), |
| 1195 | }, |
| 1196 | { |
| 1197 | .name = "group_reporting", |
| 1198 | .type = FIO_OPT_STR_SET, |
| 1199 | .off1 = td_var_offset(group_reporting), |
| 1200 | .help = "Do reporting on a per-group basis", |
| 1201 | }, |
| 1202 | { |
Jens Axboe | e9459e5 | 2007-04-17 15:46:32 +0200 | [diff] [blame] | 1203 | .name = "zero_buffers", |
| 1204 | .type = FIO_OPT_STR_SET, |
| 1205 | .off1 = td_var_offset(zero_buffers), |
| 1206 | .help = "Init IO buffers to all zeroes", |
| 1207 | }, |
Jens Axboe | 0a839f3 | 2007-04-26 09:02:34 +0200 | [diff] [blame] | 1208 | #ifdef FIO_HAVE_DISK_UTIL |
| 1209 | { |
| 1210 | .name = "disk_util", |
| 1211 | .type = FIO_OPT_BOOL, |
| 1212 | .off1 = td_var_offset(do_disk_util), |
| 1213 | .help = "Log disk utilization stats", |
| 1214 | .def = "1", |
| 1215 | }, |
| 1216 | #endif |
Jens Axboe | e9459e5 | 2007-04-17 15:46:32 +0200 | [diff] [blame] | 1217 | { |
Jens Axboe | 214e1ec | 2007-03-15 10:48:13 +0100 | [diff] [blame] | 1218 | .name = NULL, |
| 1219 | }, |
| 1220 | }; |
| 1221 | |
| 1222 | void fio_options_dup_and_init(struct option *long_options) |
| 1223 | { |
| 1224 | struct fio_option *o; |
| 1225 | unsigned int i; |
| 1226 | |
| 1227 | options_init(options); |
| 1228 | |
| 1229 | i = 0; |
| 1230 | while (long_options[i].name) |
| 1231 | i++; |
| 1232 | |
| 1233 | o = &options[0]; |
| 1234 | while (o->name) { |
| 1235 | long_options[i].name = o->name; |
| 1236 | long_options[i].val = FIO_GETOPT_JOB; |
| 1237 | if (o->type == FIO_OPT_STR_SET) |
| 1238 | long_options[i].has_arg = no_argument; |
| 1239 | else |
| 1240 | long_options[i].has_arg = required_argument; |
| 1241 | |
| 1242 | i++; |
| 1243 | o++; |
| 1244 | assert(i < FIO_NR_OPTIONS); |
| 1245 | } |
| 1246 | } |
| 1247 | |
| 1248 | int fio_option_parse(struct thread_data *td, const char *opt) |
| 1249 | { |
| 1250 | return parse_option(opt, options, td); |
| 1251 | } |
| 1252 | |
| 1253 | int fio_cmd_option_parse(struct thread_data *td, const char *opt, char *val) |
| 1254 | { |
| 1255 | return parse_cmd_option(opt, val, options, td); |
| 1256 | } |
| 1257 | |
| 1258 | void fio_fill_default_options(struct thread_data *td) |
| 1259 | { |
| 1260 | fill_default_options(td, options); |
| 1261 | } |
| 1262 | |
| 1263 | int fio_show_option_help(const char *opt) |
| 1264 | { |
| 1265 | return show_cmd_help(options, opt); |
| 1266 | } |
Jens Axboe | d23bb32 | 2007-03-23 15:57:56 +0100 | [diff] [blame] | 1267 | |
| 1268 | static void __options_mem(struct thread_data *td, int alloc) |
| 1269 | { |
| 1270 | struct thread_options *o = &td->o; |
| 1271 | struct fio_option *opt; |
| 1272 | char **ptr; |
| 1273 | int i; |
| 1274 | |
| 1275 | for (i = 0, opt = &options[0]; opt->name; i++, opt = &options[i]) { |
| 1276 | if (opt->type != FIO_OPT_STR_STORE) |
| 1277 | continue; |
| 1278 | |
| 1279 | ptr = (void *) o + opt->off1; |
| 1280 | if (*ptr) { |
| 1281 | if (alloc) |
| 1282 | *ptr = strdup(*ptr); |
| 1283 | else { |
| 1284 | free(*ptr); |
| 1285 | *ptr = NULL; |
| 1286 | } |
| 1287 | } |
| 1288 | } |
| 1289 | } |
| 1290 | |
| 1291 | /* |
| 1292 | * dupe FIO_OPT_STR_STORE options |
| 1293 | */ |
| 1294 | void options_mem_dupe(struct thread_data *td) |
| 1295 | { |
| 1296 | __options_mem(td, 1); |
| 1297 | } |
| 1298 | |
Jens Axboe | 22d6621 | 2007-03-27 20:06:25 +0200 | [diff] [blame] | 1299 | void options_mem_free(struct thread_data fio_unused *td) |
Jens Axboe | d23bb32 | 2007-03-23 15:57:56 +0100 | [diff] [blame] | 1300 | { |
Jens Axboe | 22d6621 | 2007-03-27 20:06:25 +0200 | [diff] [blame] | 1301 | #if 0 |
Jens Axboe | d23bb32 | 2007-03-23 15:57:56 +0100 | [diff] [blame] | 1302 | __options_mem(td, 0); |
Jens Axboe | 22d6621 | 2007-03-27 20:06:25 +0200 | [diff] [blame] | 1303 | #endif |
Jens Axboe | d23bb32 | 2007-03-23 15:57:56 +0100 | [diff] [blame] | 1304 | } |