Skip to content

Commit

Permalink
fio_cli stops at -- + fix IO worker restart signaling
Browse files Browse the repository at this point in the history
  • Loading branch information
boazsegev committed Jan 31, 2025
1 parent 83fec68 commit 8f7a48a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion fio-stl.h
Original file line number Diff line number Diff line change
Expand Up @@ -13118,6 +13118,8 @@ SFUNC void fio_cli_start FIO_NOOP(int argc,
(key.len == 6 && key.buf[1] == '-' &&
(fio_buf2u32u(key.buf + 2) | 0x20202020UL) == help_value32))
fio___cli_print_help();
if (key.len == 2 && key.buf[1] == '-') /* "--" detected, skip the rest */
break;
/* look for longest argument match for argument (find, i.e. -arg=val) */
for (;;) {
fio___cli_aliases_s o = {.name = fio_cli_str_tmp(key)};
Expand Down Expand Up @@ -37313,7 +37315,7 @@ SFUNC void fio___io_restart(void *workers_, void *ignr_) {
FIO___LOCK_LOCK(FIO___IO.lock);
FIO_LIST_EACH(fio___io_pid_s, node, &FIO___IO.pids, w) {
w->stop = 1;
fio_thread_kill(w->pid, SIGUSR1);
fio_thread_kill(w->pid, FIO___IO.restart_signal);
}
FIO___LOCK_UNLOCK(FIO___IO.lock);
/* switch to single mode? */
Expand Down
2 changes: 2 additions & 0 deletions fio-stl/005 cli.h
Original file line number Diff line number Diff line change
Expand Up @@ -814,6 +814,8 @@ SFUNC void fio_cli_start FIO_NOOP(int argc,
(key.len == 6 && key.buf[1] == '-' &&
(fio_buf2u32u(key.buf + 2) | 0x20202020UL) == help_value32))
fio___cli_print_help();
if (key.len == 2 && key.buf[1] == '-') /* "--" detected, skip the rest */
break;
/* look for longest argument match for argument (find, i.e. -arg=val) */
for (;;) {
fio___cli_aliases_s o = {.name = fio_cli_str_tmp(key)};
Expand Down
2 changes: 1 addition & 1 deletion fio-stl/402 io reactor.h
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,7 @@ SFUNC void fio___io_restart(void *workers_, void *ignr_) {
FIO___LOCK_LOCK(FIO___IO.lock);
FIO_LIST_EACH(fio___io_pid_s, node, &FIO___IO.pids, w) {
w->stop = 1;
fio_thread_kill(w->pid, SIGUSR1);
fio_thread_kill(w->pid, FIO___IO.restart_signal);
}
FIO___LOCK_UNLOCK(FIO___IO.lock);
/* switch to single mode? */
Expand Down

0 comments on commit 8f7a48a

Please sign in to comment.