From bc1a0d83df46ba358b035d996fdb7f5c1f66f564 Mon Sep 17 00:00:00 2001 From: Esteban Date: Sat, 26 May 2018 12:51:16 -0700 Subject: [PATCH] Warning when NoSync setting is set as it is does not turn syncing off #3799 License: MIT Signed-off-by: Esteban Ginez --- repo/fsrepo/fsrepo.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/repo/fsrepo/fsrepo.go b/repo/fsrepo/fsrepo.go index 4ecb3ec9a101..48daac2a3b3e 100644 --- a/repo/fsrepo/fsrepo.go +++ b/repo/fsrepo/fsrepo.go @@ -400,6 +400,9 @@ func (r *FSRepo) openDatastore() error { } else if r.config.Datastore.Spec == nil { return fmt.Errorf("required Datastore.Spec entry missing from config file") } + if r.config.Datastore.NoSync { + log.Warning("NoSync is now deprecated in favor of datastore specific settings. If you want to disable fsync on flatfs set 'sync' to false'. See https://github.com/ipfs/go-ipfs/blob/master/docs/datastores.md#flatfs.") + } dsc, err := AnyDatastoreConfig(r.config.Datastore.Spec) if err != nil {