Fix O_DIRECT memory alignment
[fio.git] / fio.h
diff --git a/fio.h b/fio.h
index 7c059d10ff65c34b2371f3f4fd0e5f634e8d2b75..b19101c20a4924892610bd78b0f6d645f3b93e9b 100644 (file)
--- a/fio.h
+++ b/fio.h
@@ -192,6 +192,7 @@ struct thread_options {
        unsigned int thinktime_spin;
        unsigned int thinktime_blocks;
        unsigned int fsync_blocks;
+       unsigned int fdatasync_blocks;
        unsigned int start_delay;
        unsigned long long timeout;
        unsigned long long ramp_time;
@@ -201,6 +202,7 @@ struct thread_options {
        unsigned long long zone_size;
        unsigned long long zone_skip;
        enum fio_memtype mem_type;
+       unsigned int mem_align;
 
        unsigned int stonewall;
        unsigned int new_group;
@@ -654,4 +656,9 @@ static inline int should_check_rate(struct thread_data *td,
        return ret;
 }
 
+static inline int is_power_of_2(unsigned int val)
+{
+       return (val != 0 && ((val & (val - 1)) == 0));
+}
+
 #endif