• E
    save: new public API to bypass file system cache on save/restore · ad0b9123
    Eric Blake 提交于
    In order to choose whether to use O_DIRECT when saving a domain image
    to a file, we need a new flag.  But virDomainSave was implemented
    before our policy of all new APIs having a flag argument.  Likewise
    for virDomainRestore when restoring from a file.
    
    The new flag name is chosen as CACHE_BYPASS so as not to preclude
    a future solution that uses posix_fadvise once the Linux kernel has
    a smarter implementation of that interface.
    
    * include/libvirt/libvirt.h.in (virDomainCreateFlags)
    (virDomainCoreDumpFlags): Add a flag.
    (virDomainSaveFlags, virDomainRestoreFlags): New prototypes.
    * src/libvirt.c (virDomainSaveFlags, virDomainRestoreFlags): New API.
    * src/libvirt_public.syms: Export them.
    * src/driver.h (virDrvDomainSaveFlags, virDrvDomainRestoreFlags):
    New driver callbacks.
    ad0b9123
driver.h 54.2 KB