summaryrefslogtreecommitdiffstats
path: root/debian/patches/27-hide-host-cache-warning.patch
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-06 03:01:54 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-06 03:01:54 +0000
commit0494175483c2d82f445ddca9cadb6ee6338e9f9c (patch)
tree336364dc245983722e34439ece449564e77ca286 /debian/patches/27-hide-host-cache-warning.patch
parentAdding upstream version 6.0.4-dfsg. (diff)
downloadvirtualbox-0494175483c2d82f445ddca9cadb6ee6338e9f9c.tar.xz
virtualbox-0494175483c2d82f445ddca9cadb6ee6338e9f9c.zip
Adding debian version 6.0.4-dfsg-7.debian/6.0.4-dfsg-7debian
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/patches/27-hide-host-cache-warning.patch')
-rw-r--r--debian/patches/27-hide-host-cache-warning.patch43
1 files changed, 43 insertions, 0 deletions
diff --git a/debian/patches/27-hide-host-cache-warning.patch b/debian/patches/27-hide-host-cache-warning.patch
new file mode 100644
index 00000000..d82f445a
--- /dev/null
+++ b/debian/patches/27-hide-host-cache-warning.patch
@@ -0,0 +1,43 @@
+Description: Silently enable the host I/O cache when the image is on an ext4/XFS partition.
+ No need to warn users about it.
+Author: Felix Geyer <fgeyer@debian.org>
+
+Index: virtualbox/src/VBox/Main/src-client/ConsoleImpl2.cpp
+===================================================================
+--- virtualbox.orig/src/VBox/Main/src-client/ConsoleImpl2.cpp
++++ virtualbox/src/VBox/Main/src-client/ConsoleImpl2.cpp
+@@ -4093,34 +4093,12 @@
+ if ( enmFsTypeFile == RTFSTYPE_EXT4
+ || enmFsTypeFile == RTFSTYPE_XFS)
+ {
+- i_atVMRuntimeErrorCallbackF(0, "Ext4PartitionDetected",
+- N_("The host I/O cache for at least one controller is disabled "
+- "and the medium '%ls' for this VM "
+- "is located on an %s partition. There is a known Linux "
+- "kernel bug which can lead to the corruption of the virtual "
+- "disk image under these conditions.\n"
+- "Either enable the host I/O cache permanently in the VM "
+- "settings or put the disk image and the snapshot folder "
+- "onto a different file system.\n"
+- "The host I/O cache will now be enabled for this medium"),
+- strFile.raw(), enmFsTypeFile == RTFSTYPE_EXT4 ? "ext4" : "xfs");
+ *pfUseHostIOCache = true;
+ }
+ else if ( ( enmFsTypeSnap == RTFSTYPE_EXT4
+ || enmFsTypeSnap == RTFSTYPE_XFS)
+ && !mfSnapshotFolderExt4WarningShown)
+ {
+- i_atVMRuntimeErrorCallbackF(0, "Ext4PartitionDetected",
+- N_("The host I/O cache for at least one controller is disabled "
+- "and the snapshot folder for this VM "
+- "is located on an %s partition. There is a known Linux "
+- "kernel bug which can lead to the corruption of the virtual "
+- "disk image under these conditions.\n"
+- "Either enable the host I/O cache permanently in the VM "
+- "settings or put the disk image and the snapshot folder "
+- "onto a different file system.\n"
+- "The host I/O cache will now be enabled for this medium"),
+- enmFsTypeSnap == RTFSTYPE_EXT4 ? "ext4" : "xfs");
+ *pfUseHostIOCache = true;
+ mfSnapshotFolderExt4WarningShown = true;
+ }