Merge branch 'master' into gfio
authorJens Axboe <axboe@kernel.dk>
Fri, 5 Apr 2013 10:46:54 +0000 (12:46 +0200)
committerJens Axboe <axboe@kernel.dk>
Fri, 5 Apr 2013 10:46:54 +0000 (12:46 +0200)
Conflicts:
Makefile

Signed-off-by: Jens Axboe <axboe@kernel.dk>
1  2 
Makefile
backend.c
configure
fio.h
ioengines.c
parse.c
stat.c

diff --cc Makefile
index 4aa05fab34a73309d9e6918a489661f4b6974309,27e82c660a665b4d18ca2949e8c639ab5f5c9001..1755981ea0dc676e65b3f187d08cc27b6a64a395
+++ b/Makefile
@@@ -20,13 -12,17 +12,21 @@@ all
  include config-host.mak
  endif
  
- SOURCE := gettime.c ioengines.c init.c stat.c log.c time.c filesetup.c \
+ DEBUGFLAGS = -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG
+ CPPFLAGS= -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 $(DEBUGFLAGS)
+ OPTFLAGS= -O3 -g -ffast-math
+ CFLAGS        = -std=gnu99 -Wwrite-strings -Wall $(OPTFLAGS) $(EXTFLAGS) $(BUILD_CFLAGS)
+ LIBS  += -lm $(EXTLIBS)
+ PROGS = fio
+ SCRIPTS = fio_generate_plots
 +ifdef CONFIG_GFIO
 +  PROGS += gfio
 +endif
 +
+ SOURCE := gettime.c fio.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 \
 -              rbtree.c smalloc.c filehash.c profile.c debug.c lib/rand.c \
 +              lib/rbtree.c smalloc.c filehash.c profile.c debug.c lib/rand.c \
                lib/num2str.c lib/ieee754.c $(wildcard crc/*.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 \
diff --cc backend.c
Simple merge
diff --cc configure
index 222befe8a5e178aeee586d956ee79b6f7ac1e87e,a3c51fbdb82f06ebd8f9e5d274bab36cb37d33cd..5dd683c673dae80a270f42b2b638ab29635e1316
+++ b/configure
@@@ -1120,6 -1087,5 +1138,6 @@@ if test "$rlimit_memlock" = "yes" ; the
  fi
  
  echo "LIBS+=$LIBS" >> $config_host_mak
 +echo "CFLAGS+=$CFLAGS" >> $config_host_mak
  echo "CC=$cc" >> $config_host_mak
- echo "EXTFLAGS=$EXTFLAGS $CFLAGS" >> $config_host_mak
+ echo "BUILD_CFLAGS=$BUILD_CFLAGS $CFLAGS" >> $config_host_mak
diff --cc fio.h
Simple merge
diff --cc ioengines.c
Simple merge
diff --cc parse.c
index 92501338d456fde659af69beb8066ce239f39a8a,5b8e10f9f2e936ef55817c2d44b291e7c868e9f4..a701a5bb67b78dbdaa05dd827c776c9dd73ff34f
+++ b/parse.c
@@@ -152,35 -166,40 +165,40 @@@ static unsigned long long __get_mult_by
  
        c = strdup(p);
  
-       for (i = 0; i < strlen(c); i++)
+       for (i = 0; i < strlen(c); i++) {
                c[i] = tolower(c[i]);
+               if (is_separator(c[i])) {
+                       c[i] = '\0';
+                       break;
+               }
+       }
  
 -      if (!strcmp("pib", c)) {
 +      if (!strncmp("pib", c, 3)) {
                pow = 5;
                mult = 1000;
 -      } else if (!strcmp("tib", c)) {
 +      } else if (!strncmp("tib", c, 3)) {
                pow = 4;
                mult = 1000;
 -      } else if (!strcmp("gib", c)) {
 +      } else if (!strncmp("gib", c, 3)) {
                pow = 3;
                mult = 1000;
 -      } else if (!strcmp("mib", c)) {
 +      } else if (!strncmp("mib", c, 3)) {
                pow = 2;
                mult = 1000;
 -      } else if (!strcmp("kib", c)) {
 +      } else if (!strncmp("kib", c, 3)) {
                pow = 1;
                mult = 1000;
 -      } else if (!strcmp("p", c) || !strcmp("pb", c))
 +      } else if (!strncmp("p", c, 1) || !strncmp("pb", c, 2))
                pow = 5;
 -      else if (!strcmp("t", c) || !strcmp("tb", c))
 +      else if (!strncmp("t", c, 1) || !strncmp("tb", c, 2))
                pow = 4;
 -      else if (!strcmp("g", c) || !strcmp("gb", c))
 +      else if (!strncmp("g", c, 1) || !strncmp("gb", c, 2))
                pow = 3;
 -      else if (!strcmp("m", c) || !strcmp("mb", c))
 +      else if (!strncmp("m", c, 1) || !strncmp("mb", c, 2))
                pow = 2;
 -      else if (!strcmp("k", c) || !strcmp("kb", c))
 +      else if (!strncmp("k", c, 1) || !strncmp("kb", c, 2))
                pow = 1;
 -      else if (!strcmp("%", c)) {
 +      else if (!strncmp("%", c, 1)) {
                *percent = 1;
                free(c);
                return ret;
diff --cc stat.c
Simple merge