VirtualBox

Changeset 54340 in vbox for trunk/include


Ignore:
Timestamp:
Feb 20, 2015 6:51:07 PM (10 years ago)
Author:
vboxsync
Message:

Storage/VD: Allow different filter chains for reads and writes (required by disk image encryption to encrypt images afterwards)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/vd.h

    r52830 r54340  
    242242/** @}*/
    243243
     244/** @name VBox HDD container filter flags
     245 * @{
     246 */
     247/** The filter is applied during writes. */
     248#define VD_FILTER_FLAGS_WRITE RT_BIT(0)
     249/** The filter is applied during reads. */
     250#define VD_FILTER_FLAGS_READ  RT_BIT(1)
     251/** Default set of filter flags. */
     252#define VD_FILTER_FLAGS_DEFAULT (VD_FILTER_FLAGS_WRITE | VD_FILTER_FLAGS_READ)
     253/** Mask of valid flags. */
     254#define VD_FILTER_FLAGS_MASK    (VD_FILTER_FLAGS_WRITE | VD_FILTER_FLAGS_READ)
     255/** @} */
     256
    244257/**
    245258 * Helper functions to handle open flags.
     
    641654 * @param   pDisk           Pointer to the HDD container which should use the filter.
    642655 * @param   pszFilter       Name of the filter backend to use (case insensitive).
     656 * @param   fFlags          Flags which apply to the filter, combination of VD_FILTER_FLAGS_*
     657 *                          defines.
    643658 * @param   pVDIfsFilter    Pointer to the per-filter VD interface list.
    644659 */
    645 VBOXDDU_DECL(int) VDFilterAdd(PVBOXHDD pDisk, const char *pszFilter,
     660VBOXDDU_DECL(int) VDFilterAdd(PVBOXHDD pDisk, const char *pszFilter, uint32_t fFlags,
    646661                              PVDINTERFACE pVDIfsFilter);
    647662
     
    907922
    908923/**
    909  * Removes the last added filter in the HDD container.
     924 * Removes the last added filter in the HDD container from the specified chain.
    910925 *
    911926 * @return  VBox status code.
    912927 * @retval  VERR_VD_NOT_OPENED if no filter is present for the disk.
    913928 * @param   pDisk           Pointer to HDD container.
    914  */
    915 VBOXDDU_DECL(int) VDFilterRemove(PVBOXHDD pDisk);
     929 * @param   fFlags          Combination of VD_FILTER_FLAGS_* defines.
     930 */
     931VBOXDDU_DECL(int) VDFilterRemove(PVBOXHDD pDisk, uint32_t fFlags);
    916932
    917933/**
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