mirror of
https://github.com/netbirdio/gvisor.git
synced 2026-05-22 17:12:49 -07:00
Update comments for synthetic gofer files in vfs2.
PiperOrigin-RevId: 309966538
This commit is contained in:
@@ -686,6 +686,8 @@ func (fs *filesystem) MknodAt(ctx context.Context, rp *vfs.ResolvingPath, opts v
|
||||
return fs.doCreateAt(ctx, rp, false /* dir */, func(parent *dentry, name string) error {
|
||||
creds := rp.Credentials()
|
||||
_, err := parent.file.mknod(ctx, name, (p9.FileMode)(opts.Mode), opts.DevMajor, opts.DevMinor, (p9.UID)(creds.EffectiveKUID), (p9.GID)(creds.EffectiveKGID))
|
||||
// If the gofer does not allow creating a socket or pipe, create a
|
||||
// synthetic one, i.e. one that is kept entirely in memory.
|
||||
if err == syserror.EPERM {
|
||||
switch opts.Mode.FileType() {
|
||||
case linux.S_IFSOCK:
|
||||
|
||||
@@ -496,10 +496,8 @@ type dentry struct {
|
||||
// file is the unopened p9.File that backs this dentry. file is immutable.
|
||||
//
|
||||
// If file.isNil(), this dentry represents a synthetic file, i.e. a file
|
||||
// that does not exist on the remote filesystem. As of this writing, this
|
||||
// is only possible for a directory created with
|
||||
// MkdirOptions.ForSyntheticMountpoint == true.
|
||||
// TODO(gvisor.dev/issue/1476): Support synthetic sockets (and pipes).
|
||||
// that does not exist on the remote filesystem. As of this writing, the
|
||||
// only files that can be synthetic are sockets, pipes, and directories.
|
||||
file p9file
|
||||
|
||||
// If deleted is non-zero, the file represented by this dentry has been
|
||||
|
||||
Reference in New Issue
Block a user