[#1992] fstree: Allow working in SYNC mode
Make O_SYNC the default and allow to opt-out explicitly. Signed-off-by: Evgenii Stratonikov <evgeniy@morphbits.ru>
This commit is contained in:
parent
694d888219
commit
f564430b90
2 changed files with 32 additions and 2 deletions
|
@ -29,3 +29,9 @@ func WithPath(p string) Option {
|
|||
f.RootPath = p
|
||||
}
|
||||
}
|
||||
|
||||
func WithNoSync(noSync bool) Option {
|
||||
return func(f *FSTree) {
|
||||
f.noSync = noSync
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue