summaryrefslogtreecommitdiff
path: root/pathfs_frontend/file.go
diff options
context:
space:
mode:
Diffstat (limited to 'pathfs_frontend/file.go')
-rw-r--r--pathfs_frontend/file.go10
1 files changed, 3 insertions, 7 deletions
diff --git a/pathfs_frontend/file.go b/pathfs_frontend/file.go
index 697d58d..02ebc42 100644
--- a/pathfs_frontend/file.go
+++ b/pathfs_frontend/file.go
@@ -331,14 +331,10 @@ func (f *file) GetAttr(a *fuse.Attr) fuse.Status {
return fuse.OK
}
+// Allocate FUSE call, fallocate(2)
func (f *file) Allocate(off uint64, sz uint64, mode uint32) fuse.Status {
- f.lock.Lock()
- err := syscall.Fallocate(int(f.fd.Fd()), mode, int64(off), int64(sz))
- f.lock.Unlock()
- if err != nil {
- return fuse.ToStatus(err)
- }
- return fuse.OK
+ cryptfs.Warn.Printf("Fallocate is not supported, returning ENOSYS - see https://github.com/rfjakob/gocryptfs/issues/1\n")
+ return fuse.ENOSYS
}
const _UTIME_NOW = ((1 << 30) - 1)