Merge branch 'master' of ssh://git.kernel.dk/data/git/fio
authorJens Axboe <axboe@fb.com>
Wed, 21 Jan 2015 23:57:00 +0000 (00:57 +0100)
committerJens Axboe <axboe@fb.com>
Wed, 21 Jan 2015 23:57:00 +0000 (00:57 +0100)
FIO-VERSION-GEN
configure
crc/sha1.c
crc/sha1.h
crc/test.c
diskutil.c
engines/net.c
memory.c
os/windows/install.wxs

index a8c8e6598b2a9eab3f1740f1c5a7e9b9a93a135c..da750229534af2c7d371051bb2c20cb15756bee1 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 GVF=FIO-VERSION-FILE
-DEF_VER=fio-2.2.4
+DEF_VER=fio-2.2.5
 
 LF='
 '
index 172b235bc540ef63ae25125a725a398c96d018a1..6e1376f27f03d256a45f93cee087b91316da885d 100755 (executable)
--- a/configure
+++ b/configure
@@ -165,6 +165,8 @@ for opt do
   ;;
   --enable-libhdfs) libhdfs="yes"
   ;;
+  --disable-shm) output_sym "CONFIG_NO_SHM"
+  ;;
   --help)
     show_help="yes"
     ;;
index 117fbd9c2938b35a57b691ab05cf5a5acb8bcfad..8d64c8ee7b836e9322c8c6b9dde01b718f1416d6 100644 (file)
@@ -55,7 +55,7 @@ void fio_sha1_update(struct fio_sha1_ctx *ctx, const void *data,
                memcpy(ctx->W, data, len);
 }
 
-void fio_sha1_final(unsigned char hashout[20], struct fio_sha1_ctx *ctx)
+void fio_sha1_final(struct fio_sha1_ctx *ctx)
 {
        static const unsigned char pad[64] = { 0x80 };
        unsigned int padlen[2];
@@ -69,11 +69,6 @@ void fio_sha1_final(unsigned char hashout[20], struct fio_sha1_ctx *ctx)
        i = ctx->size & 63;
        fio_sha1_update(ctx, pad, 1+ (63 & (55 - i)));
        fio_sha1_update(ctx, padlen, 8);
-
-       /* Output hash
-        */
-       for (i = 0; i < 5; i++)
-               ((unsigned int *)hashout)[i] = htonl(ctx->H[i]);
 }
 
 #if defined(__i386__) || defined(__x86_64__)
index 14af44a922a70686bc96c4477c3ca202761b947e..75317f76c6f553621862073ed8d5a21dc29e1f32 100644 (file)
@@ -15,6 +15,6 @@ struct fio_sha1_ctx {
 
 void fio_sha1_init(struct fio_sha1_ctx *);
 void fio_sha1_update(struct fio_sha1_ctx *, const void *dataIn, unsigned long len);
-void fio_sha1_final(unsigned char hashout[20], struct fio_sha1_ctx *);
+void fio_sha1_final(struct fio_sha1_ctx *);
 
 #endif
index bc5cc45658ec4818e3b57ef9f03927c9f1c6bc29..dbc5653ffc14410711ed6a7df1a7d333aae0a629 100644 (file)
@@ -111,8 +111,10 @@ static void t_sha1(struct test_type *t, void *buf, size_t size)
 
        fio_sha1_init(&ctx);
 
-       for (i = 0; i < NR_CHUNKS; i++)
+       for (i = 0; i < NR_CHUNKS; i++) {
                fio_sha1_update(&ctx, buf, size);
+               fio_sha1_final(&ctx);
+       }
 }
 
 static void t_sha256(struct test_type *t, void *buf, size_t size)
index 98ae2fe302008bf0c2b10cd55cb80c0a2b7327ae..52d87f6433d85132b2ae2fd3e6bfdc127fc64393 100644 (file)
@@ -694,6 +694,9 @@ void show_disk_util(int terse, struct json_object *parent)
        struct flist_head *entry;
        struct disk_util *du;
 
+       if (!disk_util_mutex)
+               return;
+
        fio_mutex_down(disk_util_mutex);
 
        if (flist_empty(&disk_list)) {
index 7a0fe696c1b81c7ff0dba9539387a0f16c5d7bdb..cd19535294a083eff56c97036aef75f8c4615541 100644 (file)
@@ -484,6 +484,9 @@ static void store_udp_seq(struct netio_data *nd, struct io_u *io_u)
 {
        struct udp_seq *us;
 
+       if (io_u->xfer_buflen < sizeof(*us))
+               return;
+
        us = io_u->xfer_buf + io_u->xfer_buflen - sizeof(*us);
        us->magic = cpu_to_le64((uint64_t) FIO_UDP_SEQ_MAGIC);
        us->bs = cpu_to_le64((uint64_t) io_u->xfer_buflen);
@@ -496,6 +499,9 @@ static void verify_udp_seq(struct thread_data *td, struct netio_data *nd,
        struct udp_seq *us;
        uint64_t seq;
 
+       if (io_u->xfer_buflen < sizeof(*us))
+               return;
+
        if (nd->seq_off)
                return;
 
index f81c2dd44aabaf937dd5db3b88c10a0cd6a992ca..23a0d94b73e3d353b61044fe85149dfda4e59f55 100644 (file)
--- a/memory.c
+++ b/memory.c
@@ -63,6 +63,7 @@ int fio_pin_memory(struct thread_data *td)
 
 static int alloc_mem_shm(struct thread_data *td, unsigned int total_mem)
 {
+#ifndef CONFIG_NO_SHM
        int flags = IPC_CREAT | S_IRUSR | S_IWUSR;
 
        if (td->o.mem_type == MEM_SHMHUGE) {
@@ -104,15 +105,21 @@ static int alloc_mem_shm(struct thread_data *td, unsigned int total_mem)
        }
 
        return 0;
+#else
+       log_err("fio: shm not supported\n");
+       return 1;
+#endif
 }
 
 static void free_mem_shm(struct thread_data *td)
 {
+#ifndef CONFIG_NO_SHM
        struct shmid_ds sbuf;
 
        dprint(FD_MEM, "shmdt/ctl %d %p\n", td->shm_id, td->orig_buffer);
        shmdt(td->orig_buffer);
        shmctl(td->shm_id, IPC_RMID, &sbuf);
+#endif
 }
 
 static int alloc_mem_mmap(struct thread_data *td, size_t total_mem)
index 2f75d00101a9840b05783de62da654d1f037084b..f72dfb1cc43dcfdb7af3082ed856a0e200fc6f95 100755 (executable)
@@ -10,7 +10,7 @@
        <Product Id="*"
          Codepage="1252" Language="1033"
          Manufacturer="fio" Name="fio"
-         UpgradeCode="2338A332-5511-43CF-B9BD-5C60496CCFCC" Version="2.2.4">
+         UpgradeCode="2338A332-5511-43CF-B9BD-5C60496CCFCC" Version="2.2.5">
                <Package
                  Description="Flexible IO Tester"
                  InstallerVersion="301" Keywords="Installer,MSI,Database"