Skip to content

Commit

Permalink
fusefrontend: fix excessive file fragmentation on BTRFS
Browse files Browse the repository at this point in the history
  • Loading branch information
alex3d authored and rfjakob committed Mar 9, 2024
1 parent 9958b63 commit 1d7dd0a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/fusefrontend/file.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 1d7dd0a

Please sign in to comment.