fileDescription is embedded by host fd implementations of FileDescriptionImpl. +stateify savable
| 770 | // |
| 771 | // +stateify savable |
| 772 | type 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. |
| 794 | func (f *fileDescription) SetStat(ctx context.Context, opts vfs.SetStatOptions) error { |
nothing calls this directly
no outgoing calls
no test coverage detected