[libvirt] [PATCH v2 0/4] Forbid migration with cache != none

Eric Blake eblake at redhat.com
Wed Feb 22 18:56:54 UTC 2012


On 02/22/2012 07:51 AM, Jiri Denemark wrote:
> 
> I was also wondering if we should rather use more specific name for both
> the error code and flag, such as VIR(_ERR)?_MIGRATE_UNSAFE_CACHE
> (or ...UNSAFE_DISK) in the case we find other unsafe conditions...

I think that if we ever have sub-categories of unsafe operations, where
we want the user to pass varying flags to allow one but not the other
sub-category, then we could do:

VIR_ERR_MIGRATION_UNSAFE_CACHE = 1<<9,
VIR_ERR_MIGRATION_UNSAFE_DISK  = 1<<10,
VIR_ERR_MIGRATION_UNSAFE =
(VIR_ERR_MIGRATION_UNSAFE_CACHE|VIR_ERR_MIGRATION_UNSAFE_DISK)

that is, make the current generic name remain generic by having it cover
multiple bits, while the specific bits control the sub-options.  But for
now, I'm fine with just a single, shorter, name.

-- 
Eric Blake   eblake at redhat.com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 620 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20120222/ba18afd5/attachment-0001.sig>


More information about the libvir-list mailing list