Recent changes (gfio)

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

 



The following changes since commit 09786f5fa4e64e63be97ae8469866715226bf837:

  Fix bad check for terse version format 4 (2012-10-04 17:06:49 +0200)

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

Akash Verma (1):
      HOWTO: Fix description of grouping behavior with numjobs

Bruce Cran (6):
      XP/2003 compatability fix
      Add pending IO to the tail of the busy list
      Fix UDP acronym
      fio patch: Windows netio fixes
      Windows: avoid large writes during file layout.
      Windows: handle SIGBREAK.

Jens Axboe (6):
      Fix bad check for terse version format 4
      Fix confusion between terse and json output
      options: cast page_size to unsigned long for sprintf()
      HOWTO: indentation fix
      Fio 2.0.10
      Merge branch 'master' into gfio

Saurabh De (1):
      solaris: fix compile error on ctime_r()

 FIO-VERSION-GEN        |    2 +-
 HOWTO                  |   28 ++++++++++++++--------------
 backend.c              |    8 ++++++++
 client.c               |    8 ++++++++
 diskutil.c             |    4 ++--
 engines/net.c          |    9 +++++++--
 fio.1                  |    2 +-
 io_u.c                 |    2 +-
 options.c              |    2 +-
 os/os-solaris.h        |    3 +++
 os/os.h                |    4 ++++
 os/windows/install.wxs |    2 +-
 os/windows/posix.c     |   21 +++++++++++++++------
 stat.c                 |    2 +-
 14 files changed, 67 insertions(+), 30 deletions(-)

---

Diff of recent changes:

diff --git a/FIO-VERSION-GEN b/FIO-VERSION-GEN
index 08729ba..cc7eb83 100755
--- a/FIO-VERSION-GEN
+++ b/FIO-VERSION-GEN
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 GVF=FIO-VERSION-FILE
-DEF_VER=fio-2.0.9
+DEF_VER=fio-2.0.10
 
 LF='
 '
diff --git a/HOWTO b/HOWTO
index b0d0a1f..1fb30db 100644
--- a/HOWTO
+++ b/HOWTO
@@ -1053,22 +1053,22 @@ wait_for_previous Wait for preceeding jobs in the job file to exit, before
 		points in the job file. A stone wall also implies starting
 		a new reporting group.
 
-new_group	Start a new reporting group. If this option isn't given,
-		jobs in a file will be part of the same reporting group
-		unless separated by a stone wall (or if it's a group
-		by itself, with the numjobs option).
+new_group	Start a new reporting group. See: group_reporting.
 
 numjobs=int	Create the specified number of clones of this job. May be
 		used to setup a larger number of threads/processes doing
-		the same thing. We regard that grouping of jobs as a
-		specific group.
-
-group_reporting	If 'numjobs' is set, it may be interesting to display
-		statistics for the group as a whole instead of for each
-		individual job. This is especially true of 'numjobs' is
-		large, looking at individual thread/process output quickly
-		becomes unwieldy. If 'group_reporting' is specified, fio
-		will show the final report per-group instead of per-job.
+		the same thing. Each thread is reported separately; to see
+		statistics for all clones as a whole, use group_reporting in
+		conjunction with new_group.
+
+group_reporting	It may sometimes be interesting to display statistics for
+		groups of jobs as a whole instead of for each individual job.
+		This is especially true if 'numjobs' is used; looking at
+		individual thread/process output quickly becomes unwieldy.
+		To see the final report per-group instead of per-job, use
+		'group_reporting'. Jobs in a file will be part of the same
+		reporting group, unless if separated by a stonewall, or by
+		using 'new_group'.
 
 thread		fio defaults to forking jobs, however if this option is
 		given, fio will use pthread_create(3) to create threads
@@ -1327,7 +1327,7 @@ that defines them is selected.
 [net] proto=str	The network protocol to use. Accepted values are:
 
 			tcp	Transmission control protocol
-			udp	Unreliable datagram protocol
+			udp	User datagram protocol
 			unix	UNIX domain socket
 
 		When the protocol is TCP or UDP, the port must also be given,
diff --git a/backend.c b/backend.c
index 3a1df29..974384c 100644
--- a/backend.c
+++ b/backend.c
@@ -108,6 +108,14 @@ static void set_sig_handlers(void)
 	act.sa_flags = SA_RESTART;
 	sigaction(SIGTERM, &act, NULL);
 
+/* Windows uses SIGBREAK as a quit signal from other applications */
+#ifdef WIN32
+	memset(&act, 0, sizeof(act));
+	act.sa_handler = sig_int;
+	act.sa_flags = SA_RESTART;
+	sigaction(SIGBREAK, &act, NULL);
+#endif
+
 	memset(&act, 0, sizeof(act));
 	act.sa_handler = sig_show_status;
 	act.sa_flags = SA_RESTART;
diff --git a/client.c b/client.c
index 47a2380..7b8dc61 100644
--- a/client.c
+++ b/client.c
@@ -437,6 +437,14 @@ static void client_signal_handler(void)
 	act.sa_flags = SA_RESTART;
 	sigaction(SIGTERM, &act, NULL);
 
+/* Windows uses SIGBREAK as a quit signal from other applications */
+#ifdef WIN32
+	memset(&act, 0, sizeof(act));
+	act.sa_handler = sig_int;
+	act.sa_flags = SA_RESTART;
+	sigaction(SIGBREAK, &act, NULL);
+#endif
+
 	memset(&act, 0, sizeof(act));
 	act.sa_handler = sig_show_status;
 	act.sa_flags = SA_RESTART;
diff --git a/diskutil.c b/diskutil.c
index d98e39a..fbc4268 100644
--- a/diskutil.c
+++ b/diskutil.c
@@ -658,7 +658,7 @@ void show_disk_util(int terse, struct json_object *parent)
 	if (!terse)
 		log_info("\nDisk stats (read/write):\n");
 
-	if (terse && terse_version == 4) {
+	if (output_format == FIO_OUTPUT_JSON) {
 		array = json_create_array();
 		json_object_add_value_array(parent, "disk_util", array);
 	}
@@ -667,7 +667,7 @@ void show_disk_util(int terse, struct json_object *parent)
 		du = flist_entry(entry, struct disk_util, list);
 
 		aggregate_slaves_stats(du);
-		if (terse && terse_version == 4)
+		if (output_format == FIO_OUTPUT_JSON)
 			print_disk_util_json(du, array);
 		else
 			print_disk_util(&du->dus, &du->agg, terse);
diff --git a/engines/net.c b/engines/net.c
index 636939e..468bc7c 100644
--- a/engines/net.c
+++ b/engines/net.c
@@ -85,7 +85,7 @@ static struct fio_option options[] = {
 			  },
 			  { .ival = "udp",
 			    .oval = FIO_TYPE_UDP,
-			    .help = "Unreliable Datagram Protocol",
+			    .help = "User Datagram Protocol",
 			  },
 			  { .ival = "unix",
 			    .oval = FIO_TYPE_UNIX,
@@ -152,7 +152,7 @@ static int fio_netio_prep(struct thread_data *td, struct io_u *io_u)
 		td_verror(td, EINVAL, "bad direction");
 		return 1;
 	}
-		
+
 	return 0;
 }
 
@@ -695,6 +695,11 @@ static int fio_netio_init(struct thread_data *td)
 	struct netio_options *o = td->eo;
 	int ret;
 
+#ifdef WIN32
+	WSADATA wsd;
+	WSAStartup(MAKEWORD(2,2), &wsd);
+#endif
+
 	if (td_random(td)) {
 		log_err("fio: network IO can't be random\n");
 		return 1;
diff --git a/fio.1 b/fio.1
index d42516a..13abb94 100644
--- a/fio.1
+++ b/fio.1
@@ -1079,7 +1079,7 @@ The network protocol to use. Accepted values are:
 Transmission control protocol
 .TP
 .B udp
-Unreliable datagram protocol
+User datagram protocol
 .TP
 .B unix
 UNIX domain socket
diff --git a/io_u.c b/io_u.c
index a4802fe..347e115 100644
--- a/io_u.c
+++ b/io_u.c
@@ -1096,7 +1096,7 @@ again:
 
 		io_u->error = 0;
 		flist_del(&io_u->list);
-		flist_add(&io_u->list, &td->io_u_busylist);
+		flist_add_tail(&io_u->list, &td->io_u_busylist);
 		td->cur_depth++;
 		io_u->flags |= IO_U_F_IN_CUR_DEPTH;
 	} else if (td->o.verify_async) {
diff --git a/options.c b/options.c
index 14a9831..eb7c596 100644
--- a/options.c
+++ b/options.c
@@ -2993,7 +2993,7 @@ void fio_keywords_init(void)
 	char buf[128];
 	long l;
 
-	sprintf(buf, "%lu", page_size);
+	sprintf(buf, "%lu", (unsigned long) page_size);
 	fio_keywords[0].replace = strdup(buf);
 
 	mb_memory = os_phys_mem() / (1024 * 1024);
diff --git a/os/os-solaris.h b/os/os-solaris.h
index d97643d..e7a544e 100644
--- a/os/os-solaris.h
+++ b/os/os-solaris.h
@@ -49,6 +49,9 @@ struct solaris_rand_seed {
 #define POSIX_MADV_RANDOM	MADV_RANDOM
 #endif
 
+#define os_ctime_r(x, y, z)     ctime_r((x), (y), (z))
+#define FIO_OS_HAS_CTIME_R
+
 typedef psetid_t os_cpu_mask_t;
 typedef struct solaris_rand_seed os_random_state_t;
 
diff --git a/os/os.h b/os/os.h
index dc798c3..e2c188f 100644
--- a/os/os.h
+++ b/os/os.h
@@ -142,6 +142,10 @@ typedef unsigned long os_cpu_mask_t;
 typedef socklen_t fio_socklen_t;
 #endif
 
+#ifndef FIO_OS_HAS_CTIME_R
+#define os_ctime_r(x, y, z)     ctime_r((x), (y))
+#endif
+
 #ifdef FIO_USE_GENERIC_SWAP
 static inline uint16_t fio_swap16(uint16_t val)
 {
diff --git a/os/windows/install.wxs b/os/windows/install.wxs
index 571492e..e02347e 100755
--- a/os/windows/install.wxs
+++ b/os/windows/install.wxs
@@ -10,7 +10,7 @@
 	<Product Id="2BA394F9-0D9E-4597-BB9D-6B18097D64BB"
 	  Codepage="1252" Language="1033"
 	  Manufacturer="fio" Name="fio"
-	  UpgradeCode="2338A332-5511-43cf-b9BD-5C60496CCFCC" Version="2.0.9">
+	  UpgradeCode="2338A332-5511-43cf-b9BD-5C60496CCFCC" Version="2.0.10">
 		<Package 
 		  Comments="Contact: Your local administrator"
 		  Description="Flexible IO Tester"
diff --git a/os/windows/posix.c b/os/windows/posix.c
index ce41ef8..11500e4 100755
--- a/os/windows/posix.c
+++ b/os/windows/posix.c
@@ -234,10 +234,10 @@ void syslog(int priority, const char *message, ... /* argument */)
 	va_start(v, message);
 	len = _vscprintf(message, v);
 	output = malloc(len + sizeof(char));
-	vsprintf_s(output, len + sizeof(char), message, v);
+	vsprintf(output, message, v);
 	WriteFile(log_file, output, len, &bytes_written, NULL);
 	va_end(v);
-    free(output);
+	free(output);
 }
 
 int kill(pid_t pid, int sig)
@@ -411,6 +411,9 @@ int posix_fallocate(int fd, off_t offset, off_t len)
 			break;
 		}
 
+		/* Don't allow Windows to cache the write: flush it to disk */
+		_commit(fd);
+
 		bytes_remaining -= bytes_written;
 	}
 
@@ -628,11 +631,11 @@ int poll(struct pollfd fds[], nfds_t nfds, int timeout)
 	int i;
 	int rc;
 
-	if (timeout != -1)
+	if (timeout != -1) {
 		to = &tv;
-
-	to->tv_sec = timeout / 1000;
-	to->tv_usec = (timeout % 1000) * 1000;
+		to->tv_sec = timeout / 1000;
+		to->tv_usec = (timeout % 1000) * 1000;
+	}
 
 	FD_ZERO(&readfds);
 	FD_ZERO(&writefds);
@@ -811,9 +814,15 @@ const char* inet_ntop(int af, const void *restrict src,
 		errno = ENOSPC;
 
 	WSACleanup();
+
 	return ret;
 }
 
+int inet_aton(const char *cp, struct in_addr *inp)
+{
+	return inet_pton(AF_INET, cp, inp);
+}
+
 int inet_pton(int af, const char *restrict src, void *restrict dst)
 {
 	INT status = SOCKET_ERROR;
diff --git a/stat.c b/stat.c
index edeae87..4a881d4 100644
--- a/stat.c
+++ b/stat.c
@@ -495,7 +495,7 @@ void show_thread_status(struct thread_stat *ts, struct group_run_stats *rs)
 		return;
 
 	time(&time_p);
-	ctime_r((const time_t *) &time_p, time_buf);
+	os_ctime_r((const time_t *) &time_p, time_buf, sizeof(time_buf));
 
 	if (!ts->error) {
 		log_info("%s: (groupid=%d, jobs=%d): err=%2d: pid=%d: %s",
--
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