From: Zhansong Gao Date: Mon, 28 Nov 2022 09:20:15 +0000 (+0800) Subject: client/fuse: set max_idle_threads to the correct value X-Git-Tag: v18.1.0~596^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=70425c75df1161befe4b4f35739d1432aa0e3505;p=ceph.git client/fuse: set max_idle_threads to the correct value When the version of the libfuse is 3.1 or later, the fuse worker thread of ceph-fuse keeps recreating and deleting file or directory will be blocked forever. It is caused by parameter 'max_idle_threads' being set to 0 and the relevant logic is in function 'fuse_do_work' of libfuse. Parameter 'max_idle_threads' can be set by function 'fuse_parse_cmdline', it may be the default value(10 before version 3.12 and -1 after) or a value set by user. It should not be set to 0. Fixes: https://tracker.ceph.com/issues/58109 Signed-off-by: Zhansong Gao --- diff --git a/src/client/fuse_ll.cc b/src/client/fuse_ll.cc index 2f4cd28b3407..517eb79ce8c2 100644 --- a/src/client/fuse_ll.cc +++ b/src/client/fuse_ll.cc @@ -1605,9 +1605,10 @@ int CephFuse::Handle::loop() if (fuse_multithreaded) { #if FUSE_VERSION >= FUSE_MAKE_VERSION(3, 1) { - struct fuse_loop_config conf = { 0 }; - - conf.clone_fd = opts.clone_fd; + struct fuse_loop_config conf = { + clone_fd: opts.clone_fd, + max_idle_threads: opts.max_idle_threads + }; return fuse_session_loop_mt(se, &conf); } #elif FUSE_VERSION >= FUSE_MAKE_VERSION(3, 0)