Add the file sharing bits
[fio.git] / options.c
index 1e99810e19e8de94fd51a8562842ae42aff4457e..27b4fb65eb1b6158763050badd5821db122f089d 100644 (file)
--- a/options.c
+++ b/options.c
@@ -251,7 +251,6 @@ static int str_cpus_allowed_cb(void *data, const char *input)
 
        free(p);
        td->o.cpumask_set = 1;
-       exit(0);
        return 0;
 }
 #endif
@@ -385,6 +384,22 @@ static struct fio_option options[] = {
                .cb     = str_filename_cb,
                .help   = "File(s) to use for the workload",
        },
+       {
+               .name   = "lockfile",
+               .type   = FIO_OPT_BOOL,
+               .off1   = td_var_offset(lockfile),
+               .help   = "Lock file when doing IO to it",
+               .parent = "filename",
+               .def    = "0",
+       },
+       {
+               .name   = "lockfile_batch",
+               .type   = FIO_OPT_INT,
+               .off1   = td_var_offset(lockfile_batch),
+               .help   = "Number of IOs to allow per file lock",
+               .parent = "lockfile",
+               .def    = "1",
+       },
        {
                .name   = "opendir",
                .type   = FIO_OPT_STR_STORE,
@@ -1119,7 +1134,7 @@ static struct fio_option options[] = {
        },
        {
                .name   = "hugepage-size",
-               .type   = FIO_OPT_STR_VAL,
+               .type   = FIO_OPT_STR_VAL_INT,
                .off1   = td_var_offset(hugepage_size),
                .help   = "When using hugepages, specify size of each page",
                .def    = __stringify(FIO_HUGE_PAGE),