func (f *AzukiFile) Read(buf []byte, off int64) (res fuse.ReadResult, code fuse.Status) { f.lock.Lock() r := fuse.ReadResultFd(f.File.Fd(), off, len(buf)) f.lock.Unlock() go event.Notify(event.Read, f.File.Name()) return r, fuse.OK }
func (f *loopbackFile) Read(buf []byte, off int64) (res fuse.ReadResult, code fuse.Status) { f.lock.Lock() // This is not racy by virtue of the kernel properly // synchronizing the open/write/close. r := fuse.ReadResultFd(f.File.Fd(), off, len(buf)) f.lock.Unlock() return r, fuse.OK }
func (o *ObjectFile) Read(buf []byte, off int64) (res fuse.ReadResult, code fuse.Status) { log.Debugf("[objectfile] Read %s offset=%d bytes=%d", o.name, off, len(buf)) if off == 0 { } o.lock.Lock() res = fuse.ReadResultFd(o.localfile.Fd(), off, len(buf)) o.lock.Unlock() return res, fuse.OK }