mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-12-24 03:06:48 +01:00
4e9e1ca0f7
This became the case after b7ee2e7af2
.
16 lines
373 B
Go
16 lines
373 B
Go
package netstorage
|
|
|
|
import (
|
|
"os"
|
|
|
|
"github.com/VictoriaMetrics/VictoriaMetrics/lib/logger"
|
|
"golang.org/x/sys/unix"
|
|
)
|
|
|
|
func mustFadviseSequentialRead(f *os.File) {
|
|
fd := int(f.Fd())
|
|
if err := unix.Fadvise(int(fd), 0, 0, unix.FADV_SEQUENTIAL|unix.FADV_WILLNEED); err != nil {
|
|
logger.Panicf("FATAL: error returned from unix.Fadvise(SEQUENTIAL|WILLNEED): %s", err)
|
|
}
|
|
}
|