Documentation
¶
Overview ¶
Package lower is a lazy read-only file system over one commit of the version control store: the lower layer of a kernel overlay, with the dirty set read from the upper directory. The FUSE server builds on Linux only.
Package vfs is the node-local lazy workspace: a git tree served over FUSE as the read-only lower layer of a kernel overlay.
Index ¶
- Variables
- func DirtyFromUpper(es []upperdir.Entry) []ctl.DirtyEntry
- func UpperBase(c *store.Cache, root gitpack.SHA) upperdir.BaseTree
- type Config
- type MountOpts
- type Node
- func (n *Node) Allocate(ctx context.Context, f fs.FileHandle, off uint64, size uint64, mode uint32) syscall.Errno
- func (n *Node) Create(ctx context.Context, name string, flags uint32, mode uint32, ...) (*fs.Inode, fs.FileHandle, uint32, syscall.Errno)
- func (n *Node) Fsync(ctx context.Context, f fs.FileHandle, flags uint32) syscall.Errno
- func (n *Node) Getattr(ctx context.Context, f fs.FileHandle, out *fuse.AttrOut) (rerr syscall.Errno)
- func (n *Node) Lookup(ctx context.Context, name string, out *fuse.EntryOut) (_ *fs.Inode, rerr syscall.Errno)
- func (n *Node) Mkdir(ctx context.Context, name string, mode uint32, out *fuse.EntryOut) (*fs.Inode, syscall.Errno)
- func (n *Node) Open(ctx context.Context, flags uint32) (_ fs.FileHandle, _ uint32, rerr syscall.Errno)
- func (n *Node) Read(ctx context.Context, f fs.FileHandle, dest []byte, off int64) (res fuse.ReadResult, rerr syscall.Errno)
- func (n *Node) Readdir(ctx context.Context) (_ fs.DirStream, rerr syscall.Errno)
- func (n *Node) Readlink(ctx context.Context) (_ []byte, rerr syscall.Errno)
- func (n *Node) Rename(ctx context.Context, name string, newParent fs.InodeEmbedder, newName string, ...) syscall.Errno
- func (n *Node) Rmdir(ctx context.Context, name string) syscall.Errno
- func (n *Node) Setattr(ctx context.Context, f fs.FileHandle, in *fuse.SetAttrIn, out *fuse.AttrOut) syscall.Errno
- func (n *Node) Statfs(ctx context.Context, out *fuse.StatfsOut) (rerr syscall.Errno)
- func (n *Node) Symlink(ctx context.Context, target, name string, out *fuse.EntryOut) (*fs.Inode, syscall.Errno)
- func (n *Node) Unlink(ctx context.Context, name string) syscall.Errno
- func (n *Node) Write(ctx context.Context, f fs.FileHandle, data []byte, off int64) (uint32, syscall.Errno)
- type Publication
- type VFS
- func (v *VFS) BaseTree() string
- func (v *VFS) Cache() *store.Cache
- func (v *VFS) CallStats() *tel.CallStats
- func (v *VFS) Changes(ctx context.Context) ([]ctl.ChangeEntry, upperdir.Token, error)
- func (v *VFS) Close()
- func (v *VFS) Dirty(ctx context.Context) ([]ctl.DirtyEntry, upperdir.Token, error)
- func (v *VFS) MountFUSE(ctx context.Context, mnt string, o MountOpts) (*fuse.Server, error)
- func (v *VFS) Root() *Node
- func (v *VFS) Stats() ctl.Stats
- func (v *VFS) Token() (upperdir.Token, error)
Constants ¶
This section is empty.
Variables ¶
var ParsePublication = volattr.ParsePublication
Functions ¶
func DirtyFromUpper ¶
func DirtyFromUpper(es []upperdir.Entry) []ctl.DirtyEntry
DirtyFromUpper converts the entries of upperdir.Scan to the entries of the dirty op.
Types ¶
type Config ¶
type Config struct {
Store store.Store
CacheDir string
// UpperDir is the upper directory of the kernel overlay over the mount. The daemon reads the dirty set there.
UpperDir string
Base gitpack.SHA // commit
UID, GID uint32
Cache *store.Cache
NoOpen bool
// Clock paces the stats record and the settle test of the upper directory walk. Nil is the real clock.
Clock clock.Clock
Telemetry tel.Telemetry
// UpperFS reads the upper directory. Nil reads UpperDir from the file system.
UpperFS upperdir.FS
}
Config is what the daemon needs to serve one commit.
type Node ¶
func (*Node) Read ¶
func (n *Node) Read(ctx context.Context, f fs.FileHandle, dest []byte, off int64) (res fuse.ReadResult, rerr syscall.Errno)
Read serves handle-less reads when the kernel runs without OPEN (no_open).
type Publication ¶
type Publication = volattr.Publication
Publication and ParsePublication are the volume attributes of a workspace, shared with the sandbox driver.
type VFS ¶
type VFS struct {
// contains filtered or unexported fields
}
func New ¶
New opens the workspace of cfg.Base: it reads the commit and its root tree. It runs under the span vfs.open.
func (*VFS) CallStats ¶ added in v0.17.0
CallStats is the recorder of the control calls and of the store calls that they make.
func (*VFS) Changes ¶
Changes lists the files of the upper directory that differ from the base tree.
func (*VFS) Close ¶
func (v *VFS) Close()
Close writes the last vfs.stats record. The upper directory stays on disk.