Recent changes (master)
The following changes since commit fa23c09bfefb2b9c960d179ad67d356fbc29179f:
Merge branch 'push-lnvrzuqpnylp' of https://github.com/msuozzo/fio (2026-03-09 20:02:12 -0600)
are available in the Git repository at:
git://git.kernel.dk/fio.git master
for you to fetch changes up to 3a0e8ddf28ad32785ea3130ce0ee42524d835d60:
backend: correctly handle rate_iops combined with bssplit (2026-03-11 05:37:00 -0600)
----------------------------------------------------------------
Dmitry Fomichev (1):
backend: correctly handle rate_iops combined with bssplit
Vincent Fu (3):
fio: specify filename for --bandwidth-log option
ci: switch to actions/checkout@v6
ci: switch to upload-artifact@v6
.github/workflows/ci.yml | 6 +++--- .github/workflows/cifuzz.yml | 2 +- .github/workflows/qemu.yml | 2 +- HOWTO.rst | 7 +++++-- backend.c | 35 +++++++++++++++++++++++++++++------ fio.1 | 5 ++++- init.c | 7 ++++++- 7 files changed, 49 insertions(+), 15 deletions(-)
---
Diff of recent changes:
.github/workflows/ci.yml +3 -3
@@ -33,7 +33,7 @@ jobs: steps: - name: Checkout repo - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: Install dependencies run: ./ci/actions-install.sh - name: Build
@@ -102,7 +102,7 @@ jobs: if: ${{ contains( matrix.build, 'windows' ) }} run: git config --global core.autocrlf input - name: Checkout repo - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: Install Cygwin toolchain (Windows) if: ${{ startsWith(matrix.build, 'windows-cygwin') }} uses: cygwin/cygwin-install-action@master
@@ -151,7 +151,7 @@ jobs: - name: Upload installer as artifact (Windows) if: ${{ contains( matrix.build, 'windows' ) }} - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v6 with: name: ${{ matrix.build }}-installer path: os\windows\*.msi
.github/workflows/cifuzz.yml +1 -1
@@ -17,7 +17,7 @@ jobs: fuzz-seconds: 600 dry-run: false - name: Upload Crash - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v6 if: failure() && steps.build.outcome == 'success' with: name: artifacts
.github/workflows/qemu.yml +1 -1
@@ -67,7 +67,7 @@ jobs: steps: - name: Check out repository - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: Create tarball containing repository run: |
HOWTO.rst +5 -2
@@ -121,9 +121,12 @@ Command line options format. `json+` is like `json`, except it adds a full dump of the latency buckets. -.. option:: --bandwidth-log +.. option:: --bandwidth-log=filename - Generate aggregate bandwidth logs. + Generate aggregate bandwidth logs. `filename` is an optional argument. + If not given, Fio will by default create files called + "agg-{read,write,trim}_bw.log". If the filename argument is given, Fio + will create files called "{filename}-{read,write,trim}_bw.log". .. option:: --minimal
backend.c +29 -6
@@ -79,6 +79,8 @@ pthread_mutex_t overlap_check = PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP;pthread_mutex_t overlap_check =PTHREAD_MUTEX_INITIALIZER ;#endif +extern char *write_bw_log_name; +#define JOB_START_TIMEOUT (5 * 1000)static void sig_int (int sig)
@@ -842,15 +844,31 @@ static long long usec_for_io(struct thread_data *td, enum fio_ddir ddir) } td->last_usec[ddir] += val;return td->last_usec[ddir]; - }else if (bps) { + } + +if (!bps) +return 0 ; + +/* +* For rate_iops option combined with bssplit, recover +* the user provided IOPS value and calculate the I/O delay +* based on this value, not on bps. +*/ +if (!td->o.rate[ddir] && td->o.bssplit_nr[ddir]) { +uint64_t iops = bps / td->o.min_bs[ddir]; + +if (!iops) +return 0 ; + + td->last_usec[ddir] += (int64_t )(1000000 / iops); +return td->last_usec[ddir]; + }else {uint64_t bytes = td->rate_io_issue_bytes[ddir];uint64_t secs = bytes / bps;uint64_t remainder = bytes % bps;return remainder *1000000 / bps + secs *1000000 ; } - -return 0 ; }static void init_thinktime (struct thread_data *td)
@@ -2773,13 +2791,18 @@ int fio_backend(struct sk_out *sk_out)return 0 ;if (write_bw_log) { +char read[PATH_MAX ], write[PATH_MAX ], trim[PATH_MAX ];struct log_params p = { .log_type =IO_LOG_TYPE_BW , }; -setup_log (&agg_io_log[DDIR_READ ], &p,"agg-read_bw.log" ); -setup_log (&agg_io_log[DDIR_WRITE ], &p,"agg-write_bw.log" ); -setup_log (&agg_io_log[DDIR_TRIM ], &p,"agg-trim_bw.log" ); +snprintf (read,sizeof (read),"%s-read_bw.log" , write_bw_log_name); +snprintf (write,sizeof (write),"%s-write_bw.log" , write_bw_log_name); +snprintf (trim,sizeof (trim),"%s-trim_bw.log" , write_bw_log_name); + +setup_log (&agg_io_log[DDIR_READ ], &p, read); +setup_log (&agg_io_log[DDIR_WRITE ], &p, write); +setup_log (&agg_io_log[DDIR_TRIM ], &p, trim); }if (init_global_dedupe_working_set_seeds ()) {
fio.1 +4 -1
@@ -33,7 +33,10 @@ is a CSV based format. `json+' is like `json', except it adds a full dump of the latency buckets. .TP .BI \-\-bandwidth\-log -Generate aggregate bandwidth logs. +Generate aggregate bandwidth logs. `filename` is an optional argument. +If not given, Fio will by default create files called +"agg-{read,write,trim}_bw.log". If the filename argument is given, Fio +will create files called "{filename}-{read,write,trim}_bw.log". .TP .BI \-\-minimal Print statistics in a terse, semicolon\-delimited format.
init.c +6 -1
@@ -70,6 +70,7 @@ int nr_clients = 0;bool log_syslog = false;bool write_bw_log = false; +const char *write_bw_log_name;bool read_only = false;int status_interval =0 ;
@@ -109,7 +110,7 @@ static struct option l_opts[FIO_NR_OPTIONS] = { }, { .name = (char *) "bandwidth-log", - .has_arg = no_argument, + .has_arg = optional_argument, .val = 'b' | FIO_CLIENT_FLAG, }, {
@@ -2737,6 +2738,10 @@ int parse_cmd_line(int argc, char *argv[], int client_type)break ;case 'b' : write_bw_log = true; +if (optarg) + write_bw_log_name = optarg; +else + write_bw_log_name ="agg" ;break ;case 'o' : {FILE *tmp;