Merge branch 'master' into gfio
[fio.git] / fio.h
diff --git a/fio.h b/fio.h
index 05406cbc9582261d27e86b4b0e8839405602d42a..1cb44e60dcd9bedc1d69405e1ab59803052b06fe 100644 (file)
--- a/fio.h
+++ b/fio.h
@@ -113,6 +113,8 @@ struct thread_data {
        uint64_t stat_io_blocks[DDIR_RWDIR_CNT];
        struct timeval iops_sample_time;
 
+       volatile int update_rusage;
+       struct fio_mutex *rusage_sem;
        struct rusage ru_start;
        struct rusage ru_end;
 
@@ -568,6 +570,14 @@ static inline int should_check_rate(struct thread_data *td,
        return ret;
 }
 
+static inline unsigned int td_max_bs(struct thread_data *td)
+{
+       unsigned int max_bs;
+
+       max_bs = max(td->o.max_bs[DDIR_READ], td->o.max_bs[DDIR_WRITE]);
+       return max(td->o.max_bs[DDIR_TRIM], max_bs);
+}
+
 static inline int is_power_of_2(unsigned int val)
 {
        return (val != 0 && ((val & (val - 1)) == 0));