Skip to content

Commit

Permalink
engine: sync own device before snapshot
Browse files Browse the repository at this point in the history
Longhorn 7559

Signed-off-by: Damiano Cipriani <[email protected]>
  • Loading branch information
DamiaSan committed Feb 15, 2024
1 parent 7bf5881 commit 70d321e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/spdk/engine.go
Original file line number Diff line number Diff line change
Expand Up @@ -1098,7 +1098,7 @@ func (e *Engine) snapshotOperation(spdkClient *spdkclient.Client, inputSnapshotN
} else {
e.log.Infof("Requesting system sync %v before snapshot", devicePath)
// TODO: only sync the device path rather than all filesystems
if _, err := ne.Execute("sync", []string{}, SyncTimeout); err != nil {
if _, err := ne.Execute("sync", []string{devicePath}, SyncTimeout); err != nil {
// sync should never fail though, so it more like due to the nsenter
e.log.WithError(err).Errorf("WARNING: failed to sync for snapshot op %v with snapshot %s, will skip the sync and continue", snapshotOp, inputSnapshotName)
}
Expand Down

0 comments on commit 70d321e

Please sign in to comment.