Files
metrics/lib/fs/mincore_other.go
NikolayandGitHub 0f11102199 lib/fs: add fs.disableMincore flag
This flag allows disabling the mincore() syscall introduced in
1faf525f76. On older ZFS filesystems,
mincore() may trigger a bug related to ZFSÕs own in-memory cache. Mixing
reads from mmap()ed files and direct disk reads can corrupt the ZFS ARC
cache and lead to data read corruption.

Fixes https://github.com/VictoriaMetrics/VictoriaMetrics/issues/10327
2026-01-27 20:29:01 +01:00

16 lines
173 B
Go

//go:build !linux
package fs
import (
"fmt"
)
func supportsMincore() bool {
return false
}
func mincore(ptr *byte) bool {
panic(fmt.Errorf("BUG: unexpected call"))
}