On 3/20/19 5:11 PM, Richard W.M. Jones wrote:
---
filters/partition/partition.c | 36 +++++++++++++++++++++++++++++++++++
1 file changed, 36 insertions(+)
Looks the same as offset. Style question:
+ if (next_ops->extents (nxdata, count, offs + h->offset,
+ flags, extents2, err) == -1)
+ goto error;
+
+ for (i = 0; i < nbdkit_extents_size (extents2); ++i) {
+ e = nbdkit_get_extent (extents2, i);
+ e.offset -= h->offset;
+ if (nbdkit_add_extent (extents, e.offset, e.length, e.type) == -1)
Would it be any simpler to avoid the -= above, and just call
add_extent(extents, e.offset - h->offset, e.length, e.type)
(If you do it in one patch, do it in both)
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3226
Virtualization:
qemu.org |
libvirt.org