Hello community,

here is the log from the commit of package iozone for openSUSE:Factory:NonFree 
checked in at 2019-01-19 19:46:58
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory:NonFree/iozone (Old)
 and      /work/SRC/openSUSE:Factory:NonFree/.iozone.new.28833 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "iozone"

Sat Jan 19 19:46:58 2019 rev:6 rq:665634 version:3.483

Changes:
--------
--- /work/SRC/openSUSE:Factory:NonFree/iozone/iozone.changes    2017-11-10 
15:36:14.899849971 +0100
+++ /work/SRC/openSUSE:Factory:NonFree/.iozone.new.28833/iozone.changes 
2019-01-19 19:46:59.219381853 +0100
@@ -1,0 +2,20 @@
+Sat Jan 12 13:08:28 UTC 2019 - [email protected]
+
+- Update to version 3_483:
+  * Adding -+M (special dedupe layout)
+  * Adding -+a (set compression in special layout)
+  * Adding -+Q (set dedupe granule size in special layout)
+  * Cleanup compiler warnings.
+  * Bug fix code in special_gen_new_buf..
+  * Bug fix code in special_gen_new_buf.. More copies of the other
+    bug.
+  * Bug fix code in special_gen_new_buf.. needed (*op ==0) in one
+    more line.
+  * Add -+R option to specify the file names are in a file.
+  * Fix help menu for -+R option.  It does not also use -F
+  * Bug fix for case of -H where gcc seems to think the size of
+    long long.
+    is != size of off64_t
+  * Bug fix for prototype mismatch in async_write_no_copy.
+
+-------------------------------------------------------------------

Old:
----
  iozone3_471.tar

New:
----
  iozone3_483.tar

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ iozone.spec ++++++
--- /var/tmp/diff_new_pack.DSw60P/_old  2019-01-19 19:46:59.823381382 +0100
+++ /var/tmp/diff_new_pack.DSw60P/_new  2019-01-19 19:46:59.827381378 +0100
@@ -17,7 +17,7 @@
 
 
 %define src_version 3
-%define src_release 471
+%define src_release 483
 Name:           iozone
 Version:        %{src_version}.%{src_release}
 Release:        0

++++++ iozone3_471.tar -> iozone3_483.tar ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/iozone3_471/src/current/Changes.txt 
new/iozone3_483/src/current/Changes.txt
--- old/iozone3_471/src/current/Changes.txt     2017-09-20 04:17:08.000000000 
+0200
+++ new/iozone3_483/src/current/Changes.txt     2018-11-21 19:15:58.000000000 
+0100
@@ -2614,4 +2614,48 @@
 Revision 3.471
 Make -+W -+C -+y use a flag instead of its option value to indiate its usage.
 =============================================================================
+Revision 3.472
+Adding -+M (special dedupe layout)
+Adding -+a (set compression in special layout)
+Adding -+Q (set dedupe granule size in special layout)
+=============================================================================
+Revision 3.473
+no change.
+=============================================================================
+Revision 3.474
+Cleanup for Cygwin64 build.
+=============================================================================
+Revision 3.475
+Cleanup for Cygwin64 build warnings.
+=============================================================================
+Revision 3.476
+Cleanup compiler warnings.
+=============================================================================
+Revision 3.477
+Bug fix code in special_gen_new_buf..
+=============================================================================
+Revision 3.478
+Bug fix code in special_gen_new_buf.. More copies of the other bug.
+=============================================================================
+Revision 3.479
+Bug fix code in special_gen_new_buf.. needed (*op ==0) in one more line.
+=============================================================================
+Revision 3.480
+Add -+R option to specify the file names are in a file.
+=============================================================================
+Revision 3.481
+Adding new contributor Sudhir Kumar
+=============================================================================
+Revision 3.482
+Fix help menu for -+R option.  It does not also use -F
+Bug fix for case of -H where gcc seems to think the size of long long
+is != size of off64_t
+Bug fix for prototype mismatch in async_write_no_copy.
+=============================================================================
+Revision 3.483
+Fix nesting of #ifdefs so that Windows lack of support for O_DIRECT presents
+splash indication.
+Enable O_DIRECT for Windows builds.
+=============================================================================
+
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/iozone3_471/src/current/fileop.c 
new/iozone3_483/src/current/fileop.c
--- old/iozone3_471/src/current/fileop.c        2017-09-20 04:17:08.000000000 
+0200
+++ new/iozone3_483/src/current/fileop.c        2018-11-21 19:15:58.000000000 
+0100
@@ -124,11 +124,10 @@
 void file_read(int);
 void splash(void);
 void usage(void);
-void bzero();
 void clear_stats();
 int validate(char *, int , char );
 
-#define THISVERSION "        $Revision: 1.61 $"
+#define THISVERSION "        $Revision: 1.63 $"
 /*#define NULL 0*/
 
 char version[]=THISVERSION;
@@ -1367,7 +1366,7 @@
 {
        int i;
        for(i=0;i<_NUM_STATS;i++)
-               bzero((char *)&stats[i],sizeof(struct stat_struct));
+               memset((char *)&stats[i],0,sizeof(struct stat_struct));
 }
 int
 validate(char *buffer, int size, char value)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/iozone3_471/src/current/iozone.c 
new/iozone3_483/src/current/iozone.c
--- old/iozone3_471/src/current/iozone.c        2017-09-20 04:17:08.000000000 
+0200
+++ new/iozone3_483/src/current/iozone.c        2018-11-21 19:15:58.000000000 
+0100
@@ -60,7 +60,11 @@
 
 
 /* The version number */
-#define THISVERSION "        Version $Revision: 3.471 $"
+#define THISVERSION "        Version $Revision: 3.483 $"
+
+#if defined(Windows)
+#define NO_THREADS
+#endif
 
 #if defined(linux)
   #define _GNU_SOURCE
@@ -132,7 +136,8 @@
 "                  [-Y read_telemetry_filename] [-y minrecsize_kB] [-q 
maxrecsize_kB]",
 "                  [-+u] [-+m cluster_filename] [-+d] [-+x multiplier] [-+p # 
]",
 "                  [-+r] [-+t] [-+X] [-+Z] [-+w percent dedupable] [-+y 
percent_interior_dedup]",
-"                  [-+C percent_dedup_within]",
+"                  [-+C percent_dedup_within] [-+a zero_pct]  [-+Q dedup 
granule size]",
+"                  [-+M dedup+compress flag ]",
 " ",
 "           -a  Auto mode",
 "           -A  Auto2 mode",
@@ -238,9 +243,13 @@
 "           -+w ## Percent of dedup-able data in buffers.",
 "           -+y ## Percent of dedup-able within & across files in buffers.",
 "           -+C ## Percent of dedup-able within & not across files in 
buffers.",
+"           -+a ## Percent of data that is compressible.",
+"           -+Q ## Dedup granule size.",
 "           -+H Hostname    Hostname of the PIT server.",
 "           -+P Service     Service  of the PIT server.",
 "           -+z Enable latency histogram logging.",
+"           -+M Enable Dedup+compress option. (Experimental).",
+"           -+R enable iozone to take filenames from a file.",
 "" };
 
 char *head1[] = {
@@ -280,7 +289,7 @@
 #include <stdio.h>
 #include <signal.h>
 
-#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__APPLE__) || 
defined(__DragonFly__) || defined(__NetBSD__) || defined(solaris)
+#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__APPLE__) || 
defined(__DragonFly__) || defined(__NetBSD__) || defined(solaris) || 
defined(Windows)
   #ifndef my_sig_t
   typedef void (*my_sig_t)(int);
   #endif
@@ -463,6 +472,7 @@
 #endif
 
 #define DEDUPSEED 0x2719362
+#define MAX_RAND 2147483647L
 
 #ifdef NO_SOCKET
 #define socket no_socket
@@ -546,6 +556,9 @@
        int c_sverify;
        int c_odsync;
        int c_diag_v;
+       int c_zero_pct;
+       int c_N_special;
+       int c_dedup_granule_size;
        int c_dedup;
        int c_dedup_flag;
        int c_dedup_iflag;
@@ -652,6 +665,9 @@
        char c_sverify[2];
        char c_odsync[2];
        char c_diag_v[2];
+       char c_zero_pct[4];
+       char c_N_special[4];
+       char c_dedup_granule_size[8];
        char c_dedup[4];
        char c_dedup_flag[4];
        char c_dedup_iflag[4];
@@ -1007,7 +1023,7 @@
 void begin(off64_t,long long);
 void record_command_line(int, char **);
 void show_help(void);          /* show development help          */
-#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__APPLE__) || 
defined(__DragonFly__) || defined(__NetBSD__) || defined(solaris)
+#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__APPLE__) || 
defined(__DragonFly__) || defined(__NetBSD__) || defined(solaris) || 
defined(Windows)
 my_sig_t signal_handler(void); /* clean up if user interrupts us */
 #else
 sighandler_t signal_handler(void);     /* clean up if user interrupts us */
@@ -1110,6 +1126,7 @@
 void alloc_pbuf(void);
 int check_filename(char *);
 int gen_new_buf(char *, char *, long, int, int, int, int, int );
+int special_gen_new_buf(char *, char *, long, int, int, int, int, int );
 void touch_dedup(char *, int );
 void init_genrand64(unsigned long long);
 long long genrand64_int63(void);
@@ -1124,7 +1141,7 @@
 void begin();
 void record_command_line();
 void show_help();
-#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__APPLE__) || 
defined(__DragonFly__) || defined(__NetBSD__) || defined(solaris)
+#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__APPLE__) || 
defined(__DragonFly__) || defined(__NetBSD__) || defined(solaris) || 
defined(Windows)
 my_sig_t signal_handler(); /* clean up if user interrupts us */
 #else
 sighandler_t signal_handler(); /* clean up if user interrupts us */
@@ -1227,6 +1244,7 @@
 void alloc_pbuf();
 int check_filename();
 int gen_new_buf();
+int special_gen_new_buf();
 void touch_dedup();
 void init_genrand64();
 long long genrand64_int63();
@@ -1256,6 +1274,8 @@
 void end_async();
 void async_init();
 #else
+int async_read();
+int async_read_no_copy();
 size_t async_write();
 size_t async_write_no_copy();
 void async_release();
@@ -1512,7 +1532,9 @@
 int r_count,s_count;
 char *barray[MAXSTREAMS];
 char *haveshm;
+#if !defined(Windows)
 extern int optind;
+#endif
 long long onetime, auto_mode, sfd, multi_buffer;
 int exit_code = 0;  
 int fd;
@@ -1530,6 +1552,11 @@
 int op_rate_flag;
 char aflag, Eflag, hflag, Rflag, rflag, sflag,del_flag,mix_test;
 char diag_v,sent_stop,dedup,dedup_interior,dedup_compress, dedup_flag, 
dedup_iflag,dedup_bflag;
+int zero_pct = -1;
+int N_special = 0;
+int W_special = 0;
+int dedup_granule_size = 4096;
+int dedup_unit_step = 1024;
 char *dedup_ibuf;
 char *dedup_temp;
 char bif_flag;
@@ -1559,7 +1586,7 @@
 long long include_test[50];
 long long include_mask;
 char RWONLYflag, NOCROSSflag;          /*auto mode 2 - kcollins 8-21-96*/
-char mfflag;
+char mfflag,F_flag;
 long long status, x, y, childids[MAXSTREAMS+1], myid, num_child;
 int pct_read,speed_code;
 #ifndef NO_THREADS
@@ -1569,7 +1596,9 @@
 char wol_opened, rol_opened;
 FILE *wqfd,*rwqfd,*rqfd,*rrqfd;
 
+#if !defined(Windows)
 extern char *optarg;
+#endif
 #ifndef __AIX__
 long long ret;
 #else
@@ -1600,6 +1629,7 @@
 char dummyfile [MAXSTREAMS][MAXNAMESIZE];  /* name of dummy file     */
 char dummyfile1 [MAXNAMESIZE];             /* name of dummy file     */
 char *filearray[MAXSTREAMS];              /* array of file names    */
+int blkidx[MAXSTREAMS];            /* array of file names    */
 char tfile[MAXNAMESIZE];
 char *buffer,*buffer1, *mbuffer,*mainbuffer;
 FILE *pi,*r_traj_fd,*w_traj_fd;
@@ -1793,6 +1823,8 @@
 void stop_child_send();
 void stop_child_send();
 void child_send();
+long compressible_rand(void);
+void new_touch_dedup(char *, int);
 
 
 /****************************************************************/
@@ -1877,13 +1909,13 @@
        sprintf(splash[splash_line++],"\t             Erik Habbinga, Kris 
Strecker, Walter Wong, Joshua Root,\n");
        sprintf(splash[splash_line++],"\t             Fabrice Bacchella, 
Zhenghua Xue, Qin Li, Darren Sawyer,\n");
        sprintf(splash[splash_line++],"\t             Vangel Bojaxhi, Ben 
England, Vikentsi Lapa,\n");
-       sprintf(splash[splash_line++],"\t             Alexey Skidanov.\n\n");
+       sprintf(splash[splash_line++],"\t             Alexey Skidanov, Sudhir 
Kumar.\n\n");
        sprintf(splash[splash_line++],"\tRun began: %s\n",ctime(&time_run));
        argcsave=argc;
        argvsave=argv;
 
 #ifndef NO_SIGNAL
-#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__APPLE__) || 
defined(__DragonFly__) || defined(__NetBSD__) || defined(solaris)
+#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__APPLE__) || 
defined(__DragonFly__) || defined(__NetBSD__) || defined(solaris) || 
defined(Windows)
        signal((int) SIGINT, (my_sig_t) signal_handler);   /* handle user 
interrupt */
        signal((int) SIGTERM, (my_sig_t) signal_handler);  /* handle kill from 
shell */
 #else
@@ -1927,24 +1959,7 @@
                ~((long)cache_size-1));
 #endif
        dedup_ibuf = buffer1;
-       touch_dedup(buffer1, MAXBUFFERSIZE);
 
-#ifdef FOOB
-       /* de-dup temp buf */
-       buffer1 = (char *) alloc_mem((long long)(MAXBUFFERSIZE + (2 * 
cache_size)),(int)0);
-       if(buffer1 == 0) {
-               perror("Memory allocation failed:");
-               exit(1);
-        }
-
-#ifdef _64BIT_ARCH_
-       buffer1 = (char *) ((long long )(buffer1 + cache_size ) & 
-               ~(cache_size-1));
-#else
-       buffer1 = (char *) ((long)(buffer1 + cache_size ) & 
-               ~((long)cache_size-1));
-#endif
-#endif
        dedup_temp = mainbuffer;
 
        fetchon++;  /* By default, prefetch the CPU cache lines associated with 
the buffer */
@@ -2015,22 +2030,21 @@
                        sprintf(splash[splash_line++],"\tVxFS advanced feature 
SET_CACHE, VX_DIRECT enabled\n");
                        break;
 #endif
-#if ! defined(DONT_HAVE_O_DIRECT)
-#if defined(linux) || defined(__AIX__) || defined(IRIX) || defined(IRIX64) || 
defined(Windows) || defined(__FreeBSD__) || defined(solaris) || 
defined(IOZ_macosx)
+#if !defined(DONT_HAVE_O_DIRECT)
+  #if defined(linux) || defined(__AIX__) || defined(IRIX) || defined(IRIX64) 
|| defined(Windows) || defined(__FreeBSD__) || defined(solaris) || 
defined(IOZ_macosx)
                        direct_flag++;
                        sprintf(splash[splash_line++],"\tO_DIRECT feature 
enabled\n");
                        break;
-#endif
-#if defined(TRU64)
+  #endif
+  #if defined(TRU64)
                        direct_flag++;
                        sprintf(splash[splash_line++],"\tO_DIRECTIO feature 
enabled\n");
                        break;
-#endif
+  #endif
 #else
-                       break;
-#endif
-#if defined(Windows)
+  #if defined(Windows)
                        sprintf(splash[splash_line++],"\tO_DIRECTIO feature not 
available in Windows version.\n");
+  #endif
                        break;
 #endif
                case 'B':       /* Use mmap file for test file */
@@ -2283,6 +2297,7 @@
                        break;
                case 'F':       /* Specify multiple file names for -t */
                        mfflag++;
+                       F_flag++;
                        if(fflag) {
                          printf("invalid options: -f and -F are mutually 
exclusive\n");
                          exit(11);
@@ -2292,17 +2307,19 @@
                          exit(12);
                        }
                        optind--;
-                       for(fileindx=0;fileindx<maxt;fileindx++) {
-                         filearray[fileindx]=argv[optind++];
-                         if(optind > argc) {
+                       for(fileindx=0;fileindx<maxt;fileindx++) 
+                       {
+                                filearray[fileindx]=argv[optind++];
+                                if(optind > argc) 
+                                {
 #ifdef NO_PRINT_LLD
-                           printf("invalid options: not enough filenames for 
%ld streams\n",num_child);
+                                    printf("invalid options: not enough 
filenames for %ld streams\n",num_child);
 #else
-                           printf("invalid options: not enough filenames for 
%lld streams\n",num_child);
+                                    printf("invalid options: not enough 
filenames for %lld streams\n",num_child);
 #endif
-                           exit(13);
-                         }
-                       }
+                                    exit(13);
+                                }
+                       }
                        break;
                case 'r':       /* Specify the record size to use */
                        rflag++;
@@ -2587,14 +2604,35 @@
                 * -+b  is shown below. This is a sub option with no argument.
                 */
                case '+':
-                       /* printf("Plus option = >%s<\n",optarg);*/
+                       /* percent to make data compressible */
                        switch (*((char *)optarg))
                        {
-                               case 'a':  /* Example: Has argument */
-                                       subarg=argv[optind++];
-                                       /* if(subarg!=(char *)0)   Error 
checking. */
-                                       /* printf("Plus option argument = 
>%s<\n",subarg);*/
-                                       break;
+                               case 'a':/* Max value for random byte [0,255] */
+                                        subarg = argv[optind++];
+                                        if(subarg==(char *)0)
+                                        {
+                                             printf("-+a takes an operand 
!!\n");
+                                             exit(200);
+                                        }
+                                        zero_pct = atoi(subarg);
+                                        if(zero_pct >100)
+                                            zero_pct = 100;
+                                        sprintf(splash[splash_line++],"\tZero 
Percent %d\n ",zero_pct);
+                                        break;
+                               case 'Q': /* Dedup granule size */
+                                       subarg = argv[optind++];
+                                        if(subarg==(char *)0)
+                                        {
+                                             printf("-+Q takes an operand 
!!\n");
+                                             exit(200);
+                                        }
+                                        dedup_granule_size = atoi(subarg);
+                                        if(dedup_granule_size <0)
+                                                dedup_granule_size = 0;
+                                        sprintf(splash[splash_line++],"\tDedup 
granule size %d\n",dedup_granule_size);
+                                        dedup_unit_step = dedup_granule_size 
>> 2;
+                                        break;
+
                                case 'b':  /* burst */
 #ifdef NO_THREADS
                                        if(trflag)
@@ -2646,6 +2684,63 @@
                                case 'F':  /* Example: Does not have an 
argument */
                                        del_flag = 1;
                                        break;
+                               case 'M':  /* Speical dedup+compress option. 
Experimental */
+                                       N_special = 1;
+                                        
sprintf(splash[splash_line++],"\tDedup+compress enabled\n ");
+                                       break;
+                               case 'R':  /* Speical Windows option to read 
filelist from a input file. Experimental */
+                                       mfflag++;
+                                       subarg = argv[optind++];
+                                        if(subarg==(char *)0)
+                                        {
+                                             printf("-+R takes an operand 
!!\n");
+                                             exit(200);
+                                        }
+                                        
sprintf(splash[splash_line++],"\tFilenames from a file option enabled. File: 
%s\n ",subarg);
+                                       /* filename should be used instead of 
filelist */
+                                       struct stat outbuf;
+                                       int result;
+                                       result = stat(subarg, &outbuf);
+                                       if(result == -1) {
+                                               printf("Failed to stat the 
iozone input file: %s\n",argv[optind]);
+                                               exit(errno);
+                                       } 
+                                       else 
+                                       {
+                                               /* read the input file and 
populate the  filearray */
+                                               int fileindx = 0;
+                                               FILE * fp;
+                                               char * lbuffer;
+                                               fp = fopen(subarg, "r");
+                                               while ( 1 )
+                                               {
+                                                   lbuffer=malloc(MAXNAMESIZE);
+                                                   
memset(lbuffer,0,MAXNAMESIZE);
+                                                   
if(fgets(lbuffer,MAXNAMESIZE,fp) == 0) 
+                                                       break;
+                                                   if(strlen(lbuffer) > 0)
+                                                   {
+                                                       /* strip newline */
+                                                       
if(lbuffer[strlen(lbuffer)-1] == '\n')
+                                                           
lbuffer[strlen(lbuffer)-1] = 0;     
+                                                       filearray[fileindx]= 
lbuffer;
+                                                       fileindx++;
+                                                   }
+                                               }
+                                               fclose(fp);
+                                               if(fileindx > num_child) 
+                                               {
+#ifdef NO_PRINT_LLD
+                                                   printf("invalid options: 
not enough filenames for %ld streams\n",num_child);
+#else
+                                                   printf("invalid options: 
not enough filenames for %lld streams\n",num_child);
+#endif
+                                                   exit(13);
+
+                                               }
+                                       }
+                                       break;
+
                                case 'c':  /* Argument is the controlling host 
name */
                                        /* I am a client for distributed Iozone 
*/
                                        subarg=argv[optind++];
@@ -2901,7 +2996,7 @@
                                        dedup_iflag = 1;
                                        sprintf(splash[splash_line++],"\tDedup 
within & across %d percent.\n",dedup_interior);
                                        break;
-                               case 'C':  /* Argument is the percent of dedupe 
within & !across */
+                               case 'C':  /* Argument is the percent of dedup 
within & !across */
                                           /* Sets size of dedup region within 
and !across files */
                                        subarg=argv[optind++];
                                        if(subarg==(char *)0)
@@ -2988,6 +3083,7 @@
                        exit(255);
                }
        }
+       touch_dedup(buffer1, MAXBUFFERSIZE);
        base_time=(long)time_so_far();
        get_resolution();               /* Get clock resolution */
        if(speed_code)
@@ -3619,13 +3715,13 @@
 
 ******************************************************************/
 #ifdef HAVE_ANSIC_C
-#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__APPLE__) || 
defined(__DragonFly__) || defined(__NetBSD__) || defined(solaris)
+#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__APPLE__) || 
defined(__DragonFly__) || defined(__NetBSD__) || defined(solaris) || 
defined(Windows)
 my_sig_t signal_handler(void)
 #else
 sighandler_t signal_handler(void)
 #endif
 #else
-#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__APPLE__) || 
defined(__DragonFly__) || defined(__NetBSD__) || defined(solaris)
+#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__APPLE__) || 
defined(__DragonFly__) || defined(__NetBSD__) || defined(solaris) || 
defined(Windows)
 my_sig_t signal_handler()
 #else
 sighandler_t signal_handler()
@@ -12809,19 +12905,18 @@
                nbuff=buffer;
        if(debug1 )
        {
-          if(use_thread)
+           if(use_thread)
 #ifdef NO_PRINT_LLD
                printf("\nStarting child %ld\n",(long)xx);
 #else
                printf("\nStarting child %lld\n",(long long)xx);
 #endif
-          else
+           else
 #ifdef NO_PRINT_LLD
                printf("\nStarting process %d slot %ld\n",getpid(),(long)xx);
 #else
                printf("\nStarting process %d slot %lld\n",getpid(),(long 
long)xx);
 #endif
-               
        }
        dummyfile[xx]=(char *)malloc((size_t)MAXNAMESIZE);
        xx2=xx;
@@ -12830,17 +12925,17 @@
        if(mfflag)
        {
 #ifdef NO_PRINT_LLD
-               sprintf(dummyfile[xx],"%s",filearray[xx2]);
+           sprintf(dummyfile[xx],"%s",filearray[xx2]);
 #else
-               sprintf(dummyfile[xx],"%s",filearray[xx2]);
+           sprintf(dummyfile[xx],"%s",filearray[xx2]);
 #endif
        }
        else
        {
 #ifdef NO_PRINT_LLD
-               sprintf(dummyfile[xx],"%s.DUMMY.%ld",filearray[xx2],(long)xx2);
+           sprintf(dummyfile[xx],"%s.DUMMY.%ld",filearray[xx2],(long)xx2);
 #else
-               sprintf(dummyfile[xx],"%s.DUMMY.%lld",filearray[xx2],(long 
long)xx2);
+           sprintf(dummyfile[xx],"%s.DUMMY.%lld",filearray[xx2],(long 
long)xx2);
 #endif
        }
        /*****************/
@@ -21086,6 +21181,9 @@
        sprintf(outbuf.c_sverify,"%d",send_buffer->c_sverify);
        sprintf(outbuf.c_odsync,"%d",send_buffer->c_odsync);
        sprintf(outbuf.c_diag_v,"%d",send_buffer->c_diag_v);
+       sprintf(outbuf.c_zero_pct,"%d",send_buffer->c_zero_pct);
+       sprintf(outbuf.c_N_special,"%d",send_buffer->c_N_special);
+       
sprintf(outbuf.c_dedup_granule_size,"%d",send_buffer->c_dedup_granule_size);
        sprintf(outbuf.c_dedup,"%d",send_buffer->c_dedup);
        sprintf(outbuf.c_dedup_flag,"%d",send_buffer->c_dedup_flag);
        sprintf(outbuf.c_dedup_iflag,"%d",send_buffer->c_dedup_iflag);
@@ -21945,6 +22043,9 @@
        cc.c_sverify = sverify;
        cc.c_odsync = odsync;
        cc.c_diag_v = diag_v;
+       cc.c_zero_pct = zero_pct;
+       cc.c_N_special = N_special;
+       cc.c_dedup_granule_size = dedup_granule_size;
        cc.c_dedup_flag = dedup_flag;
        cc.c_dedup_iflag = dedup_iflag;
        cc.c_dedup_bflag = dedup_bflag;
@@ -22206,6 +22307,9 @@
        sscanf(cnc->c_sverify,"%d",&cc.c_sverify);
        sscanf(cnc->c_odsync,"%d",&cc.c_odsync);
        sscanf(cnc->c_diag_v,"%d",&cc.c_diag_v);
+       sscanf(cnc->c_zero_pct,"%d",&cc.c_zero_pct);
+       sscanf(cnc->c_N_special,"%d",&cc.c_N_special);
+       sscanf(cnc->c_dedup_granule_size,"%d",&cc.c_dedup_granule_size);
        sscanf(cnc->c_dedup_flag,"%d",&cc.c_dedup_flag);
        sscanf(cnc->c_dedup_iflag,"%d",&cc.c_dedup_iflag);
        sscanf(cnc->c_dedup_bflag,"%d",&cc.c_dedup_bflag);
@@ -22294,6 +22398,9 @@
        fetchon = cc.c_fetchon;
        verify = cc.c_verify;
        diag_v = cc.c_diag_v;
+       zero_pct = cc.c_zero_pct;
+       N_special = cc.c_N_special;
+       dedup_granule_size = cc.c_dedup_granule_size;
        dedup = cc.c_dedup;
        dedup_flag = cc.c_dedup_flag;
        dedup_iflag = cc.c_dedup_iflag;
@@ -22351,6 +22458,8 @@
        depth = cc.c_depth;
        delay_start = cc.c_delay_start;
        compute_time = cc.c_compute_time;
+       if(N_special)
+               touch_dedup(buffer1, MAXBUFFERSIZE);
        if(cdebug)
        {
                fprintf(newstdout,"Child %d change directory to 
%s\n",(int)chid,workdir);
@@ -22872,6 +22981,9 @@
        x = (int) childnum;
        if(mdebug>=1)
                printf("Master: Tell child %d to begin\n",x);
+       cc.c_zero_pct = zero_pct;
+       cc.c_N_special = N_special;
+       cc.c_dedup_granule_size = dedup_granule_size;
        cc.c_command = R_FLAG_DATA;
        cc.c_child_flag = CHILD_STATE_BEGIN; 
        cc.c_client_number = (int)childnum; 
@@ -23046,6 +23158,9 @@
        {
                child_idents[i].state = C_STATE_ZERO;
                cc.c_client_number = (int)i; 
+               cc.c_zero_pct = zero_pct;
+               cc.c_N_special = N_special;
+               cc.c_dedup_granule_size = dedup_granule_size;
                if(mdebug)
                        printf("Master terminating async channels to 
children.\n");
                
master_send(master_send_async_sockets[i],child_idents[i].child_name, 
&cc,sizeof(struct client_command));
@@ -23088,6 +23203,9 @@
        cc.c_stop_flag = 1;
        for(i=0;i<num_child;i++)
        {
+               cc.c_zero_pct = zero_pct;
+               cc.c_N_special = N_special;
+               cc.c_dedup_granule_size = dedup_granule_size;
                cc.c_client_number = (int)i; 
                if(mdebug)
                        printf("Master distributing stop flag to child %d\n",i);
@@ -24228,90 +24346,194 @@
  * Returns 0 (zero) for success, and -1 (minus one) for failure.
  */
 int
-gen_new_buf(char *ibuf, char *obuf, long seed, int size, int percent,
+special_gen_new_buf(char *ibuf, char *obuf, long seed, int size, int percent,
        int percent_interior, int percent_compress, int all)
 {
-       register int *ip, *op; /* Register for speed    */
-       register int iseed;     /* Register for speed   */
-       register int isize;     /* Register for speed   */
-       register int cseed;     /* seed for dedupable for within & ! across */
-       register int x,w;       /* Register for speed   */
-       register int value;     /* Register for speed   */
-       register int interior_size;     /* size of interior dedup region */
-       register int compress_size;     /* size of compression dedup region */
-       if(ibuf == NULL)        /* no input buf         */
-               return(-1);
-       if(obuf == NULL)        /* no output buf        */
-               return(-1);
-       if((percent > 100) || (percent < 0)) /* percent check */
-               return(-1);
-       if(size == 0)           /* size check           */
-               return(-1);
-       srand(seed+1+(((int)numrecs64)*dedup_mseed)); /* set random seed */
-       iseed = rand();         /* generate random value */
-       isize = (size * percent)/100; /* percent that is dedupable */
-       interior_size = ((isize * percent_interior)/100);/* /sizeof(int) */
-       compress_size =((interior_size * percent_compress)/100);
-       ip = (int *)ibuf;       /* pointer to input buf */
-       op = (int *)obuf;       /* pointer to output buf */
-       if(all == 0)            /* Special case for verify only */
-               isize = sizeof(int);
-       /* interior_size = dedup_within + dedup_across */
-       for(w=0;w<interior_size;w+=sizeof(int)) 
-       {
-               *op=0xdeadbeef+dedup_mseed;
-               *ip=0xdeadbeef+dedup_mseed;
-               op++;
+        register int *ip, *op; /* Register for speed   */
+        register int iseed;    /* Register for speed   */
+        register int isize;    /* Register for speed   */
+        register int cseed;    /* seed for dedupable for within & ! across */
+        register int x,w;       /* Register for speed   */
+        register int value;     /* Register for speed   */
+        register int interior_size;     /* size of interior dedup region */
+        register int compress_size;     /* size of compression dedup region */
+        int base = seed * reclen;
+        if(ibuf == NULL)        /* no input buf         */
+                return(-1);
+        if(obuf == NULL)        /* no output buf        */
+                return(-1);
+        if((percent > 100) || (percent < 0)) /* percent check */
+                return(-1);
+        if(size == 0)           /* size check           */
+                return(-1);
+        srand(seed+1+(((int)numrecs64)*dedup_mseed)); /* set random seed */
+        iseed =rand();
+        isize = (size * percent)/100; /* percent that is dedupable */
+
+        interior_size = ((isize * percent_interior)/100);/* /sizeof(long) */
+        compress_size =((interior_size * percent_compress)/100);
+        ip = (int *)ibuf;      /* pointer to input buf */
+        op = (int *)obuf;      /* pointer to output buf */
+        if(all == 0)            /* Special case for verify only */
+                isize = sizeof(int);
+        /* dedup region boundary                                               
*/
+        /* [0,interior_size-compress_size) :  dedupable within and across      
 */
+        /* [interior_size-compress_size, interior_size) : dedupable within 
only */
+        /* [interior_size, isize] : dedupable across only                      
 */
+        /* [isize, size] : non-dedupable                                       
 */
+
+        /* check whether each dedup region is starting a dedup unit           
*/
+        /* printf("within&across@0 within@%08x across@%08x nondedup@%x\n",     
*/
+        /*     interior_size-compress_size,interior_size, isize);              
*/
+        /* if ( (interior_size-compress_size) %dedup_granule != 0)             
 */
+        /*      printf("warning: dedup region(within only) is starting in the  
*/
+        /*        middle of a dedup unit\n");                                  
*/
+        /* if ( interior_size %dedup_granule_size != 0)                        
 */
+        /*      printf("warning: dedup region(across only) is starting in the  
*/
+        /*          middle of a dedup unit\n");                                
*/
+        /* if ( isize %dedup_granule_size != 0)                                
 */
+        /*      printf("warning: nondedup region is starting in the middle of  
 */
+        /*         a unit\n");                                                 
*/
+
+        /* interior_size = dedup_within + dedup_across                         
 */
+        /* /for(w=0;w<interior_size;w+=sizeof(long))                           
 */
+        for(w=0;w<interior_size-compress_size;w+=dedup_granule_size,
+               op+=dedup_unit_step,ip+=dedup_unit_step)
+        {
+                *op=0xdeadbeefL+ (long)dedup_mseed;
+                *ip=0xdeadbeefL+ (long)dedup_mseed;
+                blkidx[chid]++;
+        }
+        /* for(w=0;w<interior_size;w+=sizeof(long))     */
+        /* {                                            */
+        /*     if (*op) *op=0xdeadbeef+dedup_mseed;     */
+        /*     if (*ip) *ip=0xdeadbeef+dedup_mseed;     */
+        /*     op++;                                    */
+        /*     ip++;                                    */
+        /* }                                            */
+
+        /* Prepare for dedup within but not across      */
+        w=interior_size - compress_size;
+        op=(int *)&obuf[w];
+        ip=(int *)&ibuf[w];
+        srand(chid+1+dedup_mseed);      /* set randdom seed       */
+        cseed = rand();                /* generate random value */
+
+        for(w=(interior_size-compress_size);w<interior_size;w+=sizeof(int))
+        {
+                if ((zero_pct != -1) && (*ip==0) ) /* if *ip and active 
zero_pct, do nothing */
+                       ;
+               else
+                       *op = *ip ^ cseed; /* if *ip is not zero, do the xor op 
*/
+            if (w%dedup_granule_size==0) 
+           {
+                *op++=(long)chid; 
                ip++;
-       }       
-       /* Prepare for dedup within but not across */
-       w=interior_size - compress_size;
-       op=(int *)&obuf[w];
-       ip=(int *)&ibuf[w];
-       srand(chid+chid_skew+1+dedup_mseed);            /* set randdom seed     
*/
-       cseed = rand();         /* generate random value */
-       for(w=(interior_size-compress_size);w<interior_size;w+=sizeof(int))     
-       {
-               *op=*ip ^ cseed; /* do the xor op */
-               op++;
+                *op++=0xbeef; 
                ip++;
-       }       
-       /* isize = dedup across only */
-       for(x=interior_size;x<isize;x+=sizeof(int))     /* tight loop for 
transformation */
-       {
-               *op=*ip ^ iseed; /* do the xor op */
-               op++;
+                blkidx[chid]++; 
+               w+=sizeof(int);
+            } 
+           else 
+           {
+                op++;
+                ip++;
+            }
+        }
+
+        /* isize = dedup across only */
+        for(x=interior_size;x<isize;x+=sizeof(int))
+        {
+            if (zero_pct!=-1 && (*ip==0)) 
+               ;
+            else 
+               *op = *ip^iseed;
+            if (x%dedup_granule_size == 0) 
+           {
+                *op++=(int)((x+base)>>12);
                ip++;
-       }       
-       if(all == 0)            /* Special case for verify only */
-               return(0);
-       /* make the rest of the buffer non-dedupable */
-       if(100-percent > 0)
+                *op++=0xdead;
+               ip++; 
+               x+=sizeof(int);
+                blkidx[chid]++;
+            } 
+           else 
+           {
+                   op++;
+                   ip++;
+            }
+        }
+        if(all == 0)            /* Special case for verify only */
+                return(0);
+        /* make the rest of the buffer non-dedupable */
+        if(100-percent > 0)
+        {
+                srand(1+seed+((chid+1)*(int)numrecs64)*dedup_mseed);
+                value=rand();
+                for( ; x<size;x+=sizeof(int)) 
+               {
+                    if (zero_pct!=-1 && (*ip==0)) 
+                       ;
+                    else 
+                       *op=(*ip)^value;
+                    if (x%dedup_granule_size==0) 
+                   {
+                        *op++=(int)(chid); 
+                       ip++;
+                        *op++=(int)((x+base)>>12); 
+                       ip++;
+                        blkidx[chid]++; 
+                       x+= sizeof(int);
+                    } 
+                   else 
+                   {
+                        ip++;
+                        op++;
+                    }
+                }
+        }
+
+        return(0);
+}
+
+long 
+compressible_rand(void)
+{
+        /* zero_pct:[0,100] */
+        int toss = ((((double)rand()/((double)MAX_RAND+(double)1))*100+1));
+        if (toss>zero_pct) 
        {
-               srand(1+seed+((chid+chid_skew+1)*(int)numrecs64)*dedup_mseed);
-               value=rand();
-/* printf("Non-dedup value %x seed %x\n",value,seed);*/
-               for( ; x<size;x+=sizeof(int))
-                       *op++=(*ip++)^value; /* randomize the remainder */
-       }
-       return(0);
+                return 
(long)(((double)rand()/((double)MAX_RAND+(double)1))*MAX_RAND)+1;
+                               /* [1,MAX_RAND]. avoid zeros because  */
+                               /* zeros are used for compressibility control  
*/
+        } 
+       else 
+       {
+                return 0;
+        }
 }
+
 /* 
  * Used to touch all of the buffers so that the CPU data
- * cache is hot, and not part of the measurement.
+ * cache is hot, and not part of the measurement. 
+ * This is for mixed mode of compression + dedup.
  */
 void
-touch_dedup(char *i, int size)
+new_touch_dedup(char *i, int size)
 {
-       register int x;
-       register int *ip;
-       ip = (int *)i;
-       srand(DEDUPSEED);
-       for(x=0;x<size/sizeof(int);x++)
-       {
-               *ip=rand(); /* fill initial buffer */
-               ip++;
-       }
+        register int x;
+        register int *ip;
+        ip = (int *)i;
+        /* To make sure every fileset generates different dedup patterns */
+        srand(DEDUPSEED+dedup_mseed);
+
+        for(x=0;x<size/sizeof(int);x++)
+        {
+                if ( zero_pct >= 0 ) {
+                        *ip=compressible_rand(); /* fill initial buffer  */
+                }
+                ip++;
+        }
 }
 
 /* 
@@ -25926,3 +26148,122 @@
 }
 #endif
 
+/*
+ *  * Used to touch all of the buffers so that the CPU data
+ *   * cache is hot, and not part of the measurement.
+ *    */
+void
+touch_dedup(char *i, int size)
+{
+        register int x;
+        register int *ip;
+       if(N_special)
+       {
+               new_touch_dedup(i, size);
+               return;
+       }
+        ip = (int *)i;
+        srand(DEDUPSEED);
+        for(x=0;x<size/sizeof(int);x++)
+        {
+                *ip=rand(); /* fill initial buffer */
+                ip++;
+        }
+}
+/*
+ * As quickly as possible, generate a new buffer that
+ * can not be easily compressed, or de-duped. Also
+ * permit specified percentage of buffer to be updated.
+ *
+ * ibuf ... input buffer
+ * obuf ... output buffer
+ * seed ... Seed to use for srand, rand -> xor ops
+ *          Seed composed from: blocknumber
+            (do not include childnum as you want duplicates)
+ * size ... size of buffers. (in bytes)
+ * percent. Percent of buffer to modify.
+ * percent_interior. Percent of buffer that is dedupable within
+ *                   and across files
+ * percent_compress. Percent of buffer that is dedupable within
+ *                   but not across files
+ *
+ * Returns 0 (zero) for success, and -1 (minus one) for failure.
+ */
+int
+gen_new_buf(char *ibuf, char *obuf, long seed, int size, int percent,
+        int percent_interior, int percent_compress, int all)
+{
+        register int *ip, *op;  /* Register for speed    */
+        register int iseed;     /* Register for speed   */
+        register int isize;     /* Register for speed   */
+        register int cseed;     /* seed for dedupable for within & ! across */
+        register int x,w;       /* Register for speed   */
+        register int value;     /* Register for speed   */
+        register int interior_size;     /* size of interior dedup region */
+        register int compress_size;     /* size of compression dedup region */
+       int ret = 0;
+
+       if(N_special)
+       {
+               ret = special_gen_new_buf(ibuf, obuf, seed, size, percent, 
percent_interior, percent_compress, all);
+               return(ret);
+       }
+               
+        if(ibuf == NULL)        /* no input buf         */
+                return(-1);
+        if(obuf == NULL)        /* no output buf        */
+                return(-1);
+        if((percent > 100) || (percent < 0)) /* percent check */
+                return(-1);
+        if(size == 0)           /* size check           */
+                return(-1);
+        srand(seed+1+(((int)numrecs64)*dedup_mseed)); /* set random seed */
+        iseed = rand();         /* generate random value */
+        isize = (size * percent)/100; /* percent that is dedupable */
+        interior_size = ((isize * percent_interior)/100);/* /sizeof(int) */
+        compress_size =((interior_size * percent_compress)/100);
+        ip = (int *)ibuf;       /* pointer to input buf */
+        op = (int *)obuf;       /* pointer to output buf */
+        if(all == 0)            /* Special case for verify only */
+                isize = sizeof(int);
+        /* interior_size = dedup_within + dedup_across */
+        for(w=0;w<interior_size;w+=sizeof(int))
+        {
+                *op=0xdeadbeef+dedup_mseed;
+                *ip=0xdeadbeef+dedup_mseed;
+                op++;
+                ip++;
+        }
+        /* Prepare for dedup within but not across */
+        w=interior_size - compress_size;
+        op=(int *)&obuf[w];
+        ip=(int *)&ibuf[w];
+        srand(chid+chid_skew+1+dedup_mseed);            /* set randdom seed    
 */
+        cseed = rand();         /* generate random value */
+        for(w=(interior_size-compress_size);w<interior_size;w+=sizeof(int))
+        {
+                *op=*ip ^ cseed; /* do the xor op */
+                op++;
+                ip++;
+        }
+        /* isize = dedup across only */
+        for(x=interior_size;x<isize;x+=sizeof(long))    /* tight loop for 
transformation */
+        {
+                *op=*ip ^ iseed; /* do the xor op */
+                op++;
+                ip++;
+        }
+        if(all == 0)            /* Special case for verify only */
+                return(0);
+        /* make the rest of the buffer non-dedupable */
+        if(100-percent > 0)
+        {
+                srand(1+seed+((chid+chid_skew+1)*(int)numrecs64)*dedup_mseed);
+                value=rand();
+       /* printf("Non-dedup value %x seed %x\n",value,seed);*/
+                for( ; x<size;x+=sizeof(long))
+                        *op++=(*ip++)^value; /* randomize the remainder */
+        }
+        return(0);
+}
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/iozone3_471/src/current/libasync.c 
new/iozone3_483/src/current/libasync.c
--- old/iozone3_471/src/current/libasync.c      2017-09-20 04:17:08.000000000 
+0200
+++ new/iozone3_483/src/current/libasync.c      2018-11-21 19:15:58.000000000 
+0100
@@ -161,7 +161,7 @@
  * cache, pointed to by async_init(gc) will be of
  * this structure type.
  */
-static const char version[] = "Libasync Version $Revision: 3.32 $";
+static const char version[] = "Libasync Version $Revision: 3.34 $";
 struct cache_ent {
 #if defined(_LARGEFILE64_SOURCE) && defined(__CrayX1__)
        aiocb64_t myaiocb;              /* For use in large file mode */
@@ -212,7 +212,7 @@
 void del_cache(struct cache *);
 void putoninuse(struct cache *,struct cache_ent *);
 void takeoffinuse(struct cache *);
-struct cache_ent * allocate_write_buffer( struct cache *, long long , long 
long ,long long, off64_t, long long, long long, char *, char *);
+struct cache_ent * allocate_write_buffer( struct cache *, long long , long 
long ,long long, long long, long long, long long, char *, char *);
 void async_put_on_write_queue(struct cache *, struct cache_ent *);
 void async_write_finish(struct cache *);
 void async_wait_for_write(struct cache *);
@@ -222,7 +222,7 @@
 int async_read_no_copy(struct cache *, long long, char **, off64_t, long long, 
long long, off64_t, long long);
 void async_release(struct cache *gc);
 size_t async_write(struct cache *,long long, char *, long long, off64_t, long 
long);
-size_t async_write_no_copy(struct cache *gc,long long fd,char *buffer,long 
long size,off64_t offset,long long depth,char *free_addr);
+size_t async_write_no_copy(struct cache *gc,long long fd,char *buffer,long 
long size,long long offset,long long depth,char *free_addr);
 #else
 void async_init();
 void end_async();
@@ -297,8 +297,12 @@
 #endif
 {
        del_cache(gc);
-       async_write_finish(gc);
-       free((void *)gc);
+       if(gc && (gc->w_head !=NULL))
+          async_write_finish(gc);
+
+       if(gc != NULL)
+          free((void *)gc);
+       gc = NULL;
 }
 
 /***********************************************/
@@ -531,8 +535,9 @@
        ce->myaiocb.aio_fildes=(int)fd;
        ce->myaiocb.aio_offset=(off64_t)offset;
        ce->real_address = malloc((size_t)(size+page_size));
+printf("\nAllocate buffer2 %p Size %lld \n",ce->real_address,size+page_size);
        temp = (intptr_t)ce->real_address;
-       temp = (temp+page_size) & ~(page_size-1);
+       temp = (temp+(page_size-1)) & ~(page_size-1);
        ce->myaiocb.aio_buf=(volatile void *)temp;
        if(ce->myaiocb.aio_buf == NULL)
        {
@@ -610,8 +615,12 @@
                        gc->tail = 0;
                if(!ce->direct)
                {
-                       free((void *)(ce->real_address));
-                       free((void *)ce);
+                       if(ce->real_address != NULL)
+                          free((void *)(ce->real_address));
+                       ce->real_address = NULL;
+                       if(ce != NULL)
+                          free((void *)ce);
+                       ce = NULL;
                }
                gc->count--;
                return;
@@ -644,8 +653,12 @@
        move=gc->head;
        if(!ce->direct)
        {
-               free((void *)(ce->real_address));
-               free((void *)ce);
+               if(ce->real_address != NULL)
+                  free((void *)(ce->real_address));
+               ce->real_address = NULL;
+               if(ce != NULL)
+                  free((void *)ce);
+               ce = NULL;
        }
        gc->count--;
 }
@@ -901,8 +914,12 @@
        
        if(gc->inuse_head !=0)
                printf("Error in take off inuse\n");
-       free((void*)(ce->real_address));
-       free(ce);
+       if(ce->real_address != NULL)
+          free((void*)(ce->real_address));
+       ce->real_address = NULL;
+       if(ce != NULL)
+          free(ce);
+       ce = NULL;
 }
 
 /*************************************************************************
@@ -978,8 +995,8 @@
 
 #ifdef HAVE_ANSIC_C
 struct cache_ent *
-allocate_write_buffer( struct cache *gc, long long fd, long long size,long 
long op, 
-       off64_t offset, long long w_depth, long long direct, char *buffer, char 
*free_addr)
+allocate_write_buffer( struct cache *gc, long long fd, long long offset, long 
long size,long long op, 
+       long long w_depth, long long direct, char *buffer, char *free_addr)
 #else
 struct cache_ent *
 allocate_write_buffer(gc,fd,offset,size,op,w_depth,direct,buffer,free_addr)
@@ -1013,7 +1030,7 @@
        {
                ce->real_address = malloc((size_t)(size+page_size));
                temp = (intptr_t)ce->real_address;
-               temp = (temp+page_size) & ~(page_size-1);
+               temp = (temp+(page_size-1)) & ~(page_size-1);
                ce->myaiocb.aio_buf=(volatile void *)temp;
        }
        else
@@ -1073,7 +1090,6 @@
 {
        while(gc->w_head)
        {
-               /*printf("async_write_finish: Waiting for buffer %x to 
finish\n",gc->w_head->myaiocb.aio_buf);*/
                async_wait_for_write(gc);
        }
 }
@@ -1097,9 +1113,11 @@
        if(gc->w_head==0)
                return;
        ce=gc->w_head;
+        if(ce == NULL)
+               return;
        gc->w_head=ce->forward;
        gc->w_count--;
-       ce->forward=0;
+       ce->forward=NULL;
        if(ce==gc->w_tail)
                gc->w_tail=0;
        /*printf("Wait for buffer %x  offset %lld  size %zd to finish\n",
@@ -1130,9 +1148,12 @@
 
        if(!ce->direct)
        {
-               /* printf("Freeing buffer %x\n",ce->real_address);*/
-               free((void *)(ce->real_address));
-               free((void *)ce);
+               if(ce->real_address != NULL)
+                  free((void *)(ce->real_address)); /* Causes crash. */
+               ce->real_address=NULL;
+               if(ce != NULL)
+                  free((void *)ce);
+               ce=NULL;
        }
 
 }
@@ -1149,14 +1170,14 @@
  *************************************************************************/
 #ifdef HAVE_ANSIC_C
 size_t
-async_write_no_copy(struct cache *gc,long long fd,char *buffer,long long 
size,off64_t offset,long long depth,char *free_addr)
+async_write_no_copy(struct cache *gc,long long fd,char *buffer,long long 
size,long long offset,long long depth,char *free_addr)
 #else
 size_t
 async_write_no_copy(gc,fd,buffer,size,offset,depth,free_addr)
 struct cache *gc;
 long long fd,size;
 char *buffer;
-off64_t offset;
+long long offset;
 long long depth;
 char *free_addr;
 #endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/iozone3_471/src/current/libbif.c 
new/iozone3_483/src/current/libbif.c
--- old/iozone3_471/src/current/libbif.c        2017-09-20 04:17:08.000000000 
+0200
+++ new/iozone3_483/src/current/libbif.c        2018-11-21 19:15:58.000000000 
+0100
@@ -27,7 +27,7 @@
 #include <string.h>
 #endif
 
-#if defined(linux) || defined(__DragonFly__) || defined(IOZ_macosx) || 
defined(__NetBSD__)
+#if defined(linux) || defined(__DragonFly__) || defined(IOZ_macosx) || 
defined(__NetBSD__) || defined(Windows)
 #include <unistd.h>
 #include <stdlib.h>
 #endif
@@ -91,7 +91,7 @@
 /*       column                                                        */
 /************************************************************************/
 
-char libbif_version[] = "Libbif Version $Revision: 3.30 $";
+char libbif_version[] = "Libbif Version $Revision: 3.31 $";
 #endif
 
 #define BOF 0x9
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/iozone3_471/src/current/makefile 
new/iozone3_483/src/current/makefile
--- old/iozone3_471/src/current/makefile        2017-09-20 04:17:08.000000000 
+0200
+++ new/iozone3_483/src/current/makefile        2018-11-21 19:15:58.000000000 
+0100
@@ -1,5 +1,5 @@
 #
-# Version $Revision: 1.148 $
+# Version $Revision: 1.149 $
 #
 # The makefile for building all versions of iozone for all supported
 # platforms
@@ -1252,7 +1252,7 @@
        @echo "Building iozone for Windows (No async I/O)"
        @echo ""
        $(GCC) -c -O -Dunix -DHAVE_ANSIC_C -DNO_MADVISE  \
-               -DWindows $(CFLAGS) -DDONT_HAVE_O_DIRECT iozone.c \
+               -DWindows $(CFLAGS) iozone.c \
                -o iozone_windows.o
        $(GCC) -c -O -Dunix -DHAVE_ANSIC_C -DNO_MADVISE \
                -DWindows $(CFLAGS) libbif.c -o libbif.o
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/iozone3_471/src/current/spec.in 
new/iozone3_483/src/current/spec.in
--- old/iozone3_471/src/current/spec.in 2017-09-20 04:17:08.000000000 +0200
+++ new/iozone3_483/src/current/spec.in 2018-11-21 19:15:58.000000000 +0100
@@ -1,7 +1,7 @@
 Summary: Iozone Filesystem Benchmark
 Name: iozone
 Version: 3
-Release: 471
+Release: 483
 License: Freeware
 Group: Applications/Engineering
 Source: %{name}%{version}_%{release}.tar
@@ -25,7 +25,7 @@
 ##
 ## SETUP and PATCH
 ##
-%setup -n iozone3_471/src/current
+%setup -n iozone3_483/src/current
 
 
 ##
@@ -75,22 +75,22 @@
 ##
 %install
 mkdir -p $RPM_BUILD_ROOT/opt/iozone/bin
-cp $RPM_BUILD_DIR/iozone3_471/src/current/iozone 
$RPM_BUILD_ROOT/opt/iozone/bin/
-cp $RPM_BUILD_DIR/iozone3_471/src/current/fileop 
$RPM_BUILD_ROOT/opt/iozone/bin/
-cp $RPM_BUILD_DIR/iozone3_471/src/current/pit_server 
$RPM_BUILD_ROOT/opt/iozone/bin/
-cp $RPM_BUILD_DIR/iozone3_471/src/current/Generate_Graphs 
$RPM_BUILD_ROOT/opt/iozone/bin/
-cp $RPM_BUILD_DIR/iozone3_471/src/current/gengnuplot.sh 
$RPM_BUILD_ROOT/opt/iozone/bin/
-cp $RPM_BUILD_DIR/iozone3_471/src/current/gnu3d.dem 
$RPM_BUILD_ROOT/opt/iozone/bin/
+cp $RPM_BUILD_DIR/iozone3_483/src/current/iozone 
$RPM_BUILD_ROOT/opt/iozone/bin/
+cp $RPM_BUILD_DIR/iozone3_483/src/current/fileop 
$RPM_BUILD_ROOT/opt/iozone/bin/
+cp $RPM_BUILD_DIR/iozone3_483/src/current/pit_server 
$RPM_BUILD_ROOT/opt/iozone/bin/
+cp $RPM_BUILD_DIR/iozone3_483/src/current/Generate_Graphs 
$RPM_BUILD_ROOT/opt/iozone/bin/
+cp $RPM_BUILD_DIR/iozone3_483/src/current/gengnuplot.sh 
$RPM_BUILD_ROOT/opt/iozone/bin/
+cp $RPM_BUILD_DIR/iozone3_483/src/current/gnu3d.dem 
$RPM_BUILD_ROOT/opt/iozone/bin/
 
 mkdir -p $RPM_BUILD_ROOT/opt/iozone/docs
-cp $RPM_BUILD_DIR/iozone3_471/docs/IOzone_msword_98.pdf 
$RPM_BUILD_ROOT/opt/iozone/docs/
-cp $RPM_BUILD_DIR/iozone3_471/docs/Run_rules.doc 
$RPM_BUILD_ROOT/opt/iozone/docs/
-cp $RPM_BUILD_DIR/iozone3_471/docs/IOzone_msword_98.doc 
$RPM_BUILD_ROOT/opt/iozone/docs/
-cp $RPM_BUILD_DIR/iozone3_471/docs/Iozone_ps.gz 
$RPM_BUILD_ROOT/opt/iozone/docs/
-cp $RPM_BUILD_DIR/iozone3_471/src/current/Gnuplot.txt 
$RPM_BUILD_ROOT/opt/iozone/docs/
+cp $RPM_BUILD_DIR/iozone3_483/docs/IOzone_msword_98.pdf 
$RPM_BUILD_ROOT/opt/iozone/docs/
+cp $RPM_BUILD_DIR/iozone3_483/docs/Run_rules.doc 
$RPM_BUILD_ROOT/opt/iozone/docs/
+cp $RPM_BUILD_DIR/iozone3_483/docs/IOzone_msword_98.doc 
$RPM_BUILD_ROOT/opt/iozone/docs/
+cp $RPM_BUILD_DIR/iozone3_483/docs/Iozone_ps.gz 
$RPM_BUILD_ROOT/opt/iozone/docs/
+cp $RPM_BUILD_DIR/iozone3_483/src/current/Gnuplot.txt 
$RPM_BUILD_ROOT/opt/iozone/docs/
 
 mkdir -p $RPM_BUILD_ROOT/opt/iozone/man/man1
-cp $RPM_BUILD_DIR/iozone3_471/docs/iozone.1 
$RPM_BUILD_ROOT/opt/iozone/man/man1/
+cp $RPM_BUILD_DIR/iozone3_483/docs/iozone.1 
$RPM_BUILD_ROOT/opt/iozone/man/man1/
 
 
 ##


Reply via email to