fix net engine client read server write bug
authorYufei Ren <renyufei83@gmail.com>
Mon, 19 Dec 2011 07:56:29 +0000 (08:56 +0100)
committerJens Axboe <axboe@kernel.dk>
Mon, 19 Dec 2011 07:57:14 +0000 (08:57 +0100)
commit991802b8a8857c3e8b8d54ae5b0dda589369fec1
tree3d14a6dd9f52a2c58e1294460f1528a9845caff2
parentd98cd22835c6764287f9a8d3dd3f9447bdf062d1
fix net engine client read server write bug

The net engine was updated with specific 'listen' parameter which used
for identifying whether it is a tcp server, instead of previous
'rw=read' side must be the server. This let fio support bi-direction
net io test. fio_netio_open_file() has to follow this
principle. Otherwise, the following tcp client 'rw=read' and tcp
server 'rw=write' case doesn't work.

[global]
ioengine=net
port=8888
protocol=tcp
bs=4k
size=10g

[server]
listen
rw=write

[client]
hostname=localhost
startdelay=1
rw=read

BTW, examples/netio needs 'listen' and 'hostname' adjusted.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
engines/net.c
examples/netio