diff options
author | Alex Shumsky | 2024-03-07 23:33:11 +0300 |
---|---|---|
committer | rfjakob | 2024-03-09 21:32:48 +0100 |
commit | 1d7dd0a76c15cf8c0dffef918a6b6c3dcb6347c4 (patch) | |
tree | d029ebbfb49ce30d0919875df1928b46e07daa0f | |
parent | 9958b63931aee613d5f97a8e7137efa3fb118343 (diff) |
fusefrontend: fix excessive file fragmentation on BTRFS
-rw-r--r-- | internal/fusefrontend/file.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/internal/fusefrontend/file.go b/internal/fusefrontend/file.go index 8d0ba01..0e25de3 100644 --- a/internal/fusefrontend/file.go +++ b/internal/fusefrontend/file.go @@ -316,7 +316,7 @@ func (f *File) doWrite(data []byte, off int64) (uint32, syscall.Errno) { if cOff > math.MaxInt64 { return 0, syscall.EFBIG } - if !f.rootNode.args.NoPrealloc { + if !f.rootNode.args.NoPrealloc && f.rootNode.quirks&syscallcompat.QuirkBrokenFalloc == 0 { err = syscallcompat.EnospcPrealloc(f.intFd(), int64(cOff), int64(len(ciphertext))) if err != nil { if !syscallcompat.IsENOSPC(err) { |