Init V4 community edition (#2265)
* Init V4 community edition * Init V4 community edition
This commit is contained in:
14
pkg/filemanager/driver/local/fallocate_linux.go
Normal file
14
pkg/filemanager/driver/local/fallocate_linux.go
Normal file
@@ -0,0 +1,14 @@
|
||||
package local
|
||||
|
||||
import (
|
||||
"os"
|
||||
"syscall"
|
||||
)
|
||||
|
||||
func Fallocate(file *os.File, offset int64, length int64) error {
|
||||
if length == 0 {
|
||||
return nil
|
||||
}
|
||||
|
||||
return syscall.Fallocate(int(file.Fd()), 0, offset, length)
|
||||
}
|
||||
Reference in New Issue
Block a user