X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=engines%2Fnet.c;h=2381f7390ea3d0d9934599409ce6ddbadb4ab5b1;hp=467059e431bf091b967d6a07a9ef7fc011ec11a6;hb=b2560f3ca4677e2908fc4111f4d04fae5df3b229;hpb=4f45320a29179d802073b392fd7e10bf0975d6bc diff --git a/engines/net.c b/engines/net.c index 467059e4..2381f739 100644 --- a/engines/net.c +++ b/engines/net.c @@ -167,7 +167,6 @@ static int fio_netio_accept_connections(struct thread_data *td, int fd, } } - td->nr_open_files = accepts; return 0; } @@ -211,7 +210,7 @@ static int fio_netio_setup_listen(struct thread_data *td, unsigned short port) return fio_netio_accept_connections(td, fd, &addr); } -static int fio_netio_setup(struct thread_data *td) +static int fio_netio_init(struct thread_data *td) { char host[64], buf[128]; unsigned short port; @@ -261,6 +260,12 @@ static int fio_netio_setup(struct thread_data *td) f->real_file_size = f->file_size; } + td->nr_open_files = td->nr_files; + return 0; +} + +static int fio_netio_setup(struct thread_data fio_unused *td) +{ return 0; } @@ -270,6 +275,7 @@ static struct ioengine_ops ioengine = { .prep = fio_netio_prep, .queue = fio_netio_queue, .setup = fio_netio_setup, + .init = fio_netio_init, .flags = FIO_SYNCIO | FIO_DISKLESSIO | FIO_SELFOPEN, };