Adding namecache entries outside of vfs_lookup and vn_open ?

Alan Somers asomers at freebsd.org
Sun Mar 3 01:02:26 UTC 2019


It looks like lookup and open are the only common vops that create new
namecache entries.  At least, those are the only ones that set
MAKEENTRY in the cn_flags field.  However, fuse(4)'s create-like
operations (FUSE_CREATE, FUSE_SYMLINK, etc) all return enough
information to create a namecache entry for the newly created file.
As-is, an operation like FUSE_CREATE will almost always be followed up
by a FUSE_LOOKUP, necessitating an extra round-trip to userland.

Would it be possible and wise to add these newly created entries to
the namecache automatically?

-Alan


More information about the freebsd-hackers mailing list