Skip to content

Commit 622d102

Browse files
authored
Fix a potential filesystem corruption on virtio block devices (#576)
Enable the caching mode for virtio block devices to fix a potential filesystem corruption. Also see apple/container#1041.
1 parent d3ff56e commit 622d102

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Sources/Containerization/Mount.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,8 +163,8 @@ extension Mount {
163163

164164
extension VZDiskImageStorageDeviceAttachment {
165165
static func mountToVZAttachment(mount: Mount, options: [String]) throws -> VZDiskImageStorageDeviceAttachment {
166-
var cachingMode: VZDiskImageCachingMode = .automatic
167166
var synchronizationMode: VZDiskImageSynchronizationMode = .fsync
167+
var cachingMode: VZDiskImageCachingMode = .cached
168168

169169
for option in options {
170170
let split = option.split(separator: "=")

0 commit comments

Comments
 (0)