VirtualBox

Changeset 59536 in vbox for trunk/include/VBox


Ignore:
Timestamp:
Feb 1, 2016 9:03:33 AM (9 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
105329
Message:

Storage: Move the suspend on recoverable error handling down to DrvVD when PDMIMEDIAEX is used

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/vmm/pdmstorageifs.h

    r59448 r59536  
    44
    55/*
    6  * Copyright (C) 2006-2015 Oracle Corporation
     6 * Copyright (C) 2006-2016 Oracle Corporation
    77 *
    88 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    587587    PDMMEDIAEXIOREQTYPE_DISCARD
    588588} PDMMEDIAEXIOREQTYPE;
     589/** Pointer to a I/O request type. */
     590typedef PDMMEDIAEXIOREQTYPE *PPDMMEDIAEXIOREQTYPE;
     591
     592/**
     593 * I/O request state.
     594 */
     595typedef enum PDMMEDIAEXIOREQSTATE
     596{
     597    /** Invalid state. */
     598    PDMMEDIAEXIOREQSTATE_INVALID = 0,
     599    /** The request is active and being processed. */
     600    PDMMEDIAEXIOREQSTATE_ACTIVE,
     601    /** The request is suspended due to an error and no processing will take place. */
     602    PDMMEDIAEXIOREQSTATE_SUSPENDED,
     603    /** 32bit hack. */
     604    PDMMEDIAEXIOREQSTATE_32BIT_HACK = 0x7fffffff
     605} PDMMEDIAEXIOREQSTATE;
     606/** Pointer to a I/O request state. */
     607typedef PDMMEDIAEXIOREQSTATE *PPDMMEDIAEXIOREQSTATE;
    589608
    590609/** @name I/O request specific flags
    591610 * @{ */
    592611/** Default behavior (async I/O).*/
    593 #define PDMIMEDIAEX_F_DEFAULT                   (0)
     612#define PDMIMEDIAEX_F_DEFAULT                    (0)
    594613/** The I/O request will be executed synchronously. */
    595 #define PDMIMEDIAEX_F_SYNC                      RT_BIT_32(0)
     614#define PDMIMEDIAEX_F_SYNC                       RT_BIT_32(0)
     615/** Whether to suspend the VM on a recoverable error with
     616 * an appropriate error message (disk full, etc.).
     617 * The request will be retried by the driver implementing the interface
     618 * when the VM resumes the next time. However before suspending the request
     619 * the owner of the request will be notified using the PDMMEDIAEXPORT::pfnIoReqStateChanged.
     620 * The same goes for resuming the request after the VM was resumed.
     621 */
     622#define PDMIMEDIAEX_F_SUSPEND_ON_RECOVERABLE_ERR RT_BIT_32(1)
     623 /** Mask of valid flags. */
     624#define PDMIMEDIAEX_F_VALID                      (PDMIMEDIAEX_F_SYNC | PDMIMEDIAEX_F_SUSPEND_ON_RECOVERABLE_ERR)
    596625/** @} */
    597626
     
    652681                                                  size_t cbCopy));
    653682
     683    /**
     684     * Notify the request owner about a state change for the request.
     685     *
     686     * @returns nothing.
     687     * @param   pInterface      Pointer to the interface structure containing the called function pointer.
     688     * @param   hIoReq          The I/O request handle.
     689     * @param   pvIoReqAlloc    The allocator specific memory for this request.
     690     * @param   enmState        The new state of the request.
     691     */
     692    DECLR3CALLBACKMEMBER(void, pfnIoReqStateChanged, (PPDMIMEDIAEXPORT pInterface, PDMMEDIAEXIOREQ hIoReq,
     693                                                      void *pvIoReqAlloc, PDMMEDIAEXIOREQSTATE enmState));
     694
    654695} PDMIMEDIAEXPORT;
    655696
    656697/** PDMIMEDIAAEXPORT interface ID. */
    657 #define PDMIMEDIAEXPORT_IID                  "1385d27b-8648-4174-ac73-02148c479c90"
     698#define PDMIMEDIAEXPORT_IID                  "779f38d0-bcaa-4a49-af2b-6f63edd4181a"
    658699
    659700
Note: See TracChangeset for help on using the changeset viewer.

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