* [PATCH 0/2] two small patches [not found] <CGME20210804182903uscas1p164abe67510e8fa693dbd5d999ecdf24f@uscas1p1.samsung.com> @ 2021-08-04 18:29 ` Vincent Fu [not found] ` <CGME20210804182905uscas1p2c6194b189e05c087e5cb4813c3c7abff@uscas1p2.samsung.com> ` (2 more replies) 0 siblings, 3 replies; 4+ messages in thread From: Vincent Fu @ 2021-08-04 18:29 UTC (permalink / raw) To: axboe, fio; +Cc: Vincent Fu Hello Jens, Please consider these two small patches that (1) clarify an error message and (2) fix a segfault. Vincent Vincent Fu (2): backend: clarify io scheduler setting error message ioengines: fix crash with --enghelp option backend.c | 2 +- ioengines.c | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) -- 2.25.1 ^ permalink raw reply [flat|nested] 4+ messages in thread
[parent not found: <CGME20210804182905uscas1p2c6194b189e05c087e5cb4813c3c7abff@uscas1p2.samsung.com>]
* [PATCH 1/2] backend: clarify io scheduler setting error message [not found] ` <CGME20210804182905uscas1p2c6194b189e05c087e5cb4813c3c7abff@uscas1p2.samsung.com> @ 2021-08-04 18:29 ` Vincent Fu 0 siblings, 0 replies; 4+ messages in thread From: Vincent Fu @ 2021-08-04 18:29 UTC (permalink / raw) To: axboe, fio; +Cc: Vincent Fu If you know *how* fio tries to confirm that the IO scheduler was successfully set, then the error message "io scheduler not found" makes sense. However, if you don't know what fio does to confirm the io scheduler setting, then the error message is confusing. This patch modifies the error message to indicate that the selected IO scheduler could not be set. Signed-off-by: Vincent Fu <vincent.fu@samsung.com> --- backend.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend.c b/backend.c index 6290e0d6..808e4362 100644 --- a/backend.c +++ b/backend.c @@ -1407,7 +1407,7 @@ static int set_ioscheduler(struct thread_data *td, struct fio_file *file) sprintf(tmp2, "[%s]", td->o.ioscheduler); if (!strstr(tmp, tmp2)) { - log_err("fio: io scheduler %s not found\n", td->o.ioscheduler); + log_err("fio: unable to set io scheduler to %s\n", td->o.ioscheduler); td_verror(td, EINVAL, "iosched_switch"); fclose(f); return 1; -- 2.25.1 ^ permalink raw reply related [flat|nested] 4+ messages in thread
[parent not found: <CGME20210804182905uscas1p2593bfafae6dcfa01c47c43290325888c@uscas1p2.samsung.com>]
* [PATCH 2/2] ioengines: fix crash with --enghelp option [not found] ` <CGME20210804182905uscas1p2593bfafae6dcfa01c47c43290325888c@uscas1p2.samsung.com> @ 2021-08-04 18:29 ` Vincent Fu 0 siblings, 0 replies; 4+ messages in thread From: Vincent Fu @ 2021-08-04 18:29 UTC (permalink / raw) To: axboe, fio; +Cc: Vincent Fu Since f6931a1dd35896433c8cc2e10de51372a2c496c4 commands like the following segfault: fio --enghelp=sg fio --enghelp=sg,sg_write_mode This is because free_ioengine() assumes that td->io_ops is not NULL. Make this true when free_ioengine() is called by fio_show_ioengine_help() to avoid the crash. Signed-off-by: Vincent Fu <vincent.fu@samsung.com> --- ioengines.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ioengines.c b/ioengines.c index dd61af07..d08a511a 100644 --- a/ioengines.c +++ b/ioengines.c @@ -692,17 +692,17 @@ int fio_show_ioengine_help(const char *engine) } td.o.ioengine = (char *)engine; - io_ops = load_ioengine(&td); + td.io_ops = load_ioengine(&td); - if (!io_ops) { + if (!td.io_ops) { log_info("IO engine %s not found\n", engine); return 1; } - if (io_ops->options) - ret = show_cmd_help(io_ops->options, sep); + if (td.io_ops->options) + ret = show_cmd_help(td.io_ops->options, sep); else - log_info("IO engine %s has no options\n", io_ops->name); + log_info("IO engine %s has no options\n", td.io_ops->name); free_ioengine(&td); return ret; -- 2.25.1 ^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 0/2] two small patches 2021-08-04 18:29 ` [PATCH 0/2] two small patches Vincent Fu [not found] ` <CGME20210804182905uscas1p2c6194b189e05c087e5cb4813c3c7abff@uscas1p2.samsung.com> [not found] ` <CGME20210804182905uscas1p2593bfafae6dcfa01c47c43290325888c@uscas1p2.samsung.com> @ 2021-08-04 18:50 ` Jens Axboe 2 siblings, 0 replies; 4+ messages in thread From: Jens Axboe @ 2021-08-04 18:50 UTC (permalink / raw) To: Vincent Fu, fio On 8/4/21 12:29 PM, Vincent Fu wrote: > Hello Jens, > > Please consider these two small patches that (1) clarify an error > message and (2) fix a segfault. > > Vincent > > Vincent Fu (2): > backend: clarify io scheduler setting error message > ioengines: fix crash with --enghelp option > > backend.c | 2 +- > ioengines.c | 10 +++++----- > 2 files changed, 6 insertions(+), 6 deletions(-) Applied, thanks. -- Jens Axboe ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-08-04 18:50 UTC | newest] Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- [not found] <CGME20210804182903uscas1p164abe67510e8fa693dbd5d999ecdf24f@uscas1p1.samsung.com> 2021-08-04 18:29 ` [PATCH 0/2] two small patches Vincent Fu [not found] ` <CGME20210804182905uscas1p2c6194b189e05c087e5cb4813c3c7abff@uscas1p2.samsung.com> 2021-08-04 18:29 ` [PATCH 1/2] backend: clarify io scheduler setting error message Vincent Fu [not found] ` <CGME20210804182905uscas1p2593bfafae6dcfa01c47c43290325888c@uscas1p2.samsung.com> 2021-08-04 18:29 ` [PATCH 2/2] ioengines: fix crash with --enghelp option Vincent Fu 2021-08-04 18:50 ` [PATCH 0/2] two small patches Jens Axboe
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).