mirror of
https://github.com/kairos-io/immucore.git
synced 2025-09-15 06:30:46 +00:00
fix(mount): call sync before/after operations (#288)
* fix(mount): call sync after mount ops Signed-off-by: mudler <mudler@kairos.io> * refactor(mount): replace calls wrapped with sync Signed-off-by: mudler <mudler@kairos.io> * be consistent Signed-off-by: mudler <mudler@kairos.io> * lint fixes Signed-off-by: mudler <mudler@kairos.io> --------- Signed-off-by: mudler <mudler@kairos.io>
This commit is contained in:
committed by
GitHub
parent
4916e6dba7
commit
d14a047aa6
@@ -17,6 +17,9 @@ type MountOperation struct {
|
||||
}
|
||||
|
||||
func (m MountOperation) Run() error {
|
||||
// call sync to make sure the data is written to disk
|
||||
defer internalUtils.Sync()
|
||||
|
||||
// Add context to sublogger
|
||||
l := internalUtils.Log.With().Str("what", m.MountOption.Source).Str("where", m.Target).Str("type", m.MountOption.Type).Strs("options", m.MountOption.Options).Logger()
|
||||
// Not sure why this defaults to debuglevel when creating a sublogger, so make sure we set it properly
|
||||
|
Reference in New Issue
Block a user