beads/cmd/bd/nocow_other.go
Jim Wordelman 652d321968
fix: set FS_NOCOW_FL on .beads/ at init to avoid btrfs kworker thrashing (#3162)
Co-authored-by: quad341 <quad341@users.noreply.github.com>
2026-04-10 21:52:18 -07:00

22 lines
707 B
Go

//go:build !linux
package main
// applyNoCOW is a no-op on non-Linux platforms. FS_NOCOW_FL is a
// Linux-specific inode attribute and has no analog elsewhere — btrfs
// compression thrashing only affects Linux hosts running dolt on btrfs.
func applyNoCOW(path string) error {
return nil
}
// hasNoCOW always reports false on non-Linux platforms because the flag
// does not exist there. Doctor checks treat "!linux" as "nothing to check".
func hasNoCOW(path string) (bool, error) {
return false, nil
}
// isBtrfs always reports false on non-Linux. btrfs is a Linux-only
// filesystem, so we short-circuit the check on other platforms.
func isBtrfs(path string) (bool, error) {
return false, nil
}