From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: [PATCH 2/6] tools/libxl: Update datacopier to support sending data only Date: Fri, 20 Feb 2015 11:13:55 +0000 Message-ID: <1424430835.30924.187.camel@citrix.com> References: <1424277263-27745-1-git-send-email-andrew.cooper3@citrix.com> <1424277263-27745-3-git-send-email-andrew.cooper3@citrix.com> <1424428077.30924.172.camel@citrix.com> <54E71614.20606@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <54E71614.20606@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Andrew Cooper Cc: Wei Liu , Ian Jackson , Wen Congyang , Xen-devel List-Id: xen-devel@lists.xenproject.org On Fri, 2015-02-20 at 11:10 +0000, Andrew Cooper wrote: > On 20/02/15 10:27, Ian Campbell wrote: > > On Wed, 2015-02-18 at 16:34 +0000, Andrew Cooper wrote: > >> From: Wen Congyang > >> > >> datacopier is to read some data and write it out. If we > >> have some data to send it over network, we cannot use > >> datacopier. Update it to support this case. > > Please can you clarify this commit message. Questions I'm left with > > after reading it: > > > > * What is the relevance of "send it over network" here, why does > > it matter what the output fd is? Or is this something to do with > > the lack of an input fd (in which case where does the incoming > > data come from?) > > * Why can datacopier not currently be used in this case, what > > actually goes wrong? > > * What is the nature of the update which makes it work? (possibly > > becomes obvious after the previous answers) > > > > Thanks. > > This is one of several patches which didn't get included as part of the > libxl remus series in the end (i.e. git rebase didn't drop this hunk > out), but is still needed for migration v2. > > Currently, the datacopier only functions when copying from readfd to > writefd until EOF is hit on readfd. > > The datacopier infrastructure already has prefixdata which will be > inserted into writefd ahead of the content of readfd, but lacks the > ability to simply copy from a local buffer to writefd. > > This patch makes the lack of readfd non-fatal, which allows the rest of > the existing infrastructure function as a proper copy from local buffer. Where "copy from local buffer" is using the prefixdata support? Anyway, please expand the commit message with all that info. > > ~Andrew >