Fix writing 'format.json' and make it atomic (#8296)

- Choose a unique uuid such that under situations of duplicate
  mounts we do not append to an existing json entry.
- Avoid AppendFile instead use WriteAll() to write the entire
  byte array atomically.
This commit is contained in:
Harshavardhana
2019-09-24 18:47:26 -07:00
committed by GitHub
parent be70ef59e7
commit c8fbc94329
3 changed files with 8 additions and 18 deletions

View File

@@ -20,9 +20,6 @@ package cmd
const (
// Format config file carries backend format specific details.
formatConfigFile = "format.json"
// Format config tmp file carries backend format.
formatConfigFileTmp = "format.json.tmp"
)
const (