mirror of
https://github.com/trapexit/mergerfs.git
synced 2026-11-19 22:46:34 -05:00
Update the secondary group cache (#1492)
* Use concurrent_flat_map to build a global cache rather than per thread. * Create global maintanence thread manager for clearing unused cache entries.
This commit is contained in:
parent
9e626228be
commit
f852474073
17 changed files with 342 additions and 246 deletions
|
|
@ -8,6 +8,7 @@
|
|||
#include "scope_guard.hpp"
|
||||
#include "thread_pool.hpp"
|
||||
#include "syslog.hpp"
|
||||
#include "maintenance_thread.hpp"
|
||||
|
||||
#include "fuse_i.h"
|
||||
#include "fuse_kernel.h"
|
||||
|
|
@ -317,7 +318,7 @@ fuse_session_loop_mt(struct fuse_session *se_,
|
|||
pin_threads_type_);
|
||||
|
||||
while(!fuse_session_exited(se_))
|
||||
sem_wait(&finished);
|
||||
sem_wait(&finished);
|
||||
|
||||
sem_destroy(&finished);
|
||||
|
||||
|
|
@ -325,22 +326,23 @@ fuse_session_loop_mt(struct fuse_session *se_,
|
|||
}
|
||||
|
||||
int
|
||||
fuse_loop_mt(struct fuse *f)
|
||||
fuse_loop_mt(struct fuse *f_)
|
||||
{
|
||||
if(f == NULL)
|
||||
int res;
|
||||
|
||||
if(f_ == NULL)
|
||||
return -1;
|
||||
|
||||
int res = fuse_start_maintenance_thread(f);
|
||||
if(res)
|
||||
return -1;
|
||||
MaintenanceThread::setup();
|
||||
fuse_populate_maintenance_thread(f_);
|
||||
|
||||
res = fuse_session_loop_mt(fuse_get_session(f),
|
||||
res = fuse_session_loop_mt(fuse_get_session(f_),
|
||||
fuse_config_get_read_thread_count(),
|
||||
fuse_config_get_process_thread_count(),
|
||||
fuse_config_get_process_thread_queue_depth(),
|
||||
fuse_config_get_pin_threads());
|
||||
|
||||
fuse_stop_maintenance_thread(f);
|
||||
MaintenanceThread::stop();
|
||||
|
||||
return res;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue