Merge branch 'check_min_rate_cleanup' of https://github.com/PCPartPicker/fio
authorJens Axboe <axboe@kernel.dk>
Tue, 15 Feb 2022 21:15:58 +0000 (14:15 -0700)
committerJens Axboe <axboe@kernel.dk>
Tue, 15 Feb 2022 21:15:58 +0000 (14:15 -0700)
* 'check_min_rate_cleanup' of https://github.com/PCPartPicker/fio:
  Cleanup __check_min_rate

.appveyor.yml
eta.c
init.c

index 42b79958d46f20bb667a7c7049dde670aab791ec..b94eefe318e46393c5ca75a54d54456c5558f707 100644 (file)
@@ -44,6 +44,7 @@ after_build:
   - file.exe fio.exe
   - make.exe test
   - 'cd os\windows && dobuild.cmd %ARCHITECTURE% && cd ..'
+  - ls.exe ./os/windows/*.msi
   - ps: Get-ChildItem .\os\windows\*.msi | % { Push-AppveyorArtifact $_.FullName -FileName $_.Name -DeploymentName fio.msi }
 
 test_script:
diff --git a/eta.c b/eta.c
index ea1781f3b792147636210f38714abb089870a2da..17970c78dbfd94261403b6c67c536e875ad65fdb 100644 (file)
--- a/eta.c
+++ b/eta.c
@@ -420,6 +420,7 @@ bool calc_thread_status(struct jobs_eta *je, int force)
                if (is_power_of_2(td->o.kb_base))
                        je->is_pow2 = 1;
                je->unit_base = td->o.unit_base;
+               je->sig_figs = td->o.sig_figs;
                if (td->o.bw_avg_time < bw_avg_time)
                        bw_avg_time = td->o.bw_avg_time;
                if (td->runstate == TD_RUNNING || td->runstate == TD_VERIFYING
@@ -600,9 +601,9 @@ void display_thread_status(struct jobs_eta *je)
                char *tr, *mr;
 
                mr = num2str(je->m_rate[0] + je->m_rate[1] + je->m_rate[2],
-                               je->sig_figs, 0, je->is_pow2, N2S_BYTEPERSEC);
+                               je->sig_figs, 1, je->is_pow2, N2S_BYTEPERSEC);
                tr = num2str(je->t_rate[0] + je->t_rate[1] + je->t_rate[2],
-                               je->sig_figs, 0, je->is_pow2, N2S_BYTEPERSEC);
+                               je->sig_figs, 1, je->is_pow2, N2S_BYTEPERSEC);
 
                p += sprintf(p, ", %s-%s", mr, tr);
                free(tr);
diff --git a/init.c b/init.c
index 139351527bebb2abe3037f2f0b09391ef6f36b84..81c30f8c54819354047800b56992a46d10549c3d 100644 (file)
--- a/init.c
+++ b/init.c
@@ -1576,7 +1576,14 @@ static int add_job(struct thread_data *td, const char *jobname, int job_add_num,
        td->ts.sig_figs = o->sig_figs;
 
        init_thread_stat_min_vals(&td->ts);
-       td->ddir_seq_nr = o->ddir_seq_nr;
+
+       /*
+        * td->>ddir_seq_nr needs to be initialized to 1, NOT o->ddir_seq_nr,
+        * so that get_next_offset gets a new random offset the first time it
+        * is called, instead of keeping an initial offset of 0 for the first
+        * nr-1 calls
+        */
+       td->ddir_seq_nr = 1;
 
        if ((o->stonewall || o->new_group) && prev_group_jobs) {
                prev_group_jobs = 0;