Re: QEMU-libgfapi integration: glfs_pwritev_async() failing for iovec count>1

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

 



On Sat, Jul 14, 2012 at 11:07 PM, Anand Avati <anand.avati@xxxxxxxxx> wrote:
> Thanks for reporting! Let me know if this fixes the problem --
>
> ----------------snip-----------------------
> diff --git a/api/src/glfs-fops.c b/api/src/glfs-fops.c
> index 7523ed2..b62942b 100644
> --- a/api/src/glfs-fops.c
> +++ b/api/src/glfs-fops.c
> @@ -480,6 +480,7 @@ glfs_pwritev (struct glfs_fd *glfd, const struct iovec
> *iovec, int iovcnt,
>         size_t          size = -1;
>         struct iobref  *iobref = NULL;
>         struct iobuf   *iobuf = NULL;
> +       struct iovec    iov = {0, };
>
>         __glfs_entry_fd (glfd);
>
> @@ -510,7 +511,10 @@ glfs_pwritev (struct glfs_fd *glfd, const struct iovec
> *iovec, int iovcnt,
>
>         iov_unload (iobuf_ptr (iobuf), iovec, iovcnt);
>
> -       ret = syncop_writev (subvol, glfd->fd, iovec, iovcnt, offset,
> +       iov.iov_base = iobuf_ptr (iobuf);
> +       iov.iov_len = size;
> +
> +       ret = syncop_writev (subvol, glfd->fd, &iov, 1, offset,
>                              iobref, flags);
>
>         iobuf_unref (iobuf);
> --------------------------------------------------------

Thanks. This fixes the problem.

Regards,
Bharata.



[Index of Archives]     [Gluster Users]     [Ceph Users]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux