Skip to content

Commit 0e7a3c9

Browse files
authored
Merge pull request #3298 from jterry75/sync_tar2ext4_write
Forcibly sync writes on lcow layer.vhd after write
2 parents d57cf6f + e0c4fe4 commit 0e7a3c9

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)