[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v2] tools/libxc: Implement writev_exact() in the same style as write_exact()



Andrew Cooper writes ("[PATCH v2] tools/libxc: Implement writev_exact() in the 
same style as write_exact()"):
> This implementation of writev_exact() will cope with an iovcnt greater than
> IOV_MAX because glibc will actually let this work anyway, and it is very
> useful not to have to work about this in the caller of writev_exact().  The
> caller is still required to ensure that the sum of iov_len's doesn't overflow
> a ssize_t.
...
> +        /* writev() guarentees atomicity of individual iov[] elements.
> +         * Sanity check that the returned len did lie on an iov[]
> +         * element boundary. */
> +        assert(len == 0);

I think you have misunderstood something that I wrote.  writev does
not (in the general case) guarantee not to stop within an iov element.

Ian.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.