Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/horshack-dpreview/fio
Browse files Browse the repository at this point in the history
* 'master' of https://github.com/horshack-dpreview/fio:
  Add -replay_skip support for fio-generated I/O logs
  • Loading branch information
vincentkfu committed Feb 3, 2023
2 parents 7d7a704 + ff6131a commit 3a6ae7b
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions iolog.c
Original file line number Diff line number Diff line change
Expand Up @@ -492,17 +492,25 @@ static bool read_iolog(struct thread_data *td)
*/
if (!strcmp(act, "wait"))
rw = DDIR_WAIT;
else if (!strcmp(act, "read"))
else if (!strcmp(act, "read")) {
if (td->o.replay_skip & (1u << DDIR_READ))
continue;
rw = DDIR_READ;
else if (!strcmp(act, "write"))
} else if (!strcmp(act, "write")) {
if (td->o.replay_skip & (1u << DDIR_WRITE))
continue;
rw = DDIR_WRITE;
else if (!strcmp(act, "sync"))
} else if (!strcmp(act, "sync")) {
if (td->o.replay_skip & (1u << DDIR_SYNC))
continue;
rw = DDIR_SYNC;
else if (!strcmp(act, "datasync"))
} else if (!strcmp(act, "datasync"))
rw = DDIR_DATASYNC;
else if (!strcmp(act, "trim"))
else if (!strcmp(act, "trim")) {
if (td->o.replay_skip & (1u << DDIR_TRIM))
continue;
rw = DDIR_TRIM;
else {
} else {
log_err("fio: bad iolog file action: %s\n",
act);
continue;
Expand Down

0 comments on commit 3a6ae7b

Please sign in to comment.