storage/file-io-mmap.go | 11 +++-------- diff --git a/storage/file-io-mmap.go b/storage/file-io-mmap.go index ec060712d3be0265fb6e21d302c659e6312bfbde..b11dca840abb64cf109a892b4dea35b15c92891e 100644 --- a/storage/file-io-mmap.go +++ b/storage/file-io-mmap.go @@ -163,14 +163,9 @@ close sync.Once } func (m *mmapSharedFileHandle) WriteAt(p []byte, off int64) (n int, err error) { - //fmt.Println("mmapSharedFileHandle.WriteAt", off, len(p), len(m.f.m)) - n = copy(m.f.m[off:], p) - return -} - -func (m *mmapSharedFileHandle) WriteTo(w io.Writer) (n int64, err error) { - //TODO implement me - panic("implement me") + // It's not actually worth the hassle to write using mmap here since the caller provided the + // buffer already. + return m.f.f.WriteAt(p, off) } func (m *mmapSharedFileHandle) ReadAt(p []byte, off int64) (n int, err error) {