Read implements vfs.FileDescriptionImpl.Read.
(ctx context.Context, dst usermem.IOSequence, opts vfs.ReadOptions)
| 194 | |
| 195 | // Read implements vfs.FileDescriptionImpl.Read. |
| 196 | func (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. |
| 205 | func (fd *regularFileFD) PWrite(ctx context.Context, src usermem.IOSequence, offset int64, opts vfs.WriteOptions) (int64, error) { |