VirtualBox

Ignore:
Timestamp:
Jun 21, 2010 11:50:02 AM (14 years ago)
Author:
vboxsync
Message:

Main, Runtime: refined file system check to warn for disabled host cache on the xfs file system as well

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/ConsoleImpl2.cpp

    r30290 r30324  
    24882488                if (   typeSnap == RTFS_FS_TYPE_FAT
    24892489                    && u64Size >= _4G
    2490                     && !mfSnapshotFolderWarningShown)
     2490                    && !mfSnapshotFolderSizeWarningShown)
    24912491                {
    24922492                    const char *pszUnit;
     
    25112511                            strSnap.raw(), strFile.raw(), u64Print, pszUnit);
    25122512                    /* Show this particular warning only once */
    2513                     mfSnapshotFolderWarningShown = true;
     2513                    mfSnapshotFolderSizeWarningShown = true;
    25142514                }
    25152515
     
    25182518                 * Ext4 bug: Check if the host I/O cache is disabled and the disk image is located
    25192519                 *           on an ext4 partition. Later we have to check the Linux kernel version!
     2520                 * This bug apparently applies to the XFS file system as well.
    25202521                 */
    25212522                if (   (uCaps & MediumFormatCapabilities_Asynchronous)
    25222523                    && !fUseHostIOCache
    25232524                    && (   typeFile == RTFS_FS_TYPE_EXT4
    2524                         || typeSnap == RTFS_FS_TYPE_EXT4))
     2525                        || typeFile == RTFS_FS_TYPE_XFS))
    25252526                {
    25262527                    setVMRuntimeErrorCallbackF(pVM, this, 0,
    25272528                            "Ext4PartitionDetected",
    25282529                            N_("The host I/O cache for at least one controller is disabled "
    2529                                "but the medium '%ls' or the snapshot folder for this VM "
    2530                                "is located on an ext4 partition. There is a known Linux "
     2530                               "and the medium '%ls' for this VM "
     2531                               "is located on an %s partition. There is a known Linux "
    25312532                               "kernel bug which can lead to the corruption of the virtual "
    25322533                               "disk image under these conditions.\n"
     
    25352536                               "onto a different file system.\n"
    25362537                               "The host I/O cache will now be enabled for this medium"),
    2537                             strFile.raw());
     2538                            strFile.raw(), typeFile == RTFS_FS_TYPE_EXT4 ? "ext4" : "xfs");
    25382539                    fUseHostIOCache = true;
     2540                }
     2541                else if (   (uCaps & MediumFormatCapabilities_Asynchronous)
     2542                         && !fUseHostIOCache
     2543                         && (   typeSnap == RTFS_FS_TYPE_EXT4
     2544                             || typeSnap == RTFS_FS_TYPE_XFS)
     2545                         && !mfSnapshotFolderExt4WarningShown)
     2546                {
     2547                    setVMRuntimeErrorCallbackF(pVM, this, 0,
     2548                            "Ext4PartitionDetected",
     2549                            N_("The host I/O cache for at least one controller is disabled "
     2550                               "and the snapshot folder for this VM "
     2551                               "is located on an %s partition. There is a known Linux "
     2552                               "kernel bug which can lead to the corruption of the virtual "
     2553                               "disk image under these conditions.\n"
     2554                               "Either enable the host I/O cache permanently in the VM "
     2555                               "settings or put the disk image and the snapshot folder "
     2556                               "onto a different file system.\n"
     2557                               "The host I/O cache will now be enabled for this medium"),
     2558                            typeSnap == RTFS_FS_TYPE_EXT4 ? "ext4" : "xfs");
     2559                    fUseHostIOCache = true;
     2560                    mfSnapshotFolderExt4WarningShown = true;
    25392561                }
    25402562#endif
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette