Change getattr and statx to bespoke policies

* Provides: slight improvement in performance as it no longer will
need to find and then act on the files.
* It doesn't make sense to support all original policy types. Most
people used 'newest' or 'ff' and 'combine' is a better default which
has same runtime as 'newest' but with better output.
This commit is contained in:
Antonio SJ Musumeci 2025-11-13 20:45:52 -06:00
parent 965e26989c
commit b3b8e793f9
145 changed files with 3803 additions and 1192 deletions

View file

@ -138,6 +138,7 @@ Config::Config()
_congestion_threshold(fuse_cfg.congestion_threshold),
_debug(fuse_cfg.debug),
_getattr_statx(getattr,statx),
_gid(fuse_cfg.gid),
_max_background(fuse_cfg.max_background),
_mount(mountpoint),
@ -225,27 +226,28 @@ Config::Config()
_map["flush-on-close"] = &flushonclose;
_map["follow-symlinks"] = &follow_symlinks;
_map["fsname"] = &fsname;
_map["func.access"] = &func.access;
_map["func.chmod"] = &func.chmod;
_map["func.chown"] = &func.chown;
_map["func.access"] = &access;
_map["func.chmod"] = &chmod;
_map["func.chown"] = &chown;
_map["func.create"] = &func.create;
_map["func.getattr"] = &func.getattr;
_map["func.getxattr"] = &func.getxattr;
_map["func.getattr"] = &_getattr_statx;
_map["func.getxattr"] = &getxattr;
_map["func.link"] = &func.link;
_map["func.listxattr"] = &func.listxattr;
_map["func.listxattr"] = &listxattr;
_map["func.mkdir"] = &func.mkdir;
_map["func.mknod"] = &func.mknod;
_map["func.open"] = &func.open;
_map["func.readdir"] = &readdir;
_map["func.readlink"] = &func.readlink;
_map["func.removexattr"] = &func.removexattr;
_map["func.readlink"] = &readlink;
_map["func.removexattr"] = &removexattr;
_map["func.rename"] = &func.rename;
_map["func.rmdir"] = &func.rmdir;
_map["func.setxattr"] = &func.setxattr;
_map["func.rmdir"] = &rmdir;
_map["func.setxattr"] = &setxattr;
_map["func.statx"] = &_getattr_statx;
_map["func.symlink"] = &func.symlink;
_map["func.truncate"] = &func.truncate;
_map["func.unlink"] = &func.unlink;
_map["func.utimens"] = &func.utimens;
_map["func.truncate"] = &truncate;
_map["func.unlink"] = &unlink;
_map["func.utimens"] = &utimens;
_map["fuse-msg-size"] = &fuse_msg_size;
_map["gid"] = &_gid;
_map["gid-cache.expire-timeout"] = &_dummy;