examples/fio_plugin: don't allow starting in daemonized fio server
A nice message about not supporting fio daemon mode is better than seeing CRC errors. Resolves #1118 Change-Id: I274e7a053e2fa464e26a19bf2b8b76395ad40e7c Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com> Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/575 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
parent
abb942bda1
commit
9ad234a121
@ -405,6 +405,20 @@ spdk_fio_setup(struct thread_data *td)
|
||||
unsigned int i;
|
||||
struct fio_file *f;
|
||||
|
||||
/* we might be running in a daemonized FIO instance where standard
|
||||
* input and output were closed and fds 0, 1, and 2 are reused
|
||||
* for something important by FIO. We can't ensure we won't print
|
||||
* anything (and so will our dependencies, e.g. DPDK), so abort early.
|
||||
* (is_backend is an fio global variable)
|
||||
*/
|
||||
if (is_backend) {
|
||||
char buf[1024];
|
||||
snprintf(buf, sizeof(buf),
|
||||
"SPDK FIO plugin won't work with daemonized FIO server.");
|
||||
fio_server_text_output(FIO_LOG_ERR, buf, sizeof(buf));
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (!td->o.use_thread) {
|
||||
SPDK_ERRLOG("must set thread=1 when using spdk plugin\n");
|
||||
return -1;
|
||||
|
@ -372,6 +372,20 @@ static int spdk_fio_setup(struct thread_data *td)
|
||||
char *trid_info;
|
||||
unsigned int i;
|
||||
|
||||
/* we might be running in a daemonized FIO instance where standard
|
||||
* input and output were closed and fds 0, 1, and 2 are reused
|
||||
* for something important by FIO. We can't ensure we won't print
|
||||
* anything (and so will our dependencies, e.g. DPDK), so abort early.
|
||||
* (is_backend is an fio global variable)
|
||||
*/
|
||||
if (is_backend) {
|
||||
char buf[1024];
|
||||
snprintf(buf, sizeof(buf),
|
||||
"SPDK FIO plugin won't work with daemonized FIO server.");
|
||||
fio_server_text_output(FIO_LOG_ERR, buf, sizeof(buf));
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (!td->o.use_thread) {
|
||||
log_err("spdk: must set thread=1 when using spdk plugin\n");
|
||||
return 1;
|
||||
|
Loading…
Reference in New Issue
Block a user