Fix excessive logging from mmap-backed storage (anacrolix/torrent#436)

This commit is contained in:
Yaroslav Kolomiiets 2020-11-11 15:10:05 +00:00 committed by Matt Joiner
parent 493ee9dfd1
commit 28b6c93d6e
1 changed files with 1 additions and 2 deletions

View File

@ -3,7 +3,6 @@ package mmap_span
import (
"fmt"
"io"
"log"
"sync"
"github.com/anacrolix/torrent/segments"
@ -79,7 +78,7 @@ func (ms *MMapSpan) locateCopy(copyArgs func(remainingArgument, mmapped []byte)
}
func (ms *MMapSpan) WriteAt(p []byte, off int64) (n int, err error) {
log.Printf("writing %v bytes at %v", len(p), off)
// log.Printf("writing %v bytes at %v", len(p), off)
ms.mu.RLock()
defer ms.mu.RUnlock()
n = ms.locateCopy(func(a, b []byte) (_, _ []byte) { return b, a }, p, off)