From 1f591cf09731defb7c1f62759729f975a2ecdf85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Haziza?= Date: Sat, 14 Dec 2024 19:11:18 +0100 Subject: [PATCH] Removing the idle_threads settings. It is discouraged --- src/includes.h | 3 +-- src/main.c | 4 ---- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/src/includes.h b/src/includes.h index 27e34ad..dec9161 100644 --- a/src/includes.h +++ b/src/includes.h @@ -144,8 +144,7 @@ struct fs_config { /* multithreaded */ int singlethread; int clone_fd; - int idle_threads; - int max_threads; + unsigned int max_threads; }; diff --git a/src/main.c b/src/main.c index 4756e5e..b9b0bde 100644 --- a/src/main.c +++ b/src/main.c @@ -84,7 +84,6 @@ static struct fuse_opt fs_opts[] = { /* if multithreaded */ CRYPT4GH_SQLITE_OPT("-s" , singlethread , 1), CRYPT4GH_SQLITE_OPT("clone_fd" , clone_fd , 1), - CRYPT4GH_SQLITE_OPT("idle_threads=%u", idle_threads, 0), CRYPT4GH_SQLITE_OPT("max_threads=%u", max_threads, 0), CRYPT4GH_SQLITE_OPT("entry_timeout=%lf", entry_timeout, 0), @@ -291,9 +290,7 @@ int main(int argc, char *argv[]) config.entry_timeout = DEFAULT_ENTRY_TIMEOUT; config.attr_timeout = DEFAULT_ATTR_TIMEOUT; - config.max_threads = DEFAULT_MAX_THREADS; - config.idle_threads = UINT_MAX; config.uid = getuid(); /* current user */ config.gid = getgid(); /* current group */ @@ -430,7 +427,6 @@ int main(int argc, char *argv[]) D2("Mode: multi-threaded (max threads: %d)", config.max_threads); struct fuse_loop_config *cf = fuse_loop_cfg_create(); fuse_loop_cfg_set_clone_fd(cf, config.clone_fd); - fuse_loop_cfg_set_idle_threads(cf, config.idle_threads); fuse_loop_cfg_set_max_threads(cf, config.max_threads); res = fuse_session_loop_mt(se, cf); fuse_loop_cfg_destroy(cf);