]> Sergey Matveev's repositories - btrtrc.git/commitdiff
Add TODO
authorMatt Joiner <anacrolix@gmail.com>
Thu, 25 Jan 2018 06:43:33 +0000 (17:43 +1100)
committerMatt Joiner <anacrolix@gmail.com>
Thu, 25 Jan 2018 06:43:33 +0000 (17:43 +1100)
reader.go

index 105e1f19395dc7e9c1a959f37aaa3a02509946fe..4b96414c89ba0b549423d8b431a5a3ba02a1f189 100644 (file)
--- a/reader.go
+++ b/reader.go
@@ -222,6 +222,8 @@ func (r *reader) readOnceAt(b []byte, pos int64, ctxErr *error) (n int, err erro
                        return
                }
                r.t.cl.mu.Lock()
+               // TODO: Just reset pieces in the readahead window. This might help
+               // prevent thrashing with small caches and file and piece priorities.
                log.Printf("error reading torrent %q piece %d offset %d, %d bytes: %s", r.t, pi, po, len(b1), err)
                r.t.updateAllPieceCompletions()
                r.t.updateAllPiecePriorities()