diff options
author | Jakob Unterwurzacher | 2016-06-26 18:35:19 +0200 |
---|---|---|
committer | Jakob Unterwurzacher | 2016-06-26 18:41:04 +0200 |
commit | 38767ab5278f6fe62dcf70fc151e8a56cfffcfe4 (patch) | |
tree | bc191fb2c2a6389b4535eaba8e250202d0a303c5 /internal/fusefrontend/file.go | |
parent | 1de5ceed586335361baae02160d61400fbf71e15 (diff) |
fuserfrontend: support truncate(2) by wrapping ftruncate(2)
Support truncate(2) by opening the file and calling ftruncate(2)
While the glibc "truncate" wrapper seems to always use ftruncate, fsstress from
xfstests uses this a lot by calling "truncate64" directly.
Diffstat (limited to 'internal/fusefrontend/file.go')
-rw-r--r-- | internal/fusefrontend/file.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/internal/fusefrontend/file.go b/internal/fusefrontend/file.go index 7f25172..780a792 100644 --- a/internal/fusefrontend/file.go +++ b/internal/fusefrontend/file.go @@ -489,6 +489,8 @@ func (f *file) GetAttr(a *fuse.Attr) fuse.Status { var allocateWarnOnce sync.Once // Allocate - FUSE call, fallocate(2) +// This is not implemented yet in gocryptfs, but it is neither in EncFS. This +// suggests that the user demand is low. func (f *file) Allocate(off uint64, sz uint64, mode uint32) fuse.Status { allocateWarnOnce.Do(func() { tlog.Warn.Printf("fallocate(2) is not supported, returning ENOSYS - see https://github.com/rfjakob/gocryptfs/issues/1") |