Skip to contentSkip to conversation

Recent changes (master)

PATCH Jens Axboe 1 participant 1 message Dec 1, 2015

Subsystems (2)
lore
Share & tools
lore

Jens Axboe

author
#0 lore raw

The following changes since commit 6a6b11f436c822cac154da5a60c4cc6baa6a8008:

Makefile: generate .d dep file for init.c (2015-11-25 21:24:01 -0700)

are available in the git repository at:

git://git.kernel.dk/fio.git master

for you to fetch changes up to b9c8a72a5795a58bd6bf060a79393e835db57a95:

Makefile: missing conversion, and oslib/ dep cleanup (2015-11-30 19:46:20 -0700)

----------------------------------------------------------------
Andrey Kuzmin (1):
io_size vs. time_based discrepancy

Jens Axboe (8):
io_u: don't use xfer_buflen before we have set it up Clear rusage stat when resetting all stats
stat: use DDIR_RWDIR_CNT instead of hardwired '3'
stat: move header declarations from iolog.h Move memalign to lib/
Makefile: re-arrange lib/
Move conditional lib files to oslib/
Makefile: missing conversion, and oslib/ dep cleanup

 Makefile                          | 45 ++++++++++++++++++---------------------
 backend.c                         |  4 ++--
 blktrace.c                        |  2 +-
 engines/mtd.c                     |  2 +-
 init.c                            |  2 +-
 io_u.c                            |  2 +-
 iolog.h                           | 15 -------------
 memalign.c => lib/memalign.c      |  0
 memalign.h => lib/memalign.h      |  0
 libfio.c                          |  1 +
 os/os-windows.h                   |  2 +-
 os/os.h                           |  4 ++--
 {lib => oslib}/getopt_long.c      |  0
 {lib => oslib}/inet_aton.c        |  0
 {lib => oslib}/inet_aton.h        |  0
 {lib => oslib}/libmtd.c           |  0
 {lib => oslib}/libmtd.h           |  0
 {lib => oslib}/libmtd_common.h    |  0
 {lib => oslib}/libmtd_int.h       |  0
 {lib => oslib}/libmtd_legacy.c    |  0
 {lib => oslib}/libmtd_xalloc.h    |  0
 {lib => oslib}/linux-dev-lookup.c |  0
 {lib => oslib}/linux-dev-lookup.h |  0
 {lib => oslib}/strcasestr.c       |  0
 {lib => oslib}/strcasestr.h       |  0
 {lib => oslib}/strlcat.c          |  0
 {lib => oslib}/strlcat.h          |  0
 {lib => oslib}/strsep.c           |  0
 {lib => oslib}/strsep.h           |  0
 stat.c                            | 10 +++++++++
 stat.h                            | 23 +++++++++++++++++---
 t/btrace2fio.c                    |  2 +-
 t/dedupe.c                        |  2 +-
 33 files changed, 63 insertions(+), 53 deletions(-)
 rename memalign.c => lib/memalign.c (100%)
 rename memalign.h => lib/memalign.h (100%)
 rename {lib => oslib}/getopt_long.c (100%)
 rename {lib => oslib}/inet_aton.c (100%)
 rename {lib => oslib}/inet_aton.h (100%)
 rename {lib => oslib}/libmtd.c (100%)
 rename {lib => oslib}/libmtd.h (100%)
 rename {lib => oslib}/libmtd_common.h (100%)
 rename {lib => oslib}/libmtd_int.h (100%)
 rename {lib => oslib}/libmtd_legacy.c (100%)
 rename {lib => oslib}/libmtd_xalloc.h (100%)
 rename {lib => oslib}/linux-dev-lookup.c (100%)
 rename {lib => oslib}/linux-dev-lookup.h (100%)
 rename {lib => oslib}/strcasestr.c (100%)
 rename {lib => oslib}/strcasestr.h (100%)
 rename {lib => oslib}/strlcat.c (100%)
 rename {lib => oslib}/strlcat.h (100%)
 rename {lib => oslib}/strsep.c (100%)
 rename {lib => oslib}/strsep.h (100%)

---

Diff of recent changes:

Makefile +21 -24
index e30273c..102cc69 100644
@@ -36,19 +36,16 @@ ifdef CONFIG_GFIO
   PROGS += gfio
 endif
 
-SOURCE :=	gettime.c ioengines.c init.c stat.c log.c time.c filesetup.c \
+SOURCE :=	$(patsubst $(SRCDIR)/%,%,$(wildcard $(SRCDIR)/crc/*.c)) \
+		$(patsubst $(SRCDIR)/%,%,$(wildcard $(SRCDIR)/lib/*.c)) \
+		gettime.c ioengines.c init.c stat.c log.c time.c filesetup.c \
 		eta.c verify.c memory.c io_u.c parse.c mutex.c options.c \
-		lib/rbtree.c smalloc.c filehash.c profile.c debug.c lib/rand.c \
-		lib/num2str.c lib/ieee754.c lib/strntol.c engines/cpu.c \
+		smalloc.c filehash.c profile.c debug.c engines/cpu.c \
 		engines/mmap.c engines/sync.c engines/null.c engines/net.c \
-		memalign.c server.c client.c iolog.c backend.c libfio.c flow.c \
-		cconv.c lib/prio_tree.c lib/zipf.c lib/axmap.c lib/pattern.c \
-		lib/lfsr.c gettime-thread.c helpers.c lib/flist_sort.c json.c \
-		lib/hweight.c lib/getrusage.c idletime.c td_error.c \
+		server.c client.c iolog.c backend.c libfio.c flow.c cconv.c \
+		gettime-thread.c helpers.c json.c idletime.c td_error.c \
 		profiles/tiobench.c profiles/act.c io_u_queue.c filelock.c \
-		lib/tp.c lib/bloom.c lib/gauss.c lib/mountcheck.c workqueue.c \
-		lib/output_buffer.c \
-		$(patsubst $(SRCDIR)/%,%,$(wildcard $(SRCDIR)/crc/*.c))
+		workqueue.c
 
 ifdef CONFIG_LIBHDFS
   HDFSFLAGS= -I $(JAVA_HOME)/include -I $(JAVA_HOME)/include/linux -I $(FIO_LIBHDFS_INCLUDE)
@@ -100,19 +97,19 @@ ifdef CONFIG_RBD
   SOURCE += engines/rbd.c
 endif
 ifndef CONFIG_STRSEP
-  SOURCE += lib/strsep.c
+  SOURCE += oslib/strsep.c
 endif
 ifndef CONFIG_STRCASESTR
-  SOURCE += lib/strcasestr.c
+  SOURCE += oslib/strcasestr.c
 endif
 ifndef CONFIG_STRLCAT
-  SOURCE += lib/strlcat.c
+  SOURCE += oslib/strlcat.c
 endif
 ifndef CONFIG_GETOPT_LONG_ONLY
-  SOURCE += lib/getopt_long.c
+  SOURCE += oslib/getopt_long.c
 endif
 ifndef CONFIG_INET_ATON
-  SOURCE += lib/inet_aton.c
+  SOURCE += oslib/inet_aton.c
 endif
 ifdef CONFIG_GFAPI
   SOURCE += engines/glusterfs.c
@@ -124,19 +121,19 @@ ifdef CONFIG_GFAPI
 endif
 ifdef CONFIG_MTD
   SOURCE += engines/mtd.c
-  SOURCE += lib/libmtd.c
-  SOURCE += lib/libmtd_legacy.c
+  SOURCE += oslib/libmtd.c
+  SOURCE += oslib/libmtd_legacy.c
 endif
 
 ifeq ($(CONFIG_TARGET_OS), Linux)
   SOURCE += diskutil.c fifo.c blktrace.c cgroup.c trim.c engines/sg.c \
-		engines/binject.c lib/linux-dev-lookup.c
+		engines/binject.c oslib/linux-dev-lookup.c
   LIBS += -lpthread -ldl
   LDFLAGS += -rdynamic
 endif
 ifeq ($(CONFIG_TARGET_OS), Android)
   SOURCE += diskutil.c fifo.c blktrace.c trim.c profiles/tiobench.c \
-		lib/linux-dev-lookup.c
+		oslib/linux-dev-lookup.c
   LIBS += -ldl
   LDFLAGS += -rdynamic
 endif
@@ -216,14 +213,14 @@ T_LFSR_TEST_PROGS = t/lfsr-test
 
 ifeq ($(CONFIG_TARGET_OS), Linux)
 T_BTRACE_FIO_OBJS = t/btrace2fio.o
-T_BTRACE_FIO_OBJS += fifo.o lib/flist_sort.o t/log.o lib/linux-dev-lookup.o
+T_BTRACE_FIO_OBJS += fifo.o lib/flist_sort.o t/log.o oslib/linux-dev-lookup.o
 T_BTRACE_FIO_PROGS = t/fio-btrace2fio
 endif
 
 T_DEDUPE_OBJS = t/dedupe.o
 T_DEDUPE_OBJS += lib/rbtree.o t/log.o mutex.o smalloc.o gettime.o crc/md5.o \
-		memalign.o lib/bloom.o t/debug.o crc/xxhash.o crc/murmur3.o \
-		crc/crc32c.o crc/crc32c-intel.o crc/fnv.o
+		lib/memalign.o lib/bloom.o t/debug.o crc/xxhash.o \
+		crc/murmur3.o crc/crc32c.o crc/crc32c-intel.o crc/fnv.o
 T_DEDUPE_PROGS = t/fio-dedupe
 
 T_OBJS = $(T_SMALLOC_OBJS)
@@ -238,7 +235,7 @@ ifneq (,$(findstring CYGWIN,$(CONFIG_TARGET_OS)))
     T_DEDUPE_OBJS += os/windows/posix.o lib/hweight.o
     T_SMALLOC_OBJS += os/windows/posix.o lib/hweight.o
     T_LFSR_TEST_OBJS += os/windows/posix.o lib/hweight.o
-    T_ZIPF_OBJS += lib/strcasestr.o
+    T_ZIPF_OBJS += oslib/strcasestr.o
 endif
 
 T_TEST_PROGS = $(T_SMALLOC_PROGS)
@@ -390,7 +387,7 @@ t/fio-dedupe: $(T_DEDUPE_OBJS)
 	$(QUIET_LINK)$(CC) $(LDFLAGS) $(CFLAGS) -o $@ $(T_DEDUPE_OBJS) $(LIBS)
 
 clean: FORCE
-	@rm -f .depend $(FIO_OBJS) $(GFIO_OBJS) $(OBJS) $(T_OBJS) $(PROGS) $(T_PROGS) $(T_TEST_PROGS) core.* core gfio FIO-VERSION-FILE *.d lib/*.d crc/*.d engines/*.d profiles/*.d t/*.d config-host.mak config-host.h y.tab.[ch] lex.yy.c exp/*.[do] lexer.h
+	@rm -f .depend $(FIO_OBJS) $(GFIO_OBJS) $(OBJS) $(T_OBJS) $(PROGS) $(T_PROGS) $(T_TEST_PROGS) core.* core gfio FIO-VERSION-FILE *.d lib/*.d oslib/*.d crc/*.d engines/*.d profiles/*.d t/*.d config-host.mak config-host.h y.tab.[ch] lex.yy.c exp/*.[do] lexer.h
 
 distclean: clean FORCE
 	@rm -f cscope.out fio.pdf fio_generate_plots.pdf fio2gnuplot.pdf
backend.c +2 -2
index 1560749..9a142e8 100644
@@ -49,7 +49,7 @@
 #include "cgroup.h"
 #include "profile.h"
 #include "lib/rand.h"
-#include "memalign.h"
+#include "lib/memalign.h"
 #include "server.h"
 #include "lib/getrusage.h"
 #include "idletime.h"
@@ -868,7 +868,7 @@ static uint64_t do_io(struct thread_data *td)
 		if (flow_threshold_exceeded(td))
 			continue;
 
-		if (bytes_issued >= total_bytes)
+		if (!td->o.time_based && bytes_issued >= total_bytes)
 			break;
 
 		io_u = get_io_u(td);
blktrace.c +1 -1
index 562e126..deb8b2d 100644
@@ -11,7 +11,7 @@
 #include "flist.h"
 #include "fio.h"
 #include "blktrace_api.h"
-#include "lib/linux-dev-lookup.h"
+#include "oslib/linux-dev-lookup.h"
 
 #define TRACE_FIFO_SIZE	8192
 
engines/mtd.c +1 -1
index 9381089..7b92c83 100644
@@ -14,7 +14,7 @@
 
 #include "../fio.h"
 #include "../verify.h"
-#include "../lib/libmtd.h"
+#include "../oslib/libmtd.h"
 
 libmtd_t desc;
 
init.c +1 -1
index b7945cf..353cc2b 100644
@@ -27,7 +27,7 @@
 #include "filelock.h"
 
 #include "lib/getopt.h"
-#include "lib/strcasestr.h"
+#include "oslib/strcasestr.h"
 
 #include "crc/test.h"
 
io_u.c +1 -1
index dd4502f..3b27d5e 100644
@@ -1527,7 +1527,7 @@ struct io_u *get_io_u(struct thread_data *td)
 			if (td->flags & TD_F_REFILL_BUFFERS) {
 				io_u_fill_buffer(td, io_u,
 					td->o.min_bs[DDIR_WRITE],
-					io_u->xfer_buflen);
+					io_u->buflen);
 			} else if ((td->flags & TD_F_SCRAMBLE_BUFFERS) &&
 				   !(td->flags & TD_F_COMPRESS))
 				do_scramble = 1;
iolog.h +0 -15
index aa4562d..eb5fdf3 100644
@@ -203,24 +203,9 @@ struct log_params {
 };
 
 extern void finalize_logs(struct thread_data *td);
-extern void add_lat_sample(struct thread_data *, enum fio_ddir, unsigned long,
-				unsigned int, uint64_t);
-extern void add_clat_sample(struct thread_data *, enum fio_ddir, unsigned long,
-				unsigned int, uint64_t);
-extern void add_slat_sample(struct thread_data *, enum fio_ddir, unsigned long,
-				unsigned int, uint64_t);
-extern void add_bw_sample(struct thread_data *, enum fio_ddir, unsigned int,
-				struct timeval *);
-extern void add_iops_sample(struct thread_data *, enum fio_ddir, unsigned int,
-				struct timeval *);
-extern void init_disk_util(struct thread_data *);
-extern void update_rusage_stat(struct thread_data *);
 extern void setup_log(struct io_log **, struct log_params *, const char *);
 extern void flush_log(struct io_log *, int);
 extern void free_log(struct io_log *);
-extern struct io_log *agg_io_log[DDIR_RWDIR_CNT];
-extern int write_bw_log;
-extern void add_agg_sample(unsigned long, enum fio_ddir, unsigned int);
 extern void fio_writeout_logs(struct thread_data *);
 extern int iolog_flush(struct io_log *, int);
 
lib/getopt_long.c deleted +0 -167

167 lines not on this page · raw message

lib/inet_aton.c deleted +0 -6
deleted file mode 100644
index 7ae7db7..0000000
@@ -1,6 +0,0 @@
-#include "inet_aton.h"
-
-int inet_aton(const char *cp, struct in_addr *inp)
-{
-	return inet_pton(AF_INET, cp, inp);
-}
lib/inet_aton.h deleted +0 -8
deleted file mode 100644
index c93c87f..0000000
@@ -1,8 +0,0 @@
-#ifndef FIO_INET_ATON_LIB_H
-#define FIO_INET_ATON_LIB_H
-
-#include <arpa/inet.h>
-
-int inet_aton(const char *cp, struct in_addr *inp);
-
-#endif
lib/libmtd.c deleted +0 -1424

1,424 lines not on this page · raw message

lib/libmtd.h deleted +0 -354

354 lines not on this page · raw message

lib/libmtd_common.h deleted +0 -223

223 lines not on this page · raw message

lib/libmtd_int.h deleted +0 -109

109 lines not on this page · raw message

lib/libmtd_legacy.c deleted +0 -384

384 lines not on this page · raw message

lib/libmtd_xalloc.h deleted +0 -106

106 lines not on this page · raw message

lib/linux-dev-lookup.c deleted +0 -66

41 lines not on this page · raw message

lib/linux-dev-lookup.h deleted +0 -7
deleted file mode 100644
index 144f33a..0000000

Lines of this file are not shown. View the raw message.

lib/memalign.c new file +36 -0
new file mode 100644
index 0000000..cfd6e46

Lines of this file are not shown. View the raw message.

lib/memalign.h new file +7 -0
new file mode 100644
index 0000000..df412e2

Lines of this file are not shown. View the raw message.

lib/strcasestr.c deleted +0 -25
deleted file mode 100644
index 92cf24c..0000000

Lines of this file are not shown. View the raw message.

lib/strcasestr.h deleted +0 -13
deleted file mode 100644
index 43d61df..0000000

Lines of this file are not shown. View the raw message.

lib/strlcat.c deleted +0 -23
deleted file mode 100644
index 643d496..0000000

Lines of this file are not shown. View the raw message.

lib/strlcat.h deleted +0 -6
deleted file mode 100644
index baeace4..0000000

Lines of this file are not shown. View the raw message.

lib/strsep.c deleted +0 -29
deleted file mode 100644
index b71e9f7..0000000

Lines of this file are not shown. View the raw message.

lib/strsep.h deleted +0 -6
deleted file mode 100644
index 5fea5d1..0000000

Lines of this file are not shown. View the raw message.

libfio.c +1 -0
index 3aa52e0..6c74852 100644

Lines of this file are not shown. View the raw message.

memalign.c deleted +0 -36
deleted file mode 100644
index cfd6e46..0000000

Lines of this file are not shown. View the raw message.

memalign.h deleted +0 -7
deleted file mode 100644
index df412e2..0000000

Lines of this file are not shown. View the raw message.

os/os-windows.h +1 -1
index ad1c3df..159c086 100644

Lines of this file are not shown. View the raw message.

os/os.h +2 -2
index 8e0b8e8..c46d8a3 100644

Lines of this file are not shown. View the raw message.

oslib/getopt_long.c new file +167 -0

167 lines not on this page · raw message

oslib/inet_aton.c new file +6 -0
new file mode 100644
index 0000000..7ae7db7

Lines of this file are not shown. View the raw message.

oslib/inet_aton.h new file +8 -0
new file mode 100644
index 0000000..c93c87f

Lines of this file are not shown. View the raw message.

oslib/libmtd.c new file +1424 -0

1,424 lines not on this page · raw message

oslib/libmtd.h new file +354 -0

354 lines not on this page · raw message

oslib/libmtd_common.h new file +223 -0

223 lines not on this page · raw message

oslib/libmtd_int.h new file +109 -0

109 lines not on this page · raw message

oslib/libmtd_legacy.c new file +384 -0

384 lines not on this page · raw message

oslib/libmtd_xalloc.h new file +106 -0

106 lines not on this page · raw message

oslib/linux-dev-lookup.c new file +66 -0

66 lines not on this page · raw message

oslib/linux-dev-lookup.h new file +7 -0
new file mode 100644
index 0000000..144f33a

Lines of this file are not shown. View the raw message.

oslib/strcasestr.c new file +25 -0
new file mode 100644
index 0000000..92cf24c

Lines of this file are not shown. View the raw message.

oslib/strcasestr.h new file +13 -0
new file mode 100644
index 0000000..43d61df

Lines of this file are not shown. View the raw message.

oslib/strlcat.c new file +23 -0
new file mode 100644
index 0000000..643d496

Lines of this file are not shown. View the raw message.

oslib/strlcat.h new file +6 -0
new file mode 100644
index 0000000..baeace4

Lines of this file are not shown. View the raw message.

oslib/strsep.c new file +29 -0
new file mode 100644
index 0000000..b71e9f7

Lines of this file are not shown. View the raw message.

oslib/strsep.h new file +6 -0
new file mode 100644
index 0000000..5fea5d1

Lines of this file are not shown. View the raw message.

stat.c +10 -0
index da3ad2a..e5ec223 100644

Lines of this file are not shown. View the raw message.

stat.h +20 -3
index e289c2e..0fc5533 100644

Lines of this file are not shown. View the raw message.

t/btrace2fio.c +1 -1
index 04b6abe..c589cea 100644

Lines of this file are not shown. View the raw message.

t/dedupe.c +1 -1
index 5b88fcb..e1cea50 100644

Lines of this file are not shown. View the raw message.

The rest of this diff is not shown. View the raw message.

Part of the diff is not shown here. View the raw message.