From: Ian Jackson Subject: Re: [PATCH] tools/libxc: Implement writev_exact() in the same style as write_exact() [and 1 more messages] Date: Tue, 8 Jul 2014 18:10:04 +0100 Message-ID: <21436.9708.765390.466764@mariner.uk.xensource.com> References: <1404728318-13474-1-git-send-email-andrew.cooper3@citrix.com> <53BBB966.4020609@citrix.com> <53BBBA9C.1030005@citrix.com> <21436.9020.757598.972931@mariner.uk.xensource.com> <53BC23A9.8000808@citrix.com> <1404324299-29286-1-git-send-email-andrew.cooper3@citrix.com> <21429.36759.826159.277629@mariner.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <21429.36759.826159.277629@mariner.uk.xensource.com>, <53BC23A9.8000808@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 , Xen-devel , Ian Campbell , David Vrabel List-Id: xen-devel@lists.xenproject.org Ian Jackson writes ("Re: [PATCH] tools/libxc: Implement writev_exact() in the same style as write_exact()"): > Andrew Cooper writes ("[PATCH] tools/libxc: Implement writev_exact() in the same style as write_exact()"): > > +int writev_exact(int fd, struct iovec *iov, int iovcnt); > > +/* Note - writev_exact() might modify iov. Whether it does so in practice > > + * depends on whether your system implementation of writev() returns from a > > + * partial write in the middle of an iov element. */ > > The second sentence should be removed. No-one is allowed to assume > that writev doesn't do so. Also, you should mention that your > writev_exact lacks the atomicity guarantee of proper writev. Andrew Cooper writes ("Re: [Xen-devel] [PATCH v2] tools/libxc: Implement writev_exact() in the same style as write_exact()"): > Ok - in which case v1 of the patch is correct. I shall submit v3 which > looks similar to v1, but with some comments improvements Please make sure to update the doc comment as I suggest above. Ian.