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

Method Read

pkg/sentry/fsimpl/fuse/regular_file.go:196–202  ·  view source on GitHub ↗

Read implements vfs.FileDescriptionImpl.Read.

(ctx context.Context, dst usermem.IOSequence, opts vfs.ReadOptions)

Source from the content-addressed store, hash-verified

194
195// Read implements vfs.FileDescriptionImpl.Read.
196func (fd *regularFileFD) Read(ctx context.Context, dst usermem.IOSequence, opts vfs.ReadOptions) (int64, error) {
197 fd.offMu.Lock()
198 n, err := fd.PRead(ctx, dst, fd.off, opts)
199 fd.off += n
200 fd.offMu.Unlock()
201 return n, err
202}
203
204// PWrite implements vfs.FileDescriptionImpl.PWrite.
205func (fd *regularFileFD) PWrite(ctx context.Context, src usermem.IOSequence, offset int64, opts vfs.WriteOptions) (int64, error) {

Callers

nothing calls this directly

Calls 3

PReadMethod · 0.95
LockMethod · 0.65
UnlockMethod · 0.65

Tested by

no test coverage detected