Skip to content

Commit e0c4fe4

Browse files
committed
Forcibly sync writes on lcow layer.vhd after write
Signed-off-by: Justin Terry (VM) <[email protected]>
1 parent 25daa73 commit e0c4fe4

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

diff/lcow/lcow.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,11 @@ func (s windowsLcowDiff) Apply(ctx context.Context, desc ocispec.Descriptor, mou
152152

153153
err = tar2ext4.Convert(rc, outFile, tar2ext4.ConvertWhiteout, tar2ext4.AppendVhdFooter, tar2ext4.MaximumDiskSize(maxLcowVhdSizeGB))
154154
if err != nil {
155-
return emptyDesc, errors.Wrapf(err, "failed to convert tar to ext4 vhd")
155+
return emptyDesc, errors.Wrapf(err, "failed to convert tar2ext4 vhd")
156+
}
157+
err = outFile.Sync()
158+
if err != nil {
159+
return emptyDesc, errors.Wrapf(err, "failed to sync tar2ext4 vhd to disk")
156160
}
157161
outFile.Close()
158162

0 commit comments

Comments
 (0)