Skip to content

Conversation

@egouriou-google
Copy link

write_hist_log: do not require ZLIB for a CLI client

Since td->client_type is always non-zero (CLI is 1, GUI is 2), the check if (td->client_type) in init.c always triggers, causing --write_hist_log to be unusable when ZLIB is not configured.

This patch proposes to replace the check with

if (td->client_type != FIO_CLIENT_TYPE_CLI) { ...

I am not 100% clear whether this is the right approach to check whether we are NOT in a client-server setup.
Fixes #1996

Signed-off-by: Eric Gouriou [email protected]

Since `td->client_type` is always non-zero (CLI is 1, GUI is 2),
the check `if (td->client_type)` in `init.c` always triggers,
causing --write_hist_log to be unusable when ZLIB is not configured.

This patch proposes to replace the check with
```
if (td->client_type != FIO_CLIENT_TYPE_CLI) { ...
```

I am not 100% clear whether this is the right approach to check
whether we are NOT in a client-server setup.

Fixes axboe#1996

Signed-off-by: Eric Gouriou <[email protected]>
@egouriou-google
Copy link
Author

I am very fuzzy on fio setups in client-server mode, and how they differ from local-only runs. Naively FIO_CLIENT_TYPE_CLI and FIO_CLIENT_TYPE_GUI could both refer to client-server mode, just with different types of remote clients. Since parse_options appears to set type to CLI (https://github.com/axboe/fio/blob/master/init.c#L3176), my best bet is that this denotes a local run. I'd be happy to be corrected.

@axboe
Copy link
Owner

axboe commented Oct 7, 2025

I am very fuzzy on fio setups in client-server mode, and how they differ from local-only runs. Naively FIO_CLIENT_TYPE_CLI and FIO_CLIENT_TYPE_GUI could both refer to client-server mode, just with different types of remote clients. Since parse_options appears to set type to CLI (https://github.com/axboe/fio/blob/master/init.c#L3176), my best bet is that this denotes a local run. I'd be happy to be corrected.

Yeah this looks odd. There are basically two types of CLI clients - standalone run, or a cli client connected to a backend. The latter needs zlib. So I don't think the patch is correct, it should should be type == CLI && remote client. Either that or a new FIO_CLIENT_TYPE_STANDALONE should be added.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Enabling --write_hist_log=foo fails if ZLIB not enabled

2 participants