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

Method getXattrImpl

pkg/sentry/fsimpl/gofer/inode_impl.go:310–319  ·  view source on GitHub ↗

Precondition: !d.isSynthetic().

(ctx context.Context, opts *vfs.GetXattrOptions)

Source from the content-addressed store, hash-verified

308
309// Precondition: !d.isSynthetic().
310func (d *dentry) getXattrImpl(ctx context.Context, opts *vfs.GetXattrOptions) (string, error) {
311 switch it := d.inode.impl.(type) {
312 case *lisafsInode:
313 return it.controlFD.GetXattr(ctx, opts.Name, opts.Size)
314 case *directfsInode:
315 return it.getXattr(ctx, opts.Name, opts.Size, d)
316 default:
317 panic("unknown inode implementation")
318 }
319}
320
321// Precondition: !d.isSynthetic().
322func (d *dentry) setXattrImpl(ctx context.Context, opts *vfs.SetXattrOptions) error {

Callers 1

getXattrMethod · 0.95

Calls 2

GetXattrMethod · 0.65
getXattrMethod · 0.45

Tested by

no test coverage detected