Update the secondary group cache (#1492)
Some checks are pending
CodeQL / Analyze (push) Waiting to run
mkdocs / deploy (push) Waiting to run

* 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:
trapexit 2025-07-05 17:05:53 -05:00 • committed by GitHub
parent 9e626228be
commit f852474073
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
17 changed files with 342 additions and 246 deletions

View file

@ -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);