VirtualBox

vbox的更動 54970 路徑 trunk/src/VBox/VMM/VMMR3


忽略:
時間撮記:
2015-3-26 下午03:57:35 (10 年 以前)
作者:
vboxsync
訊息:

AsyncCompletion: Better error message if I/O manager could not be created due to insufficient host limits

位置:
trunk/src/VBox/VMM/VMMR3
檔案:
修改 2 筆資料

圖例:

未更動
新增
刪除
  • trunk/src/VBox/VMM/VMMR3/PDMAsyncCompletionFile.cpp

    r54965 r54970  
    55
    66/*
    7  * Copyright (C) 2006-2013 Oracle Corporation
     7 * Copyright (C) 2006-2015 Oracle Corporation
    88 *
    99 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    590590}
    591591
    592 /**
    593  * Get the size of the given file.
    594  * Works for block devices too.
    595  *
    596  * @returns VBox status code.
    597  * @param   hFile    The file handle.
    598  * @param   pcbSize  Where to store the size of the file on success.
    599  */
    600 static int pdmacFileEpNativeGetSize(RTFILE hFile, uint64_t *pcbSize)
    601 {
    602     uint64_t cbFile;
    603     int rc = RTFileGetSize(hFile, &cbFile);
    604     if (RT_SUCCESS(rc))
    605         *pcbSize = cbFile;
    606 
    607     return rc;
    608 }
    609 
    610592#ifdef VBOX_WITH_DEBUGGER
    611593
     
    964946            uint64_t cbSize;
    965947
    966             rc = pdmacFileEpNativeGetSize(hFile, &cbSize);
     948            rc = RTFileGetSize(hFile, &cbSize);
    967949
    968950            if (RT_SUCCESS(rc) && ((cbSize % 512) == 0))
     
    10221004        pEpFile->fFlags = fFileFlags;
    10231005
    1024         rc = pdmacFileEpNativeGetSize(pEpFile->hFile, (uint64_t *)&pEpFile->cbFile);
     1006        rc = RTFileGetSize(pEpFile->hFile, (uint64_t *)&pEpFile->cbFile);
    10251007        if (RT_SUCCESS(rc))
    10261008        {
     
    10841066                        }
    10851067                    }
     1068                }
     1069                else if (rc == VERR_FILE_AIO_INSUFFICIENT_EVENTS)
     1070                {
     1071                    PUVM pUVM = VMR3GetUVM(pEpClassFile->Core.pVM);
     1072#if defined(RT_OS_LINUX)
     1073                    rc = VMR3SetError(pUVM, rc, RT_SRC_POS,
     1074                                      N_("Failed to create I/O manager for VM due to insufficient resources on the host. "
     1075                                         "Either increase the amount of allowed events in /proc/sys/fs/aio-max-nr or enable "
     1076                                         "the host I/O cache"));
     1077#else
     1078                    rc = VMR3SetError(pUVM, rc, RT_SRC_POS,
     1079                                      N_("Failed to create I/O manager for VM due to insufficient resources on the host. "
     1080                                         "Enable the host I/O cache"));
     1081#endif
     1082                }
     1083                else
     1084                {
     1085                    PUVM pUVM = VMR3GetUVM(pEpClassFile->Core.pVM);
     1086                    rc = VMR3SetError(pUVM, rc, RT_SRC_POS,
     1087                                      N_("Failed to create I/O manager for VM due to an unknown error"));
    10861088                }
    10871089            }
  • trunk/src/VBox/VMM/VMMR3/PDMAsyncCompletionFileNormal.cpp

    r45678 r54970  
    55
    66/*
    7  * Copyright (C) 2006-2013 Oracle Corporation
     7 * Copyright (C) 2006-2015 Oracle Corporation
    88 *
    99 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    3333#define PDMACEPFILEMGR_LOAD_UPDATE_PERIOD   1000
    3434/** Maximum number of requests a manager will handle. */
    35 #define PDMACEPFILEMGR_REQS_STEP            512
     35#define PDMACEPFILEMGR_REQS_STEP              64
    3636
    3737
注意: 瀏覽 TracChangeset 來幫助您使用更動檢視器

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