aboutsummaryrefslogtreecommitdiff
path: root/pathfs_frontend/file.go
diff options
context:
space:
mode:
authorJakob Unterwurzacher2015-10-04 17:14:40 +0200
committerJakob Unterwurzacher2015-10-04 17:14:40 +0200
commitc7313f36dee285a8adab801632c8d692bd5f5e7e (patch)
treef78b768f38989ff9b101cb139e58fe4eaa879960 /pathfs_frontend/file.go
parent90bd9782831f9d3a3c7c682f9cc04ccef0a1666d (diff)
fallocate: return ENOSYS
The implementation was incomplete, disable fallocate completely for now. See https://github.com/rfjakob/gocryptfs/issues/1 Fixes xfstests generic/075
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)