mirror of
https://github.com/trapexit/mergerfs.git
synced 2026-11-25 17:36:25 -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
|
|
@ -29,6 +29,7 @@
|
|||
#include "strvec.hpp"
|
||||
#include "syslog.hpp"
|
||||
#include "version.hpp"
|
||||
#include "maintenance_thread.hpp"
|
||||
|
||||
#include "fuse_access.hpp"
|
||||
#include "fuse_bmap.hpp"
|
||||
|
|
@ -246,7 +247,7 @@ namespace l
|
|||
{
|
||||
SysLog::info("Received SIGUSR2 - triggering thorough gc");
|
||||
fuse_gc();
|
||||
GIDCache::invalidate_all_caches();
|
||||
GIDCache::clear_all();
|
||||
}
|
||||
|
||||
static
|
||||
|
|
@ -310,6 +311,11 @@ namespace l
|
|||
|
||||
l::warn_if_not_root();
|
||||
|
||||
MaintenanceThread::push_job([](int count_)
|
||||
{
|
||||
if((count_ % 60) == 0)
|
||||
GIDCache::clear_unused();
|
||||
});
|
||||
l::setup_resources(cfg->scheduling_priority);
|
||||
l::setup_signal_handlers();
|
||||
l::get_fuse_operations(ops,cfg->nullrw);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue