On 12/06/2016 03:31 PM, Max Reitz wrote: >>> >>> The only alternative I can come up with would be "qcow2_write_zeroes"; >>> that at least solves the first issue I have with this, but not the >>> second one... >> >> Maybe qcow2_cluster_zeroize() and qcow2_cluster_discard()? > > I think qcow2_discard() is fine (it works with any alignment (even > though it will only discard whole clusters)
Except that I think with my recent fix to qcow2_make_empty(), we can now assert that all callers actually pass cluster-aligned values. Hence my other comment that maybe we want to (as a prereq patch) actually assert that callers are aligned, at which point keeping cluster in the name is once again worthwhile. > and "discard" is mainly used > as a verb, so at least I'm not confused there). I like > qcow2_cluster_zeroize() if nothing else then for the "zeroize" alone. :-) Okay, then I have a good idea of what name to use. -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
