RE: [PATCH v3 1/4] Tools: hv: Reopen the devices if read() or write() returns errors

From: Dexuan Cui
Date: Sun Jan 26 2020 - 00:00:13 EST


> From: Michael Kelley <mikelley@xxxxxxxxxxxxx>
> Sent: Saturday, January 25, 2020 8:49 PM
> > +reopen_fcopy_fd:
> > + /* Remove any possible partially-copied file on error */
> > + hv_copy_cancel();
>
> Since you have removed the calls to close(fcopy_fd) after a
> pread() or pwrite() failure that were in v2 of the patch, I was
> expecting to see
>
> if (fcopy_fd != -1)
> close(fcopy_fd)

I missed this... Thanks for catching it!

> here, like you've done with the kvp and vss code. And
> remember to initialize fcopy_fd to -1. :-)
>
> Michael

Will do it in v4.

Thanks,
-- Dexuan