Recent changes (master)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The following changes since commit f01b34ae759afccf39c1bf47972e45d91448e7bb:

  Error out gracefully if we don't find the replay device for log replay (2013-11-21 11:13:12 -0700)

are available in the git repository at:
  git://git.kernel.dk/fio.git master

Bruce Cran (1):
      Windows: add CONFIG_TLS_THREAD=y and swap pthreadGC2 to libwinpthread-1.

Jens Axboe (3):
      init: allow FIO_OPT_STR_SET options to have an optional argument
      init: escape description option string
      Merge branch 'master' of ssh://git.kernel.dk/data/git/fio

 configure              |    1 +
 fio.h                  |    2 +-
 init.c                 |   14 +++++---------
 options.c              |    9 +++++----
 os/windows/install.wxs |    2 +-
 parse.c                |   25 ++++++++++++++++++++-----
 parse.h                |    2 +-
 7 files changed, 34 insertions(+), 21 deletions(-)

---

Diff of recent changes:

diff --git a/configure b/configure
index ef7be01..0f1acd0 100755
--- a/configure
+++ b/configure
@@ -243,6 +243,7 @@ CYGWIN*)
   output_sym "CONFIG_CLOCK_GETTIME"
   output_sym "CONFIG_SCHED_IDLE"
   output_sym "CONFIG_TCP_NODELAY"
+  output_sym "CONFIG_TLS_THREAD"
   echo "CC=$CC" >> $config_host_mak
   echo "BUILD_CFLAGS=$CFLAGS -include config-host.h -D_GNU_SOURCE" >> $config_host_mak
   exit 0
diff --git a/fio.h b/fio.h
index a6dcb4e..d0fe83a 100644
--- a/fio.h
+++ b/fio.h
@@ -406,7 +406,7 @@ extern int parse_cmd_line(int, char **, int);
 extern int fio_backend(void);
 extern void reset_fio_state(void);
 extern void clear_io_state(struct thread_data *);
-extern int fio_options_parse(struct thread_data *, char **, int);
+extern int fio_options_parse(struct thread_data *, char **, int, int);
 extern void fio_keywords_init(void);
 extern int fio_cmd_option_parse(struct thread_data *, const char *, char *);
 extern int fio_cmd_ioengine_option_parse(struct thread_data *, const char *, char *);
diff --git a/init.c b/init.c
index 1841ffc..4dd0c9a 100644
--- a/init.c
+++ b/init.c
@@ -1146,9 +1146,9 @@ void add_job_opts(const char **o, int client_type)
 			td = get_new_job(0, td_parent, 0);
 		}
 		if (in_global)
-			fio_options_parse(td_parent, (char **) &o[i], 1);
+			fio_options_parse(td_parent, (char **) &o[i], 1, 0);
 		else
-			fio_options_parse(td, (char **) &o[i], 1);
+			fio_options_parse(td, (char **) &o[i], 1, 0);
 		i++;
 	}
 
@@ -1329,14 +1329,10 @@ int parse_jobs_ini(char *file, int is_buf, int stonewall_flag, int type)
 			num_opts++;
 		}
 
-		ret = fio_options_parse(td, opts, num_opts);
-		if (!ret) {
-			if (dump_cmdline)
-				for (i = 0; i < num_opts; i++)
-					log_info("--%s ", opts[i]);
-
+		ret = fio_options_parse(td, opts, num_opts, dump_cmdline);
+		if (!ret)
 			ret = add_job(td, name, 0, 0, type);
-		} else {
+		else {
 			log_err("fio: job %s dropped\n", name);
 			put_job(td);
 		}
diff --git a/options.c b/options.c
index 4b4c251..d2493e4 100644
--- a/options.c
+++ b/options.c
@@ -3277,7 +3277,7 @@ static void add_to_lopt(struct option *lopt, struct fio_option *o,
 	lopt->name = (char *) name;
 	lopt->val = val;
 	if (o->type == FIO_OPT_STR_SET)
-		lopt->has_arg = no_argument;
+		lopt->has_arg = optional_argument;
 	else
 		lopt->has_arg = required_argument;
 }
@@ -3550,7 +3550,8 @@ static char **dup_and_sub_options(char **opts, int num_opts)
 	return opts_copy;
 }
 
-int fio_options_parse(struct thread_data *td, char **opts, int num_opts)
+int fio_options_parse(struct thread_data *td, char **opts, int num_opts,
+			int dump_cmdline)
 {
 	int i, ret, unknown;
 	char **opts_copy;
@@ -3561,7 +3562,7 @@ int fio_options_parse(struct thread_data *td, char **opts, int num_opts)
 	for (ret = 0, i = 0, unknown = 0; i < num_opts; i++) {
 		struct fio_option *o;
 		int newret = parse_option(opts_copy[i], opts[i], fio_options,
-						&o, td);
+						&o, td, dump_cmdline);
 
 		if (opts_copy[i]) {
 			if (newret && !o) {
@@ -3590,7 +3591,7 @@ int fio_options_parse(struct thread_data *td, char **opts, int num_opts)
 			if (td->eo)
 				newret = parse_option(opts_copy[i], opts[i],
 						      td->io_ops->options, &o,
-						      td->eo);
+						      td->eo, dump_cmdline);
 
 			ret |= newret;
 			if (!o)
diff --git a/os/windows/install.wxs b/os/windows/install.wxs
index ac145bc..adc50f6 100755
--- a/os/windows/install.wxs
+++ b/os/windows/install.wxs
@@ -27,7 +27,7 @@
 							<File Source="..\..\fio.exe"/>
 						</Component>
 						<Component>
-							<File KeyPath="yes" Source="..\..\pthreadGC2.dll"/>
+							<File KeyPath="yes" Source="..\..\libwinpthread-1.dll"/>
 						</Component>
 						<Component>
 							<File Id="README" Name="README.txt" Source="..\..\README"/>
diff --git a/parse.c b/parse.c
index 5e3573e..e3f431e 100644
--- a/parse.c
+++ b/parse.c
@@ -944,7 +944,8 @@ int parse_cmd_option(const char *opt, const char *val,
 }
 
 int parse_option(char *opt, const char *input,
-		 struct fio_option *options, struct fio_option **o, void *data)
+		 struct fio_option *options, struct fio_option **o, void *data,
+		 int dump_cmdline)
 {
 	char *post;
 
@@ -965,11 +966,25 @@ int parse_option(char *opt, const char *input,
 		return 1;
 	}
 
-	if (!handle_option(*o, post, data))
-		return 0;
+	if (handle_option(*o, post, data)) {
+		log_err("fio: failed parsing %s\n", input);
+		return 1;
+	}
 
-	log_err("fio: failed parsing %s\n", input);
-	return 1;
+	if (dump_cmdline) {
+		const char *delim;
+
+		if (!strcmp("description", (*o)->name))
+			delim = "\"";
+		else
+			delim = "";
+
+		log_info("--%s%s", (*o)->name, post ? "" : " ");
+		if (post)
+			log_info("=%s%s%s ", delim, post, delim);
+	}
+
+	return 0;
 }
 
 /*
diff --git a/parse.h b/parse.h
index cf15ce0..34d99d4 100644
--- a/parse.h
+++ b/parse.h
@@ -76,7 +76,7 @@ struct fio_option {
 
 typedef int (str_cb_fn)(void *, char *);
 
-extern int parse_option(char *, const char *, struct fio_option *, struct fio_option **, void *);
+extern int parse_option(char *, const char *, struct fio_option *, struct fio_option **, void *, int);
 extern void sort_options(char **, struct fio_option *, int);
 extern int parse_cmd_option(const char *t, const char *l, struct fio_option *, void *);
 extern int show_cmd_help(struct fio_option *, const char *);
--
To unsubscribe from this list: send the line "unsubscribe fio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel]     [Linux SCSI]     [Linux IDE]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux