MCPcopy
hub / github.com/google/gvisor / fileDescription

Struct fileDescription

pkg/sentry/fsimpl/host/host.go:772–791  ·  view source on GitHub ↗

fileDescription is embedded by host fd implementations of FileDescriptionImpl. +stateify savable

Source from the content-addressed store, hash-verified

770//
771// +stateify savable
772type fileDescription struct {
773 vfsfd vfs.FileDescription
774 vfs.FileDescriptionDefaultImpl
775 vfs.LockFD
776
777 // inode is vfsfd.Dentry().Impl().(*kernfs.Dentry).Inode().(*inode), but
778 // cached to reduce indirections and casting. fileDescription does not hold
779 // a reference on the inode through the inode field (since one is already
780 // held via the Dentry).
781 //
782 // inode is immutable after fileDescription creation.
783 inode *inode
784
785 // offsetMu protects offset.
786 offsetMu sync.Mutex `state:"nosave"`
787
788 // offset specifies the current file offset. It is only meaningful when
789 // inode.seekable is true.
790 offset int64
791}
792
793// SetStat implements vfs.FileDescriptionImpl.SetStat.
794func (f *fileDescription) SetStat(ctx context.Context, opts vfs.SetStatOptions) error {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected