aboutsummaryrefslogtreecommitdiff
path: root/internal/fusefrontend/file.go
diff options
context:
space:
mode:
authorAlex Shumsky2024-03-07 23:33:11 +0300
committerrfjakob2024-03-09 21:32:48 +0100
commit1d7dd0a76c15cf8c0dffef918a6b6c3dcb6347c4 (patch)
treed029ebbfb49ce30d0919875df1928b46e07daa0f /internal/fusefrontend/file.go
parent9958b63931aee613d5f97a8e7137efa3fb118343 (diff)
fusefrontend: fix excessive file fragmentation on BTRFS
Diffstat (limited to 'internal/fusefrontend/file.go')
-rw-r--r--internal/fusefrontend/file.go2
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) {