Precondition: !d.isSynthetic().
(ctx context.Context, opts *vfs.GetXattrOptions)
| 308 | |
| 309 | // Precondition: !d.isSynthetic(). |
| 310 | func (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(). |
| 322 | func (d *dentry) setXattrImpl(ctx context.Context, opts *vfs.SetXattrOptions) error { |