• A
    Add private data pointer to virStoragePool and virStorageVol · 2b121dbc
    Ata E Husain Bohra 提交于
    This will simplify the refactoring of the ESX storage driver to support
    a VMFS and an iSCSI backend.
    
    One of the tasks the storage driver needs to do is to decide which backend
    driver needs to be invoked for a given request. This approach extends
    virStoragePool and virStorageVol to store extra parameters:
    
    1. privateData: stores pointer to respective backend storage driver.
    2. privateDataFreeFunc: stores cleanup function pointer.
    
    virGetStoragePool and virGetStorageVol are modfied to accept these extra
    parameters as user params. virStoragePoolDispose and virStorageVolDispose
    checks for cleanup operation if available.
    
    The private data pointer allows the ESX storage driver to store a pointer
    to the used backend with each storage pool and volume. This avoids the need
    to detect the correct backend in each storage driver function call.
    2b121dbc
vbox_tmpl.c 341.0 KB