diff options
author | Jakob Unterwurzacher | 2015-10-04 17:14:40 +0200 |
---|---|---|
committer | Jakob Unterwurzacher | 2015-10-04 17:14:40 +0200 |
commit | c7313f36dee285a8adab801632c8d692bd5f5e7e (patch) | |
tree | f78b768f38989ff9b101cb139e58fe4eaa879960 /pathfs_frontend | |
parent | 90bd9782831f9d3a3c7c682f9cc04ccef0a1666d (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')
-rw-r--r-- | pathfs_frontend/file.go | 10 |
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) |