blob: 1e99810e19e8de94fd51a8562842ae42aff4457e [file] [log] [blame]
Jens Axboe214e1ec2007-03-15 10:48:13 +01001#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>
8
9#include "fio.h"
10#include "parse.h"
Jens Axboe90059d62007-07-30 09:33:12 +020011#include "fls.h"
Jens Axboe214e1ec2007-03-15 10:48:13 +010012
Jens Axboe2dc1bbe2007-03-15 15:01:33 +010013#define td_var_offset(var) ((size_t) &((struct thread_options *)0)->var)
Jens Axboe214e1ec2007-03-15 10:48:13 +010014
15/*
16 * Check if mmap/mmaphuge has a :/foo/bar/file at the end. If so, return that.
17 */
18static char *get_opt_postfix(const char *str)
19{
20 char *p = strstr(str, ":");
21
22 if (!p)
23 return NULL;
24
25 p++;
26 strip_blank_front(&p);
27 strip_blank_end(p);
28 return strdup(p);
29}
30
Jens Axboe564ca972007-12-14 12:21:19 +010031static int bs_cmp(const void *p1, const void *p2)
32{
33 const struct bssplit *bsp1 = p1;
34 const struct bssplit *bsp2 = p2;
35
36 return bsp1->perc < bsp2->perc;
37}
38
39static int str_bssplit_cb(void *data, const char *input)
40{
41 struct thread_data *td = data;
42 char *fname, *str, *p;
43 unsigned int i, perc, perc_missing;
44 unsigned int max_bs, min_bs;
45 long long val;
46
47 p = str = strdup(input);
48
49 strip_blank_front(&str);
50 strip_blank_end(str);
51
52 td->o.bssplit_nr = 4;
53 td->o.bssplit = malloc(4 * sizeof(struct bssplit));
54
55 i = 0;
56 max_bs = 0;
57 min_bs = -1;
58 while ((fname = strsep(&str, ":")) != NULL) {
59 char *perc_str;
60
61 if (!strlen(fname))
62 break;
63
64 /*
65 * grow struct buffer, if needed
66 */
67 if (i == td->o.bssplit_nr) {
68 td->o.bssplit_nr <<= 1;
69 td->o.bssplit = realloc(td->o.bssplit, td->o.bssplit_nr * sizeof(struct bssplit));
70 }
71
72 perc_str = strstr(fname, "/");
73 if (perc_str) {
74 *perc_str = '\0';
75 perc_str++;
76 perc = atoi(perc_str);
77 if (perc > 100)
78 perc = 100;
79 else if (!perc)
80 perc = -1;
81 } else
82 perc = -1;
83
84 if (str_to_decimal(fname, &val, 1)) {
85 log_err("fio: bssplit conversion failed\n");
86 free(td->o.bssplit);
87 return 1;
88 }
89
90 if (val > max_bs)
91 max_bs = val;
92 if (val < min_bs)
93 min_bs = val;
94
95 td->o.bssplit[i].bs = val;
96 td->o.bssplit[i].perc = perc;
97 i++;
98 }
99
100 td->o.bssplit_nr = i;
101
102 /*
103 * Now check if the percentages add up, and how much is missing
104 */
105 perc = perc_missing = 0;
106 for (i = 0; i < td->o.bssplit_nr; i++) {
107 struct bssplit *bsp = &td->o.bssplit[i];
108
109 if (bsp->perc == (unsigned char) -1)
110 perc_missing++;
111 else
112 perc += bsp->perc;
113 }
114
115 if (perc > 100) {
116 log_err("fio: bssplit percentages add to more than 100%%\n");
117 free(td->o.bssplit);
118 return 1;
119 }
120 /*
121 * If values didn't have a percentage set, divide the remains between
122 * them.
123 */
124 if (perc_missing) {
125 for (i = 0; i < td->o.bssplit_nr; i++) {
126 struct bssplit *bsp = &td->o.bssplit[i];
127
128 if (bsp->perc == (unsigned char) -1)
129 bsp->perc = (100 - perc) / perc_missing;
130 }
131 }
132
133 td->o.min_bs[DDIR_READ] = td->o.min_bs[DDIR_WRITE] = min_bs;
134 td->o.max_bs[DDIR_READ] = td->o.max_bs[DDIR_WRITE] = max_bs;
135
136 /*
137 * now sort based on percentages, for ease of lookup
138 */
139 qsort(td->o.bssplit, td->o.bssplit_nr, sizeof(struct bssplit), bs_cmp);
140
141 free(p);
142 return 0;
143}
144
Jens Axboe211097b2007-03-22 18:56:45 +0100145static int str_rw_cb(void *data, const char *str)
146{
147 struct thread_data *td = data;
148 char *nr = get_opt_postfix(str);
149
Jens Axboefafdba32007-03-26 10:09:12 +0200150 td->o.ddir_nr = 1;
Jens Axboe211097b2007-03-22 18:56:45 +0100151 if (nr)
152 td->o.ddir_nr = atoi(nr);
153
Jens Axboe211097b2007-03-22 18:56:45 +0100154 return 0;
155}
156
Jens Axboe214e1ec2007-03-15 10:48:13 +0100157static int str_mem_cb(void *data, const char *mem)
158{
159 struct thread_data *td = data;
160
Jens Axboe2dc1bbe2007-03-15 15:01:33 +0100161 if (td->o.mem_type == MEM_MMAPHUGE || td->o.mem_type == MEM_MMAP) {
Jens Axboe214e1ec2007-03-15 10:48:13 +0100162 td->mmapfile = get_opt_postfix(mem);
Jens Axboe2dc1bbe2007-03-15 15:01:33 +0100163 if (td->o.mem_type == MEM_MMAPHUGE && !td->mmapfile) {
Jens Axboe214e1ec2007-03-15 10:48:13 +0100164 log_err("fio: mmaphuge:/path/to/file\n");
165 return 1;
166 }
167 }
168
169 return 0;
170}
171
172static int str_lockmem_cb(void fio_unused *data, unsigned long *val)
173{
174 mlock_size = *val;
175 return 0;
176}
177
178#ifdef FIO_HAVE_IOPRIO
179static int str_prioclass_cb(void *data, unsigned int *val)
180{
181 struct thread_data *td = data;
Jens Axboe6cefbe32007-04-18 12:46:56 +0200182 unsigned short mask;
183
184 /*
185 * mask off old class bits, str_prio_cb() may have set a default class
186 */
187 mask = (1 << IOPRIO_CLASS_SHIFT) - 1;
188 td->ioprio &= mask;
Jens Axboe214e1ec2007-03-15 10:48:13 +0100189
190 td->ioprio |= *val << IOPRIO_CLASS_SHIFT;
Jens Axboeac684782007-11-08 08:29:07 +0100191 td->ioprio_set = 1;
Jens Axboe214e1ec2007-03-15 10:48:13 +0100192 return 0;
193}
194
195static int str_prio_cb(void *data, unsigned int *val)
196{
197 struct thread_data *td = data;
198
199 td->ioprio |= *val;
Jens Axboe6cefbe32007-04-18 12:46:56 +0200200
201 /*
202 * If no class is set, assume BE
203 */
204 if ((td->ioprio >> IOPRIO_CLASS_SHIFT) == 0)
205 td->ioprio |= IOPRIO_CLASS_BE << IOPRIO_CLASS_SHIFT;
206
Jens Axboeac684782007-11-08 08:29:07 +0100207 td->ioprio_set = 1;
Jens Axboe214e1ec2007-03-15 10:48:13 +0100208 return 0;
209}
210#endif
211
212static int str_exitall_cb(void)
213{
214 exitall_on_terminate = 1;
215 return 0;
216}
217
Jens Axboe214e1ec2007-03-15 10:48:13 +0100218#ifdef FIO_HAVE_CPU_AFFINITY
Jens Axboe214e1ec2007-03-15 10:48:13 +0100219static int str_cpumask_cb(void *data, unsigned int *val)
220{
221 struct thread_data *td = data;
Jens Axboed2e268b2007-06-15 10:33:49 +0200222 unsigned int i;
Jens Axboe214e1ec2007-03-15 10:48:13 +0100223
Jens Axboed2e268b2007-06-15 10:33:49 +0200224 CPU_ZERO(&td->o.cpumask);
225
226 for (i = 0; i < sizeof(int) * 8; i++)
227 if ((1 << i) & *val)
228 CPU_SET(*val, &td->o.cpumask);
229
Jens Axboe375b2692007-05-22 09:13:02 +0200230 td->o.cpumask_set = 1;
Jens Axboe214e1ec2007-03-15 10:48:13 +0100231 return 0;
232}
233
Jens Axboed2e268b2007-06-15 10:33:49 +0200234static int str_cpus_allowed_cb(void *data, const char *input)
235{
236 struct thread_data *td = data;
237 char *cpu, *str, *p;
238
239 CPU_ZERO(&td->o.cpumask);
240
241 p = str = strdup(input);
242
243 strip_blank_front(&str);
244 strip_blank_end(str);
245
246 while ((cpu = strsep(&str, ",")) != NULL) {
247 if (!strlen(cpu))
248 break;
249 CPU_SET(atoi(cpu), &td->o.cpumask);
250 }
251
252 free(p);
253 td->o.cpumask_set = 1;
254 exit(0);
255 return 0;
256}
257#endif
258
Jens Axboe214e1ec2007-03-15 10:48:13 +0100259static int str_fst_cb(void *data, const char *str)
260{
261 struct thread_data *td = data;
262 char *nr = get_opt_postfix(str);
263
264 td->file_service_nr = 1;
265 if (nr)
266 td->file_service_nr = atoi(nr);
267
268 return 0;
269}
270
271static int str_filename_cb(void *data, const char *input)
272{
273 struct thread_data *td = data;
274 char *fname, *str, *p;
275
276 p = str = strdup(input);
277
278 strip_blank_front(&str);
279 strip_blank_end(str);
280
281 if (!td->files_index)
Jens Axboe2dc1bbe2007-03-15 15:01:33 +0100282 td->o.nr_files = 0;
Jens Axboe214e1ec2007-03-15 10:48:13 +0100283
284 while ((fname = strsep(&str, ":")) != NULL) {
285 if (!strlen(fname))
286 break;
287 add_file(td, fname);
Jens Axboe2dc1bbe2007-03-15 15:01:33 +0100288 td->o.nr_files++;
Jens Axboe214e1ec2007-03-15 10:48:13 +0100289 }
290
291 free(p);
292 return 0;
293}
294
295static int str_directory_cb(void *data, const char fio_unused *str)
296{
297 struct thread_data *td = data;
298 struct stat sb;
299
Jens Axboe2dc1bbe2007-03-15 15:01:33 +0100300 if (lstat(td->o.directory, &sb) < 0) {
301 log_err("fio: %s is not a directory\n", td->o.directory);
Jens Axboe214e1ec2007-03-15 10:48:13 +0100302 td_verror(td, errno, "lstat");
303 return 1;
304 }
305 if (!S_ISDIR(sb.st_mode)) {
Jens Axboe2dc1bbe2007-03-15 15:01:33 +0100306 log_err("fio: %s is not a directory\n", td->o.directory);
Jens Axboe214e1ec2007-03-15 10:48:13 +0100307 return 1;
308 }
309
310 return 0;
311}
312
313static int str_opendir_cb(void *data, const char fio_unused *str)
314{
315 struct thread_data *td = data;
316
317 if (!td->files_index)
Jens Axboe2dc1bbe2007-03-15 15:01:33 +0100318 td->o.nr_files = 0;
Jens Axboe214e1ec2007-03-15 10:48:13 +0100319
Jens Axboe2dc1bbe2007-03-15 15:01:33 +0100320 return add_dir_files(td, td->o.opendir);
Jens Axboe214e1ec2007-03-15 10:48:13 +0100321}
322
Jens Axboea59e1702007-07-30 08:53:27 +0200323static int str_verify_offset_cb(void *data, unsigned int *off)
Shawn Lewis546a9142007-07-28 21:11:37 +0200324{
325 struct thread_data *td = data;
Jens Axboea59e1702007-07-30 08:53:27 +0200326
Shawn Lewis546a9142007-07-28 21:11:37 +0200327 if (*off && *off < sizeof(struct verify_header)) {
Jens Axboea59e1702007-07-30 08:53:27 +0200328 log_err("fio: verify_offset too small\n");
Shawn Lewis546a9142007-07-28 21:11:37 +0200329 return 1;
330 }
Jens Axboea59e1702007-07-30 08:53:27 +0200331
332 td->o.verify_offset = *off;
Shawn Lewis546a9142007-07-28 21:11:37 +0200333 return 0;
334}
335
Shawn Lewise28218f2008-01-16 11:01:33 +0100336static int str_verify_pattern_cb(void *data, unsigned int *off)
Jens Axboe90059d62007-07-30 09:33:12 +0200337{
338 struct thread_data *td = data;
Shawn Lewise28218f2008-01-16 11:01:33 +0100339 unsigned int msb;
Jens Axboe90059d62007-07-30 09:33:12 +0200340
Shawn Lewise28218f2008-01-16 11:01:33 +0100341 msb = fls(*off);
Jens Axboe90059d62007-07-30 09:33:12 +0200342 if (msb <= 8)
343 td->o.verify_pattern_bytes = 1;
344 else if (msb <= 16)
345 td->o.verify_pattern_bytes = 2;
346 else if (msb <= 24)
347 td->o.verify_pattern_bytes = 3;
348 else
349 td->o.verify_pattern_bytes = 4;
350
Shawn Lewise28218f2008-01-16 11:01:33 +0100351 td->o.verify_pattern = *off;
Jens Axboe90059d62007-07-30 09:33:12 +0200352 return 0;
353}
Jens Axboe214e1ec2007-03-15 10:48:13 +0100354
355#define __stringify_1(x) #x
356#define __stringify(x) __stringify_1(x)
357
358/*
359 * Map of job/command line options
360 */
361static struct fio_option options[] = {
362 {
363 .name = "description",
364 .type = FIO_OPT_STR_STORE,
365 .off1 = td_var_offset(description),
366 .help = "Text job description",
367 },
368 {
369 .name = "name",
370 .type = FIO_OPT_STR_STORE,
371 .off1 = td_var_offset(name),
372 .help = "Name of this job",
373 },
374 {
375 .name = "directory",
376 .type = FIO_OPT_STR_STORE,
377 .off1 = td_var_offset(directory),
378 .cb = str_directory_cb,
379 .help = "Directory to store files in",
380 },
381 {
382 .name = "filename",
383 .type = FIO_OPT_STR_STORE,
384 .off1 = td_var_offset(filename),
385 .cb = str_filename_cb,
386 .help = "File(s) to use for the workload",
387 },
388 {
389 .name = "opendir",
390 .type = FIO_OPT_STR_STORE,
391 .off1 = td_var_offset(opendir),
392 .cb = str_opendir_cb,
393 .help = "Recursively add files from this directory and down",
394 },
395 {
396 .name = "rw",
Jens Axboed3aad8f2007-03-15 14:12:05 +0100397 .alias = "readwrite",
Jens Axboe214e1ec2007-03-15 10:48:13 +0100398 .type = FIO_OPT_STR,
Jens Axboe211097b2007-03-22 18:56:45 +0100399 .cb = str_rw_cb,
Jens Axboe214e1ec2007-03-15 10:48:13 +0100400 .off1 = td_var_offset(td_ddir),
401 .help = "IO direction",
402 .def = "read",
403 .posval = {
404 { .ival = "read",
405 .oval = TD_DDIR_READ,
406 .help = "Sequential read",
407 },
408 { .ival = "write",
409 .oval = TD_DDIR_WRITE,
410 .help = "Sequential write",
411 },
412 { .ival = "randread",
413 .oval = TD_DDIR_RANDREAD,
414 .help = "Random read",
415 },
416 { .ival = "randwrite",
417 .oval = TD_DDIR_RANDWRITE,
418 .help = "Random write",
419 },
420 { .ival = "rw",
421 .oval = TD_DDIR_RW,
422 .help = "Sequential read and write mix",
423 },
424 { .ival = "randrw",
425 .oval = TD_DDIR_RANDRW,
426 .help = "Random read and write mix"
427 },
428 },
429 },
430 {
431 .name = "ioengine",
432 .type = FIO_OPT_STR_STORE,
433 .off1 = td_var_offset(ioengine),
434 .help = "IO engine to use",
435 .def = "sync",
436 .posval = {
437 { .ival = "sync",
438 .help = "Use read/write",
439 },
gurudas paia31041e2007-10-23 15:12:30 +0200440 { .ival = "psync",
441 .help = "Use pread/pwrite",
442 },
Jens Axboe1d2af022008-02-04 10:59:07 +0100443 { .ival = "vsync",
444 .help = "Use readv/writev",
445 },
Jens Axboe214e1ec2007-03-15 10:48:13 +0100446#ifdef FIO_HAVE_LIBAIO
447 { .ival = "libaio",
448 .help = "Linux native asynchronous IO",
449 },
450#endif
451#ifdef FIO_HAVE_POSIXAIO
452 { .ival = "posixaio",
453 .help = "POSIX asynchronous IO",
454 },
455#endif
456 { .ival = "mmap",
457 .help = "Memory mapped IO",
458 },
459#ifdef FIO_HAVE_SPLICE
460 { .ival = "splice",
461 .help = "splice/vmsplice based IO",
462 },
Jens Axboe9cce02e2007-06-22 15:42:21 +0200463 { .ival = "netsplice",
464 .help = "splice/vmsplice to/from the network",
465 },
Jens Axboe214e1ec2007-03-15 10:48:13 +0100466#endif
467#ifdef FIO_HAVE_SGIO
468 { .ival = "sg",
469 .help = "SCSI generic v3 IO",
470 },
471#endif
472 { .ival = "null",
473 .help = "Testing engine (no data transfer)",
474 },
475 { .ival = "net",
476 .help = "Network IO",
477 },
478#ifdef FIO_HAVE_SYSLET
479 { .ival = "syslet-rw",
480 .help = "syslet enabled async pread/pwrite IO",
481 },
482#endif
483 { .ival = "cpuio",
484 .help = "CPU cycler burner engine",
485 },
Jens Axboeb8c82a42007-03-21 08:48:26 +0100486#ifdef FIO_HAVE_GUASI
487 { .ival = "guasi",
488 .help = "GUASI IO engine",
489 },
490#endif
Jens Axboe214e1ec2007-03-15 10:48:13 +0100491 { .ival = "external",
492 .help = "Load external engine (append name)",
493 },
494 },
495 },
496 {
497 .name = "iodepth",
498 .type = FIO_OPT_INT,
499 .off1 = td_var_offset(iodepth),
500 .help = "Amount of IO buffers to keep in flight",
Jens Axboe757aff42007-12-12 19:42:13 +0100501 .minval = 1,
Jens Axboe214e1ec2007-03-15 10:48:13 +0100502 .def = "1",
503 },
504 {
505 .name = "iodepth_batch",
506 .type = FIO_OPT_INT,
507 .off1 = td_var_offset(iodepth_batch),
508 .help = "Number of IO to submit in one go",
Jens Axboeafdf9352007-07-31 16:14:34 +0200509 .parent = "iodepth",
Jens Axboea2e6f8a2008-01-18 10:28:11 +0100510 .minval = 1,
511 .def = "1",
Jens Axboe214e1ec2007-03-15 10:48:13 +0100512 },
513 {
514 .name = "iodepth_low",
515 .type = FIO_OPT_INT,
516 .off1 = td_var_offset(iodepth_low),
517 .help = "Low water mark for queuing depth",
Jens Axboeafdf9352007-07-31 16:14:34 +0200518 .parent = "iodepth",
Jens Axboe214e1ec2007-03-15 10:48:13 +0100519 },
520 {
521 .name = "size",
522 .type = FIO_OPT_STR_VAL,
Jens Axboe2dc1bbe2007-03-15 15:01:33 +0100523 .off1 = td_var_offset(size),
Jens Axboec3edbdb2007-07-20 14:25:31 +0200524 .minval = 1,
Jens Axboe214e1ec2007-03-15 10:48:13 +0100525 .help = "Total size of device or files",
526 },
527 {
Shawn Lewisaa31f1f2008-01-11 09:45:11 +0100528 .name = "fill_device",
529 .type = FIO_OPT_BOOL,
530 .off1 = td_var_offset(fill_device),
531 .help = "Write until an ENOSPC error occurs",
532 .def = "0",
533 },
534 {
Jens Axboe214e1ec2007-03-15 10:48:13 +0100535 .name = "filesize",
536 .type = FIO_OPT_STR_VAL,
537 .off1 = td_var_offset(file_size_low),
538 .off2 = td_var_offset(file_size_high),
Jens Axboec3edbdb2007-07-20 14:25:31 +0200539 .minval = 1,
Jens Axboe214e1ec2007-03-15 10:48:13 +0100540 .help = "Size of individual files",
541 },
542 {
Jens Axboe67a10002007-07-31 23:12:16 +0200543 .name = "offset",
544 .alias = "fileoffset",
545 .type = FIO_OPT_STR_VAL,
546 .off1 = td_var_offset(start_offset),
547 .help = "Start IO from this offset",
548 .def = "0",
549 },
550 {
Jens Axboe214e1ec2007-03-15 10:48:13 +0100551 .name = "bs",
Jens Axboed3aad8f2007-03-15 14:12:05 +0100552 .alias = "blocksize",
Jens Axboe214e1ec2007-03-15 10:48:13 +0100553 .type = FIO_OPT_STR_VAL_INT,
554 .off1 = td_var_offset(bs[DDIR_READ]),
555 .off2 = td_var_offset(bs[DDIR_WRITE]),
Jens Axboec3edbdb2007-07-20 14:25:31 +0200556 .minval = 1,
Jens Axboe214e1ec2007-03-15 10:48:13 +0100557 .help = "Block size unit",
558 .def = "4k",
Jens Axboe67a10002007-07-31 23:12:16 +0200559 .parent = "rw",
Jens Axboe214e1ec2007-03-15 10:48:13 +0100560 },
561 {
562 .name = "bsrange",
Jens Axboed3aad8f2007-03-15 14:12:05 +0100563 .alias = "blocksize_range",
Jens Axboe214e1ec2007-03-15 10:48:13 +0100564 .type = FIO_OPT_RANGE,
565 .off1 = td_var_offset(min_bs[DDIR_READ]),
566 .off2 = td_var_offset(max_bs[DDIR_READ]),
567 .off3 = td_var_offset(min_bs[DDIR_WRITE]),
568 .off4 = td_var_offset(max_bs[DDIR_WRITE]),
Jens Axboec3edbdb2007-07-20 14:25:31 +0200569 .minval = 1,
Jens Axboe214e1ec2007-03-15 10:48:13 +0100570 .help = "Set block size range (in more detail than bs)",
Jens Axboe67a10002007-07-31 23:12:16 +0200571 .parent = "rw",
Jens Axboe214e1ec2007-03-15 10:48:13 +0100572 },
573 {
Jens Axboe564ca972007-12-14 12:21:19 +0100574 .name = "bssplit",
575 .type = FIO_OPT_STR,
576 .cb = str_bssplit_cb,
577 .help = "Set a specific mix of block sizes",
578 .parent = "rw",
579 },
580 {
Jens Axboe214e1ec2007-03-15 10:48:13 +0100581 .name = "bs_unaligned",
Jens Axboed3aad8f2007-03-15 14:12:05 +0100582 .alias = "blocksize_unaligned",
Jens Axboe214e1ec2007-03-15 10:48:13 +0100583 .type = FIO_OPT_STR_SET,
584 .off1 = td_var_offset(bs_unaligned),
585 .help = "Don't sector align IO buffer sizes",
Jens Axboe67a10002007-07-31 23:12:16 +0200586 .parent = "rw",
Jens Axboe214e1ec2007-03-15 10:48:13 +0100587 },
588 {
589 .name = "randrepeat",
590 .type = FIO_OPT_BOOL,
591 .off1 = td_var_offset(rand_repeatable),
592 .help = "Use repeatable random IO pattern",
593 .def = "1",
Jens Axboe67a10002007-07-31 23:12:16 +0200594 .parent = "rw",
Jens Axboe214e1ec2007-03-15 10:48:13 +0100595 },
596 {
597 .name = "norandommap",
598 .type = FIO_OPT_STR_SET,
599 .off1 = td_var_offset(norandommap),
600 .help = "Accept potential duplicate random blocks",
Jens Axboe67a10002007-07-31 23:12:16 +0200601 .parent = "rw",
Jens Axboe214e1ec2007-03-15 10:48:13 +0100602 },
603 {
604 .name = "nrfiles",
605 .type = FIO_OPT_INT,
606 .off1 = td_var_offset(nr_files),
607 .help = "Split job workload between this number of files",
608 .def = "1",
609 },
610 {
611 .name = "openfiles",
612 .type = FIO_OPT_INT,
613 .off1 = td_var_offset(open_files),
614 .help = "Number of files to keep open at the same time",
615 },
616 {
617 .name = "file_service_type",
618 .type = FIO_OPT_STR,
619 .cb = str_fst_cb,
620 .off1 = td_var_offset(file_service_type),
621 .help = "How to select which file to service next",
622 .def = "roundrobin",
623 .posval = {
624 { .ival = "random",
625 .oval = FIO_FSERVICE_RANDOM,
626 .help = "Choose a file at random",
627 },
628 { .ival = "roundrobin",
629 .oval = FIO_FSERVICE_RR,
630 .help = "Round robin select files",
631 },
632 },
Jens Axboe67a10002007-07-31 23:12:16 +0200633 .parent = "nrfiles",
634 },
635 {
636 .name = "fadvise_hint",
637 .type = FIO_OPT_BOOL,
638 .off1 = td_var_offset(fadvise_hint),
639 .help = "Use fadvise() to advise the kernel on IO pattern",
640 .def = "1",
Jens Axboe214e1ec2007-03-15 10:48:13 +0100641 },
642 {
643 .name = "fsync",
644 .type = FIO_OPT_INT,
645 .off1 = td_var_offset(fsync_blocks),
646 .help = "Issue fsync for writes every given number of blocks",
647 .def = "0",
648 },
649 {
650 .name = "direct",
651 .type = FIO_OPT_BOOL,
652 .off1 = td_var_offset(odirect),
653 .help = "Use O_DIRECT IO (negates buffered)",
654 .def = "0",
655 },
656 {
657 .name = "buffered",
658 .type = FIO_OPT_BOOL,
659 .off1 = td_var_offset(odirect),
660 .neg = 1,
661 .help = "Use buffered IO (negates direct)",
662 .def = "1",
663 },
664 {
665 .name = "overwrite",
666 .type = FIO_OPT_BOOL,
667 .off1 = td_var_offset(overwrite),
668 .help = "When writing, set whether to overwrite current data",
669 .def = "0",
670 },
671 {
672 .name = "loops",
673 .type = FIO_OPT_INT,
674 .off1 = td_var_offset(loops),
675 .help = "Number of times to run the job",
676 .def = "1",
677 },
678 {
679 .name = "numjobs",
680 .type = FIO_OPT_INT,
681 .off1 = td_var_offset(numjobs),
682 .help = "Duplicate this job this many times",
683 .def = "1",
684 },
685 {
686 .name = "startdelay",
687 .type = FIO_OPT_INT,
688 .off1 = td_var_offset(start_delay),
689 .help = "Only start job when this period has passed",
690 .def = "0",
691 },
692 {
693 .name = "runtime",
694 .alias = "timeout",
695 .type = FIO_OPT_STR_VAL_TIME,
696 .off1 = td_var_offset(timeout),
697 .help = "Stop workload when this amount of time has passed",
698 .def = "0",
699 },
700 {
Jens Axboecf4464c2007-04-17 20:14:42 +0200701 .name = "time_based",
702 .type = FIO_OPT_STR_SET,
703 .off1 = td_var_offset(time_based),
704 .help = "Keep running until runtime/timeout is met",
705 },
706 {
Jens Axboe214e1ec2007-03-15 10:48:13 +0100707 .name = "mem",
Jens Axboed3aad8f2007-03-15 14:12:05 +0100708 .alias = "iomem",
Jens Axboe214e1ec2007-03-15 10:48:13 +0100709 .type = FIO_OPT_STR,
710 .cb = str_mem_cb,
711 .off1 = td_var_offset(mem_type),
712 .help = "Backing type for IO buffers",
713 .def = "malloc",
714 .posval = {
715 { .ival = "malloc",
716 .oval = MEM_MALLOC,
717 .help = "Use malloc(3) for IO buffers",
718 },
Jens Axboeb370e462007-03-19 10:51:49 +0100719 { .ival = "shm",
720 .oval = MEM_SHM,
721 .help = "Use shared memory segments for IO buffers",
Jens Axboe214e1ec2007-03-15 10:48:13 +0100722 },
723#ifdef FIO_HAVE_HUGETLB
Jens Axboe37c8cdf2007-03-19 13:14:03 +0100724 { .ival = "shmhuge",
725 .oval = MEM_SHMHUGE,
726 .help = "Like shm, but use huge pages",
Jens Axboe214e1ec2007-03-15 10:48:13 +0100727 },
728#endif
Jens Axboeb370e462007-03-19 10:51:49 +0100729 { .ival = "mmap",
730 .oval = MEM_MMAP,
731 .help = "Use mmap(2) (file or anon) for IO buffers",
732 },
Jens Axboe37c8cdf2007-03-19 13:14:03 +0100733#ifdef FIO_HAVE_HUGETLB
734 { .ival = "mmaphuge",
735 .oval = MEM_MMAPHUGE,
736 .help = "Like mmap, but use huge pages",
737 },
738#endif
Jens Axboe214e1ec2007-03-15 10:48:13 +0100739 },
740 },
741 {
742 .name = "verify",
743 .type = FIO_OPT_STR,
744 .off1 = td_var_offset(verify),
745 .help = "Verify data written",
746 .def = "0",
747 .posval = {
748 { .ival = "0",
749 .oval = VERIFY_NONE,
750 .help = "Don't do IO verification",
751 },
Jens Axboefcca4b52007-07-27 15:42:00 +0200752 { .ival = "md5",
753 .oval = VERIFY_MD5,
754 .help = "Use md5 checksums for verification",
755 },
Jens Axboed77a7af2007-07-27 15:35:06 +0200756 { .ival = "crc64",
757 .oval = VERIFY_CRC64,
758 .help = "Use crc64 checksums for verification",
759 },
Jens Axboe214e1ec2007-03-15 10:48:13 +0100760 { .ival = "crc32",
761 .oval = VERIFY_CRC32,
762 .help = "Use crc32 checksums for verification",
763 },
Jens Axboe969f7ed2007-07-27 09:07:17 +0200764 { .ival = "crc16",
765 .oval = VERIFY_CRC16,
766 .help = "Use crc16 checksums for verification",
767 },
Jens Axboe1e154bd2007-07-27 09:52:40 +0200768 { .ival = "crc7",
769 .oval = VERIFY_CRC7,
770 .help = "Use crc7 checksums for verification",
771 },
Jens Axboecd14cc12007-07-30 10:59:33 +0200772 { .ival = "sha256",
773 .oval = VERIFY_SHA256,
774 .help = "Use sha256 checksums for verification",
775 },
776 { .ival = "sha512",
777 .oval = VERIFY_SHA512,
778 .help = "Use sha512 checksums for verification",
779 },
Shawn Lewis7437ee82007-08-02 21:05:58 +0200780 { .ival = "meta",
781 .oval = VERIFY_META,
782 .help = "Use io information",
783 },
Jens Axboe36690c92007-03-26 10:23:34 +0200784 {
785 .ival = "null",
786 .oval = VERIFY_NULL,
787 .help = "Pretend to verify",
788 },
Jens Axboe214e1ec2007-03-15 10:48:13 +0100789 },
790 },
791 {
Jens Axboe005c5652007-08-02 22:21:36 +0200792 .name = "do_verify",
Jens Axboe68e1f292007-08-10 10:32:14 +0200793 .type = FIO_OPT_BOOL,
Jens Axboe005c5652007-08-02 22:21:36 +0200794 .off1 = td_var_offset(do_verify),
795 .help = "Run verification stage after write",
796 .def = "1",
797 .parent = "verify",
798 },
799 {
Jens Axboe160b9662007-03-27 10:59:49 +0200800 .name = "verifysort",
801 .type = FIO_OPT_BOOL,
802 .off1 = td_var_offset(verifysort),
803 .help = "Sort written verify blocks for read back",
804 .def = "1",
Jens Axboec83f2df2007-07-31 22:51:47 +0200805 .parent = "verify",
Jens Axboe160b9662007-03-27 10:59:49 +0200806 },
807 {
Jens Axboea59e1702007-07-30 08:53:27 +0200808 .name = "verify_interval",
Shawn Lewis3f9f4e22007-07-28 21:10:37 +0200809 .type = FIO_OPT_STR_VAL_INT,
Jens Axboea59e1702007-07-30 08:53:27 +0200810 .off1 = td_var_offset(verify_interval),
Jens Axboe819a9682007-07-28 21:30:31 +0200811 .minval = 2 * sizeof(struct verify_header),
Jens Axboea59e1702007-07-30 08:53:27 +0200812 .help = "Store verify buffer header every N bytes",
Jens Axboeafdf9352007-07-31 16:14:34 +0200813 .parent = "verify",
Shawn Lewis3f9f4e22007-07-28 21:10:37 +0200814 },
815 {
Jens Axboea59e1702007-07-30 08:53:27 +0200816 .name = "verify_offset",
Shawn Lewis546a9142007-07-28 21:11:37 +0200817 .type = FIO_OPT_STR_VAL_INT,
Jens Axboea59e1702007-07-30 08:53:27 +0200818 .help = "Offset verify header location by N bytes",
Shawn Lewis546a9142007-07-28 21:11:37 +0200819 .def = "0",
Jens Axboea59e1702007-07-30 08:53:27 +0200820 .cb = str_verify_offset_cb,
Jens Axboeafdf9352007-07-31 16:14:34 +0200821 .parent = "verify",
Shawn Lewis546a9142007-07-28 21:11:37 +0200822 },
823 {
Shawn Lewise28218f2008-01-16 11:01:33 +0100824 .name = "verify_pattern",
825 .type = FIO_OPT_INT,
826 .cb = str_verify_pattern_cb,
827 .help = "Fill pattern for IO buffers",
828 .parent = "verify",
829 },
830 {
Jens Axboea12a3b42007-08-09 10:20:54 +0200831 .name = "verify_fatal",
Jens Axboe68e1f292007-08-10 10:32:14 +0200832 .type = FIO_OPT_BOOL,
Jens Axboea12a3b42007-08-09 10:20:54 +0200833 .off1 = td_var_offset(verify_fatal),
834 .def = "0",
835 .help = "Exit on a single verify failure, don't continue",
836 .parent = "verify",
837 },
838 {
Jens Axboe214e1ec2007-03-15 10:48:13 +0100839 .name = "write_iolog",
840 .type = FIO_OPT_STR_STORE,
841 .off1 = td_var_offset(write_iolog_file),
842 .help = "Store IO pattern to file",
843 },
844 {
845 .name = "read_iolog",
846 .type = FIO_OPT_STR_STORE,
847 .off1 = td_var_offset(read_iolog_file),
848 .help = "Playback IO pattern from file",
849 },
850 {
851 .name = "exec_prerun",
852 .type = FIO_OPT_STR_STORE,
853 .off1 = td_var_offset(exec_prerun),
854 .help = "Execute this file prior to running job",
855 },
856 {
857 .name = "exec_postrun",
858 .type = FIO_OPT_STR_STORE,
859 .off1 = td_var_offset(exec_postrun),
860 .help = "Execute this file after running job",
861 },
862#ifdef FIO_HAVE_IOSCHED_SWITCH
863 {
864 .name = "ioscheduler",
865 .type = FIO_OPT_STR_STORE,
866 .off1 = td_var_offset(ioscheduler),
867 .help = "Use this IO scheduler on the backing device",
868 },
869#endif
870 {
871 .name = "zonesize",
872 .type = FIO_OPT_STR_VAL,
873 .off1 = td_var_offset(zone_size),
874 .help = "Give size of an IO zone",
875 .def = "0",
876 },
877 {
878 .name = "zoneskip",
879 .type = FIO_OPT_STR_VAL,
880 .off1 = td_var_offset(zone_skip),
881 .help = "Space between IO zones",
882 .def = "0",
883 },
884 {
885 .name = "lockmem",
886 .type = FIO_OPT_STR_VAL,
887 .cb = str_lockmem_cb,
888 .help = "Lock down this amount of memory",
889 .def = "0",
890 },
891 {
Jens Axboe214e1ec2007-03-15 10:48:13 +0100892 .name = "rwmixread",
893 .type = FIO_OPT_INT,
Jens Axboee47f7992007-03-21 14:05:39 +0100894 .off1 = td_var_offset(rwmix[DDIR_READ]),
Jens Axboe214e1ec2007-03-15 10:48:13 +0100895 .maxval = 100,
896 .help = "Percentage of mixed workload that is reads",
897 .def = "50",
898 },
899 {
900 .name = "rwmixwrite",
901 .type = FIO_OPT_INT,
Jens Axboee47f7992007-03-21 14:05:39 +0100902 .off1 = td_var_offset(rwmix[DDIR_WRITE]),
Jens Axboe214e1ec2007-03-15 10:48:13 +0100903 .maxval = 100,
904 .help = "Percentage of mixed workload that is writes",
905 .def = "50",
906 },
907 {
Jens Axboeafdf9352007-07-31 16:14:34 +0200908 .name = "rwmixcycle",
909 .type = FIO_OPT_INT,
910 .off1 = td_var_offset(rwmixcycle),
911 .help = "Cycle period for mixed read/write workloads (msec)",
912 .def = "500",
913 .parent = "rwmixread",
914 },
915 {
Jens Axboe214e1ec2007-03-15 10:48:13 +0100916 .name = "nice",
917 .type = FIO_OPT_INT,
918 .off1 = td_var_offset(nice),
919 .help = "Set job CPU nice value",
920 .minval = -19,
921 .maxval = 20,
922 .def = "0",
923 },
924#ifdef FIO_HAVE_IOPRIO
925 {
926 .name = "prio",
927 .type = FIO_OPT_INT,
928 .cb = str_prio_cb,
929 .help = "Set job IO priority value",
930 .minval = 0,
931 .maxval = 7,
932 },
933 {
934 .name = "prioclass",
935 .type = FIO_OPT_INT,
936 .cb = str_prioclass_cb,
937 .help = "Set job IO priority class",
938 .minval = 0,
939 .maxval = 3,
940 },
941#endif
942 {
943 .name = "thinktime",
944 .type = FIO_OPT_INT,
945 .off1 = td_var_offset(thinktime),
946 .help = "Idle time between IO buffers (usec)",
947 .def = "0",
948 },
949 {
950 .name = "thinktime_spin",
951 .type = FIO_OPT_INT,
952 .off1 = td_var_offset(thinktime_spin),
953 .help = "Start think time by spinning this amount (usec)",
954 .def = "0",
Jens Axboeafdf9352007-07-31 16:14:34 +0200955 .parent = "thinktime",
Jens Axboe214e1ec2007-03-15 10:48:13 +0100956 },
957 {
958 .name = "thinktime_blocks",
959 .type = FIO_OPT_INT,
960 .off1 = td_var_offset(thinktime_blocks),
961 .help = "IO buffer period between 'thinktime'",
962 .def = "1",
Jens Axboeafdf9352007-07-31 16:14:34 +0200963 .parent = "thinktime",
Jens Axboe214e1ec2007-03-15 10:48:13 +0100964 },
965 {
966 .name = "rate",
967 .type = FIO_OPT_INT,
968 .off1 = td_var_offset(rate),
969 .help = "Set bandwidth rate",
970 },
971 {
972 .name = "ratemin",
973 .type = FIO_OPT_INT,
974 .off1 = td_var_offset(ratemin),
Jens Axboe4e991c22007-03-15 11:41:11 +0100975 .help = "Job must meet this rate or it will be shutdown",
Jens Axboeafdf9352007-07-31 16:14:34 +0200976 .parent = "rate",
Jens Axboe4e991c22007-03-15 11:41:11 +0100977 },
978 {
979 .name = "rate_iops",
980 .type = FIO_OPT_INT,
981 .off1 = td_var_offset(rate_iops),
982 .help = "Limit IO used to this number of IO operations/sec",
983 },
984 {
985 .name = "rate_iops_min",
986 .type = FIO_OPT_INT,
987 .off1 = td_var_offset(rate_iops_min),
988 .help = "Job must meet this rate or it will be shutdown",
Jens Axboeafdf9352007-07-31 16:14:34 +0200989 .parent = "rate_iops",
Jens Axboe214e1ec2007-03-15 10:48:13 +0100990 },
991 {
992 .name = "ratecycle",
993 .type = FIO_OPT_INT,
994 .off1 = td_var_offset(ratecycle),
995 .help = "Window average for rate limits (msec)",
996 .def = "1000",
Jens Axboeafdf9352007-07-31 16:14:34 +0200997 .parent = "rate",
Jens Axboe214e1ec2007-03-15 10:48:13 +0100998 },
999 {
1000 .name = "invalidate",
1001 .type = FIO_OPT_BOOL,
1002 .off1 = td_var_offset(invalidate_cache),
1003 .help = "Invalidate buffer/page cache prior to running job",
1004 .def = "1",
1005 },
1006 {
1007 .name = "sync",
1008 .type = FIO_OPT_BOOL,
1009 .off1 = td_var_offset(sync_io),
1010 .help = "Use O_SYNC for buffered writes",
1011 .def = "0",
Jens Axboe67a10002007-07-31 23:12:16 +02001012 .parent = "buffered",
Jens Axboe214e1ec2007-03-15 10:48:13 +01001013 },
1014 {
1015 .name = "bwavgtime",
1016 .type = FIO_OPT_INT,
1017 .off1 = td_var_offset(bw_avg_time),
1018 .help = "Time window over which to calculate bandwidth (msec)",
1019 .def = "500",
1020 },
1021 {
1022 .name = "create_serialize",
1023 .type = FIO_OPT_BOOL,
1024 .off1 = td_var_offset(create_serialize),
1025 .help = "Serialize creating of job files",
1026 .def = "1",
1027 },
1028 {
1029 .name = "create_fsync",
1030 .type = FIO_OPT_BOOL,
1031 .off1 = td_var_offset(create_fsync),
1032 .help = "Fsync file after creation",
1033 .def = "1",
1034 },
1035 {
1036 .name = "cpuload",
1037 .type = FIO_OPT_INT,
1038 .off1 = td_var_offset(cpuload),
1039 .help = "Use this percentage of CPU",
1040 },
1041 {
1042 .name = "cpuchunks",
1043 .type = FIO_OPT_INT,
1044 .off1 = td_var_offset(cpucycle),
1045 .help = "Length of the CPU burn cycles (usecs)",
1046 .def = "50000",
Jens Axboe67a10002007-07-31 23:12:16 +02001047 .parent = "cpuload",
Jens Axboe214e1ec2007-03-15 10:48:13 +01001048 },
1049#ifdef FIO_HAVE_CPU_AFFINITY
1050 {
1051 .name = "cpumask",
1052 .type = FIO_OPT_INT,
1053 .cb = str_cpumask_cb,
1054 .help = "CPU affinity mask",
1055 },
Jens Axboed2e268b2007-06-15 10:33:49 +02001056 {
1057 .name = "cpus_allowed",
1058 .type = FIO_OPT_STR,
1059 .cb = str_cpus_allowed_cb,
1060 .help = "Set CPUs allowed",
1061 },
Jens Axboe214e1ec2007-03-15 10:48:13 +01001062#endif
1063 {
1064 .name = "end_fsync",
1065 .type = FIO_OPT_BOOL,
1066 .off1 = td_var_offset(end_fsync),
1067 .help = "Include fsync at the end of job",
1068 .def = "0",
1069 },
1070 {
1071 .name = "fsync_on_close",
1072 .type = FIO_OPT_BOOL,
1073 .off1 = td_var_offset(fsync_on_close),
1074 .help = "fsync files on close",
1075 .def = "0",
1076 },
1077 {
1078 .name = "unlink",
1079 .type = FIO_OPT_BOOL,
1080 .off1 = td_var_offset(unlink),
1081 .help = "Unlink created files after job has completed",
1082 .def = "0",
1083 },
1084 {
1085 .name = "exitall",
1086 .type = FIO_OPT_STR_SET,
1087 .cb = str_exitall_cb,
1088 .help = "Terminate all jobs when one exits",
1089 },
1090 {
1091 .name = "stonewall",
1092 .type = FIO_OPT_STR_SET,
1093 .off1 = td_var_offset(stonewall),
1094 .help = "Insert a hard barrier between this job and previous",
1095 },
1096 {
Jens Axboeb3d62a72007-03-20 14:23:26 +01001097 .name = "new_group",
1098 .type = FIO_OPT_STR_SET,
1099 .off1 = td_var_offset(new_group),
1100 .help = "Mark the start of a new group (for reporting)",
1101 },
1102 {
Jens Axboe214e1ec2007-03-15 10:48:13 +01001103 .name = "thread",
1104 .type = FIO_OPT_STR_SET,
1105 .off1 = td_var_offset(use_thread),
1106 .help = "Use threads instead of forks",
1107 },
1108 {
1109 .name = "write_bw_log",
1110 .type = FIO_OPT_STR_SET,
1111 .off1 = td_var_offset(write_bw_log),
1112 .help = "Write log of bandwidth during run",
1113 },
1114 {
1115 .name = "write_lat_log",
1116 .type = FIO_OPT_STR_SET,
1117 .off1 = td_var_offset(write_lat_log),
1118 .help = "Write log of latency during run",
1119 },
1120 {
1121 .name = "hugepage-size",
1122 .type = FIO_OPT_STR_VAL,
1123 .off1 = td_var_offset(hugepage_size),
1124 .help = "When using hugepages, specify size of each page",
1125 .def = __stringify(FIO_HUGE_PAGE),
1126 },
1127 {
1128 .name = "group_reporting",
1129 .type = FIO_OPT_STR_SET,
1130 .off1 = td_var_offset(group_reporting),
1131 .help = "Do reporting on a per-group basis",
1132 },
1133 {
Jens Axboee9459e52007-04-17 15:46:32 +02001134 .name = "zero_buffers",
1135 .type = FIO_OPT_STR_SET,
1136 .off1 = td_var_offset(zero_buffers),
1137 .help = "Init IO buffers to all zeroes",
1138 },
Jens Axboe0a839f32007-04-26 09:02:34 +02001139#ifdef FIO_HAVE_DISK_UTIL
1140 {
1141 .name = "disk_util",
1142 .type = FIO_OPT_BOOL,
1143 .off1 = td_var_offset(do_disk_util),
1144 .help = "Log disk utilization stats",
1145 .def = "1",
1146 },
1147#endif
Jens Axboee9459e52007-04-17 15:46:32 +02001148 {
Jens Axboe214e1ec2007-03-15 10:48:13 +01001149 .name = NULL,
1150 },
1151};
1152
1153void fio_options_dup_and_init(struct option *long_options)
1154{
1155 struct fio_option *o;
1156 unsigned int i;
1157
1158 options_init(options);
1159
1160 i = 0;
1161 while (long_options[i].name)
1162 i++;
1163
1164 o = &options[0];
1165 while (o->name) {
1166 long_options[i].name = o->name;
1167 long_options[i].val = FIO_GETOPT_JOB;
1168 if (o->type == FIO_OPT_STR_SET)
1169 long_options[i].has_arg = no_argument;
1170 else
1171 long_options[i].has_arg = required_argument;
1172
1173 i++;
1174 o++;
1175 assert(i < FIO_NR_OPTIONS);
1176 }
1177}
1178
1179int fio_option_parse(struct thread_data *td, const char *opt)
1180{
1181 return parse_option(opt, options, td);
1182}
1183
1184int fio_cmd_option_parse(struct thread_data *td, const char *opt, char *val)
1185{
1186 return parse_cmd_option(opt, val, options, td);
1187}
1188
1189void fio_fill_default_options(struct thread_data *td)
1190{
1191 fill_default_options(td, options);
1192}
1193
1194int fio_show_option_help(const char *opt)
1195{
1196 return show_cmd_help(options, opt);
1197}
Jens Axboed23bb322007-03-23 15:57:56 +01001198
1199static void __options_mem(struct thread_data *td, int alloc)
1200{
1201 struct thread_options *o = &td->o;
1202 struct fio_option *opt;
1203 char **ptr;
1204 int i;
1205
1206 for (i = 0, opt = &options[0]; opt->name; i++, opt = &options[i]) {
1207 if (opt->type != FIO_OPT_STR_STORE)
1208 continue;
1209
1210 ptr = (void *) o + opt->off1;
1211 if (*ptr) {
1212 if (alloc)
1213 *ptr = strdup(*ptr);
1214 else {
1215 free(*ptr);
1216 *ptr = NULL;
1217 }
1218 }
1219 }
1220}
1221
1222/*
1223 * dupe FIO_OPT_STR_STORE options
1224 */
1225void options_mem_dupe(struct thread_data *td)
1226{
1227 __options_mem(td, 1);
1228}
1229
Jens Axboe22d66212007-03-27 20:06:25 +02001230void options_mem_free(struct thread_data fio_unused *td)
Jens Axboed23bb322007-03-23 15:57:56 +01001231{
Jens Axboe22d66212007-03-27 20:06:25 +02001232#if 0
Jens Axboed23bb322007-03-23 15:57:56 +01001233 __options_mem(td, 0);
Jens Axboe22d66212007-03-27 20:06:25 +02001234#endif
Jens Axboed23bb322007-03-23 15:57:56 +01001235}