Documentation ¶
Overview ¶
Package genericfstree provides tools for implementing vfs.FilesystemImpls where a single statically-determined lock or set of locks is sufficient to ensure that a Dentry's name and parent are contextually immutable.
Clients using this package must use the go_template_instance rule in tools/go_generics/defs.bzl to create an instantiation of this template package, providing types to use in place of Dentry.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DebugPathname ¶
DebugPathname returns a pathname to d relative to its filesystem root. DebugPathname does not correspond to any Linux function; it's used to generate dentry pathnames for debugging.
func IsAncestorDentry ¶
IsAncestorDentry returns true if d is an ancestor of d2; that is, d is either d2's parent or an ancestor of d2's parent.
func PrependPath ¶
PrependPath is a generic implementation of FilesystemImpl.PrependPath().
Types ¶
type Dentry ¶
type Dentry struct {
// contains filtered or unexported fields
}
Dentry is a required type parameter that is a struct with the given fields.
+stateify savable
func ParentOrSelf ¶
ParentOrSelf returns d.parent. If d.parent is nil, ParentOrSelf returns d.