Re: Public API Change Advice

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 01/30/2012 03:11 PM, Phantomcircuit wrote:
> I'd like to add a simple flag to virStorageVolWipe to use O_DIRECT.
> 
> What's the proper way to add such a flag?

Best is to copy by example :)  Here's a recent patch that added a new
flag to the public API, exposed the new flag in virsh, and implemented
that flag in the qemu driver:

commit 4e9953a426b44b40c5e0890abb73e0f90c454da5
Author: Eric Blake <eblake@xxxxxxxxxx>
Date:   Mon Jan 9 11:57:46 2012 -0700

    snapshot: allow reuse of existing files in disk snapshot

    When disk snapshots were first implemented, libvirt blindly refused
    to allow an external snapshot destination that already exists, since
    qemu will blindly overwrite the contents of that file during the
    snapshot_blkdev monitor command, and we don't like a default of
    data loss by default.  But VDSM has a scenario where NFS permissions
    are intentionally set so that the destination file can only be
    created by the management machine, and not the machine where the
    guest is running, so that libvirt will necessarily see the destination
    file already existing; adding a flag will allow VDSM to force the file
    reuse without libvirt complaining of possible data loss.

-- 
Eric Blake   eblake@xxxxxxxxxx    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]