diff options
author | Bernd Schubert <bschubert@ddn.com> | 2025-04-24 19:38:21 +0200 |
---|---|---|
committer | Bernd Schubert <bernd@bsbernd.com> | 2025-04-28 19:57:39 +0200 |
commit | 3421cab7773268e0afb4b300775b4d60f2b7acf5 (patch) | |
tree | 12a4ef7e88680d0d5465eff3dd595cb1805e45ed | |
parent | 91c9803cb4dc5251abbb9af312c917dddfdd689e (diff) | |
download | libfuse-3421cab7773268e0afb4b300775b4d60f2b7acf5.tar.gz |
env variables to override default io-uring enable and q-depth
We want to especially test with and without io-uring being
enabled. Ideally without modifying all tests - that is
what the env variable can be used for.
Signed-off-by: Bernd Schubert <bschubert@ddn.com>
-rw-r--r-- | lib/fuse_lowlevel.c | 13 | ||||
-rwxr-xr-x | test/ci-build.sh | 7 |
2 files changed, 18 insertions, 2 deletions
diff --git a/lib/fuse_lowlevel.c b/lib/fuse_lowlevel.c index c7cbebd..8c9cb90 100644 --- a/lib/fuse_lowlevel.c +++ b/lib/fuse_lowlevel.c @@ -3903,8 +3903,17 @@ fuse_session_new_versioned(struct fuse_args *args, se->conn.max_write = FUSE_DEFAULT_MAX_PAGES_LIMIT * getpagesize(); se->bufsize = se->conn.max_write + FUSE_BUFFER_HEADER_SIZE; se->conn.max_readahead = UINT_MAX; - se->uring.enable = SESSION_DEF_URING_ENABLE; - se->uring.q_depth = SESSION_DEF_URING_Q_DEPTH; + + /* + * Allow overriding with env, mostly to avoid the need to modify + * all tests. I.e. to test with and without io-uring being enabled. + */ + se->uring.enable = getenv("FUSE_URING_ENABLE") ? + atoi(getenv("FUSE_URING_ENABLE")) : + SESSION_DEF_URING_ENABLE; + se->uring.q_depth = getenv("FUSE_URING_QUEUE_DEPTH") ? + atoi(getenv("FUSE_URING_QUEUE_DEPTH")) : + SESSION_DEF_URING_Q_DEPTH; /* Parse options */ if(fuse_opt_parse(args, se, fuse_ll_opts, NULL) == -1) diff --git a/test/ci-build.sh b/test/ci-build.sh index 86230bd..2bced37 100755 --- a/test/ci-build.sh +++ b/test/ci-build.sh @@ -118,6 +118,13 @@ sanitized_build() sudo rm -fr ${PREFIX_DIR} ) +# Sanitized with io-uring +export CC=clang +export CXX=clang++ +export FUSE_URING_ENABLE=1 +sanitized_build +unset FUSE_URING_ENABLE + # 32-bit sanitized build export CC=clang export CXX=clang++ |