From 777b95f82ffea8a25b95089343b07b29378110da Mon Sep 17 00:00:00 2001 From: Jakob Unterwurzacher Date: Sun, 26 Jul 2020 18:35:12 +0200 Subject: v2api: delete (most) fusefrontend v1 files All the functionality in these files has been reimplemented for the v2 api. Drop the old files. --- internal/fusefrontend/file2_allocate_truncate.go | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'internal/fusefrontend/file2_allocate_truncate.go') diff --git a/internal/fusefrontend/file2_allocate_truncate.go b/internal/fusefrontend/file2_allocate_truncate.go index b504c50..cdda974 100644 --- a/internal/fusefrontend/file2_allocate_truncate.go +++ b/internal/fusefrontend/file2_allocate_truncate.go @@ -6,6 +6,7 @@ package fusefrontend import ( "context" "log" + "sync" "syscall" "github.com/hanwen/go-fuse/v2/fs" @@ -14,6 +15,15 @@ import ( "github.com/rfjakob/gocryptfs/internal/tlog" ) +// FALLOC_DEFAULT is a "normal" fallocate operation +const FALLOC_DEFAULT = 0x00 + +// FALLOC_FL_KEEP_SIZE allocates disk space while not modifying the file size +const FALLOC_FL_KEEP_SIZE = 0x01 + +// Only warn once +var allocateWarnOnce sync.Once + // Allocate - FUSE call for fallocate(2) // // mode=FALLOC_FL_KEEP_SIZE is implemented directly. -- cgit v1.2.3