Add async message processing

This commit is contained in:
Antonio SJ Musumeci 2022-11-29 17:24:09 -06:00
parent c89fbde48d
commit 24423b8d2a
22 changed files with 1535 additions and 764 deletions

View file

@ -107,7 +107,8 @@ Config::Config()
statfs_ignore(StatFSIgnore::ENUM::NONE),
symlinkify(false),
symlinkify_timeout(3600),
threads(0),
fuse_read_thread_count(-1),
fuse_process_thread_count(-1),
version(MERGERFS_VERSION),
writeback_cache(false),
xattr(XAttr::ENUM::PASSTHROUGH)
@ -173,7 +174,9 @@ Config::Config()
_map["statfs_ignore"] = &statfs_ignore;
_map["symlinkify"] = &symlinkify;
_map["symlinkify_timeout"] = &symlinkify_timeout;
_map["threads"] = &threads;
_map["threads"] = &fuse_read_thread_count;
_map["read-thread-count"] = &fuse_read_thread_count;
_map["process-thread-count"] = &fuse_process_thread_count;
_map["version"] = &version;
_map["xattr"] = &xattr;
}

View file

@ -138,7 +138,8 @@ public:
StatFSIgnore statfs_ignore;
ConfigBOOL symlinkify;
ConfigUINT64 symlinkify_timeout;
ConfigINT threads;
ConfigINT fuse_read_thread_count;
ConfigINT fuse_process_thread_count;
ConfigSTR version;
ConfigBOOL writeback_cache;
XAttr xattr;

View file

@ -95,16 +95,11 @@ set_kv_option(const std::string &key_,
static
void
set_threads(Config::Write &cfg_,
fuse_args *args_)
set_fuse_threads(Config::Write &cfg_,
fuse_args *args_)
{
int threads;
threads = l::calculate_thread_count(cfg_->threads);
cfg_->threads = threads;
set_kv_option("threads",cfg_->threads.to_string(),args_);
set_kv_option("read-thread-count",cfg_->fuse_read_thread_count.to_string(),args_);
set_kv_option("process-thread-count",cfg_->fuse_process_thread_count.to_string(),args_);
}
static
@ -413,6 +408,6 @@ namespace options
set_default_options(args_);
set_fsname(cfg,args_);
set_subtype(args_);
set_threads(cfg,args_);
set_fuse_threads(cfg,args_);
}
}