Recent changes

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

 



The following changes since commit d98cd22835c6764287f9a8d3dd3f9447bdf062d1:

  Fio 2.0 (2011-12-08 09:52:39 +0100)

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

Jens Axboe (1):
      Fix segfault with net io engine and no file/hostname given

Yufei Ren (1):
      fix net engine client read server write bug

 engines/net.c  |   15 ++++++++++-----
 examples/netio |    3 ++-
 2 files changed, 12 insertions(+), 6 deletions(-)

---

Diff of recent changes:

diff --git a/engines/net.c b/engines/net.c
index 3401039..cf6025f 100644
--- a/engines/net.c
+++ b/engines/net.c
@@ -496,8 +496,9 @@ static int fio_netio_accept(struct thread_data *td, struct fio_file *f)
 static int fio_netio_open_file(struct thread_data *td, struct fio_file *f)
 {
 	int ret;
+	struct netio_options *o = td->eo;
 
-	if (td_read(td))
+	if (o->listen)
 		ret = fio_netio_accept(td, f);
 	else
 		ret = fio_netio_connect(td, f);
@@ -701,13 +702,17 @@ static int fio_netio_init(struct thread_data *td)
 
 	if (o->proto != FIO_TYPE_TCP) {
 		if (o->listen) {
-			  log_err("fio: listen only valid for TCP proto IO\n");
-			  return 1;
+			log_err("fio: listen only valid for TCP proto IO\n");
+			return 1;
 		}
 		if (td_rw(td)) {
-			  log_err("fio: datagram network connections must be"
+			log_err("fio: datagram network connections must be"
 				   " read OR write\n");
-			  return 1;
+			return 1;
+		}
+		if (o->proto == FIO_TYPE_UNIX && !td->o.filename) {
+			log_err("fio: UNIX sockets need host/filename\n");
+			return 1;
 		}
 		o->listen = td_read(td);
 	}
diff --git a/examples/netio b/examples/netio
index bd44adb..3b1a7cd 100644
--- a/examples/netio
+++ b/examples/netio
@@ -2,7 +2,6 @@
 [global]
 ioengine=net
 #Use hostname=/tmp.fio.sock for local unix domain sockets
-hostname=localhost
 port=8888
 #Use =udp for UDP, =unix for local unix domain socket
 protocol=tcp
@@ -12,8 +11,10 @@ size=10g
 #verify=md5
 
 [receiver]
+listen
 rw=read
 
 [sender]
+hostname=localhost
 startdelay=1
 rw=write
--
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