make fio scripts python3-ready
[fio.git] / diskutil.c
index 1f2471be50470377c0acca7bdec3e441e5c1b8fa..b973120c1abc89b7bea66698a0b38e47315858f3 100644 (file)
@@ -1,13 +1,15 @@
 #include <stdio.h>
 #include <string.h>
-#include <sys/time.h>
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <sys/sysmacros.h>
 #include <dirent.h>
 #include <libgen.h>
-#include <math.h>
-#include <assert.h>
+#ifdef CONFIG_VALGRIND_DEV
+#include <valgrind/drd.h>
+#else
+#define DRD_IGNORE_VAR(x) do { } while (0)
+#endif
 
 #include "fio.h"
 #include "smalloc.h"
@@ -297,6 +299,7 @@ static struct disk_util *disk_util_add(struct thread_data *td, int majdev,
        if (!du)
                return NULL;
 
+       DRD_IGNORE_VAR(du->users);
        memset(du, 0, sizeof(*du));
        INIT_FLIST_HEAD(&du->list);
        l = snprintf(du->path, sizeof(du->path), "%s/stat", path);