From ed5f8487b15f1d9cd83b4b0a4220271b6c5f189e Mon Sep 17 00:00:00 2001 From: Jakob Unterwurzacher Date: Sun, 1 Feb 2026 20:05:13 +0100 Subject: syscallcompat: DetectQuirks: suppress Btrfs message when -noprealloc has been passed Reported by @Tunoac, https://github.com/rfjakob/gocryptfs/issues/395#issuecomment-3828507487 --- internal/fusefrontend/root_node.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'internal/fusefrontend/root_node.go') diff --git a/internal/fusefrontend/root_node.go b/internal/fusefrontend/root_node.go index 8464c5f..489e3c6 100644 --- a/internal/fusefrontend/root_node.go +++ b/internal/fusefrontend/root_node.go @@ -91,6 +91,10 @@ func NewRootNode(args Args, c *contentenc.ContentEnc, n *nametransform.NameTrans dirCache: dirCache{ivLen: ivLen}, quirks: syscallcompat.DetectQuirks(args.Cipherdir), } + // Suppress the message if the user has already specified -noprealloc + if rn.quirks&syscallcompat.QuirkBtrfsBrokenFalloc != 0 && !args.NoPrealloc { + syscallcompat.LogQuirk("Btrfs detected, forcing -noprealloc. See https://github.com/rfjakob/gocryptfs/issues/395 for why.") + } if statErr == nil { rn.inoMap.TranslateStat(&st) rn.rootIno = st.Ino -- cgit v1.2.3