On Sun, Feb 20, 2022 at 02:13:57PM +0200, Nir Soffer wrote: > copy_subcommand creates a new command without copying the original > command. Rename the function to make this more clear. > > Signed-off-by: Nir Soffer <nsof...@redhat.com> > --- > copy/multi-thread-copying.c | 29 ++++++++++++++--------------- > 1 file changed, 14 insertions(+), 15 deletions(-) > > if (!last_is_zero) { > /* Write the last data (if any). */ > if (i - last_offset > 0) { > - newcommand = copy_subcommand (command, > + newcommand = create_subcommand (command, > last_offset, i - last_offset, > false);
Indentation needs updates here. > dst->ops->asynch_write (dst, newcommand, > (nbd_completion_callback) { > .callback = free_command, > .user_data = newcommand, > }); > } > /* Start the new zero range. */ > last_offset = i; > @@ -431,55 +430,55 @@ finished_read (void *vp, int *error) > } > } > else { > /* It's data. If the last was data too, do nothing => > * coalesce. Otherwise write the last zero range and start a > * new data. > */ > if (last_is_zero) { > /* Write the last zero range (if any). */ > if (i - last_offset > 0) { > - newcommand = copy_subcommand (command, > - last_offset, i - last_offset, > - true); > + newcommand = create_subcommand (command, > + last_offset, i - last_offset, > + true); But you got it right elsewhere. ACK. -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org _______________________________________________ Libguestfs mailing list Libguestfs@redhat.com https://listman.redhat.com/mailman/listinfo/libguestfs