From: Jens Axboe Date: Wed, 9 Jan 2013 13:10:36 +0000 (+0100) Subject: Merge branch 'master' into gfio X-Git-Tag: fio-2.1~57^2~33 X-Git-Url: https://git.kernel.dk/?p=fio.git;a=commitdiff_plain;h=92a0daf8163eaa8d117d1e6e4fdc11a8dddac2d2 Merge branch 'master' into gfio Conflicts: client.c server.h Signed-off-by: Jens Axboe --- 92a0daf8163eaa8d117d1e6e4fdc11a8dddac2d2 diff --cc Makefile index bc0a2f8a,ba8b997b..e6e9e8c9 --- a/Makefile +++ b/Makefile @@@ -4,9 -2,9 +2,9 @@@ CC ?= gc DEBUGFLAGS = -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG CPPFLAGS= -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 \ $(DEBUGFLAGS) - OPTFLAGS= -O3 -g $(EXTFLAGS) + OPTFLAGS= -O3 -g -ffast-math $(EXTFLAGS) CFLAGS = -std=gnu99 -Wwrite-strings -Wall $(OPTFLAGS) -LIBS = -lm $(EXTLIBS) +LIBS = -lm -lz $(EXTLIBS) PROGS = fio SCRIPTS = fio_generate_plots UNAME := $(shell uname) diff --cc backend.c index 8bcb7a2c,099bd9bd..8f16a165 --- a/backend.c +++ b/backend.c @@@ -1013,11 -1014,10 +1016,13 @@@ static void *thread_main(void *data } else td->pid = gettid(); + fio_local_clock_init(td->o.use_thread); + dprint(FD_PROCESS, "jobs pid=%d started\n", (int) td->pid); + if (is_backend) + fio_server_send_start(td); + INIT_FLIST_HEAD(&td->io_u_freelist); INIT_FLIST_HEAD(&td->io_u_busylist); INIT_FLIST_HEAD(&td->io_u_requeues); diff --cc server.h index 201e62d6,3f1bde4e..fa88d241 --- a/server.h +++ b/server.h @@@ -27,10 -25,10 +27,10 @@@ struct fio_net_cmd */ uint16_t cmd_crc16; /* cmd checksum */ uint16_t pdu_crc16; /* payload checksum */ - uint8_t payload[0]; /* payload */ + uint8_t payload[]; /* payload */ }; -struct fio_net_int_cmd { +struct fio_net_cmd_reply { struct flist_head list; struct timeval tv; uint64_t saved_tag; @@@ -101,16 -91,9 +101,16 @@@ struct cmd_single_line_pdu struct cmd_line_pdu { uint16_t lines; + uint16_t client_type; - struct cmd_single_line_pdu options[0]; + struct cmd_single_line_pdu options[]; }; +struct cmd_job_pdu { + uint32_t buf_len; + uint32_t client_type; + uint8_t buf[0]; +}; + struct cmd_start_pdu { uint32_t jobs; uint32_t stat_outputs;