summaryrefslogtreecommitdiffhomepage
path: root/pkg/p9/local_server/local_server.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/p9/local_server/local_server.go')
-rw-r--r--pkg/p9/local_server/local_server.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/pkg/p9/local_server/local_server.go b/pkg/p9/local_server/local_server.go
index f4077a9d4..d49d94550 100644
--- a/pkg/p9/local_server/local_server.go
+++ b/pkg/p9/local_server/local_server.go
@@ -323,6 +323,11 @@ func (l *local) Renamed(parent p9.File, newName string) {
l.path = path.Join(parent.(*local).path, newName)
}
+// Allocate implements p9.File.Allocate.
+func (l *local) Allocate(mode p9.AllocateMode, offset, length uint64) error {
+ return syscall.Fallocate(int(l.file.Fd()), mode.ToLinux(), int64(offset), int64(length))
+}
+
func main() {
log.SetLevel(log.Debug)