1 //go:build linux 2 3 package server 4 5 import ( 6 "os" 7 "syscall" 8 ) 9 10 func preallocateFile(file *os.File, size int64) error { 11 return syscall.Fallocate(int(file.Fd()), 0, 0, size) 12 } 13
View as plain text