zfs: pipe size: default to value of /proc/sys/fs/pipe-max-siz
Addition by @problame: move getPipeCapacityHint() into platform-specific code. This has the added benefit of not recognizing the envvar as an envconst on platform that do not support resizing pipes. => won't show up in (zrepl status --raw).Global.Envconst fixes #424 cloes #449
This commit is contained in:
committed by
Christian Schwarz
parent
1e85b1cb5f
commit
ee2336a24b
+5
-1
@@ -7,10 +7,14 @@ import (
|
||||
"sync"
|
||||
)
|
||||
|
||||
func getPipeCapacityHint(envvar string) int {
|
||||
return 0 // not supported
|
||||
}
|
||||
|
||||
var zfsPipeCapacityNotSupported sync.Once
|
||||
|
||||
func trySetPipeCapacity(p *os.File, capacity int) {
|
||||
if debugEnabled {
|
||||
if debugEnabled && capacity != 0 {
|
||||
zfsPipeCapacityNotSupported.Do(func() {
|
||||
debug("trySetPipeCapacity error: OS does not support setting pipe capacity")
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user