diff options
author | Jakob Unterwurzacher | 2021-08-16 17:13:14 +0200 |
---|---|---|
committer | Jakob Unterwurzacher | 2021-08-16 17:13:14 +0200 |
commit | b8d78d6a3153f0ebf01e11426bd28453c7b8b522 (patch) | |
tree | bfd61b8e7c5b44b05587997a8dac9560521975c6 /internal | |
parent | dd24fed5328c20ddd23ed345a36a38ebeeef8438 (diff) |
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.
Diffstat (limited to 'internal')
-rw-r--r-- | internal/inomap/inomap.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/internal/inomap/inomap.go b/internal/inomap/inomap.go index 82d50b0..bd20e0d 100644 --- a/internal/inomap/inomap.go +++ b/internal/inomap/inomap.go @@ -18,6 +18,8 @@ import ( "log" "sync" "syscall" + + "github.com/rfjakob/gocryptfs/internal/tlog" ) const ( @@ -56,7 +58,11 @@ func New() *InoMap { } } +var spillWarn sync.Once + 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] if found { return out | spillBit |