]> Sergey Matveev's repositories - btrtrc.git/commitdiff
Fix excessive logging from mmap-backed storage (anacrolix/torrent#436)
authorYaroslav Kolomiiets <yarikos@gmail.com>
Wed, 11 Nov 2020 15:10:05 +0000 (15:10 +0000)
committerMatt Joiner <anacrolix@gmail.com>
Wed, 11 Nov 2020 21:57:42 +0000 (08:57 +1100)
mmap_span/mmap_span.go

index c698a89c1f2595ea1c2897404de85b73c4376731..4195a0f0780a4b286e439d7291dd044eaf2222ee 100644 (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)