inomap: warn on first use of spillMap
We normally should not need it, warn if we do. As the tests run with -wpanic, we would catch it.
This commit is contained in:
parent
dd24fed532
commit
b8d78d6a31
@ -18,6 +18,8 @@ import (
|
|||||||
"log"
|
"log"
|
||||||
"sync"
|
"sync"
|
||||||
"syscall"
|
"syscall"
|
||||||
|
|
||||||
|
"github.com/rfjakob/gocryptfs/internal/tlog"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
@ -56,7 +58,11 @@ func New() *InoMap {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var spillWarn sync.Once
|
||||||
|
|
||||||
func (m *InoMap) spill(in QIno) (out uint64) {
|
func (m *InoMap) spill(in QIno) (out uint64) {
|
||||||
|
spillWarn.Do(func() { tlog.Warn.Printf("InoMap: opening spillMap for %v", in) })
|
||||||
|
|
||||||
out, found := m.spillMap[in]
|
out, found := m.spillMap[in]
|
||||||
if found {
|
if found {
|
||||||
return out | spillBit
|
return out | spillBit
|
||||||
|
Loading…
Reference in New Issue
Block a user