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 <zhsgao@hotmail.com>
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)