[Libguestfs] [PATCH nbdkit v5 FINAL 12/19] truncate: Implement extents for beyond end of truncated region.

Eric Blake eblake at redhat.com
Fri Mar 29 12:12:00 UTC 2019


On 3/29/19 3:40 AM, Richard W.M. Jones wrote:

>>> +  nbdkit_extents_free (extents2);
>>> +
>>
>> Should we be using the CLEANUP_EXTENTS_FREE macro here and in other filters?
> 
> At the moment the CLEANUP_* macros are only available to server code,
> not to plugins or filters.  They would certainly make plugins and
> filters easier to write.  I would really like attribute((cleanup)) to
> turn up in ISO C one day :-)

Justifying it in plugins may or may not be doable (we'd have to have
proper inclusion guards so that the cleanup functions are only declared
for capable compilers. For filters it may be easier: we already document
that all filters might as well live in-tree because we don't guarantee a
stable API (case in point - we broke API between 1.11.9 and 1.11.10, and
didn't think twice about it). So we know our filters are being compiled
with a capable compiler.  I don't know if we are installing
nbdkit-filters.h in a public location, but it really isn't all that
useful outside of nbdkit sources.

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3226
Virtualization:  qemu.org | libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libguestfs/attachments/20190329/48b6bfc4/attachment.sig>


More information about the Libguestfs mailing list