Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions Sources/ContainerResource/Container/Filesystem.swift
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,13 @@ public struct Filesystem: Sendable, Codable {
self.options = options
}

// Defaulting to CachedMode = .on (i.e., cached mode) to fix Linux FS issue when using Virtualization
// * https://github.com/apple/container/issues/614
// * https://github.com/utmapp/UTM/pull/5919

/// A block based filesystem.
public static func block(
format: String, source: String, destination: String, options: MountOptions, cache: CacheMode = .auto,
format: String, source: String, destination: String, options: MountOptions, cache: CacheMode = .on,
sync: SyncMode = .fsync
) -> Filesystem {
.init(
Expand All @@ -100,7 +104,7 @@ public struct Filesystem: Sendable, Codable {
/// A named volume filesystem.
public static func volume(
name: String, format: String, source: String, destination: String, options: MountOptions,
cache: CacheMode = .auto, sync: SyncMode = .fsync
cache: CacheMode = .on, sync: SyncMode = .fsync
) -> Filesystem {
.init(
type: .volume(name: name, format: format, cache: cache, sync: sync),
Expand Down