Send sockets in NTIRPC are currently blocking.
Daniel
On Thu, Mar 7, 2019 at 6:41 AM <891873395(a)qq.com> wrote:
>
> Hi:
> I have some confusion about sending reply to client。In the process of sending
the response,fouction svc_ioq_flushv() would be called. Here, use the writev() system call
to send reply via sockfd. I think we're using non-blocking socket here, but comment is
"/* blocking write */" and the transport is finish when return < 0. Why?
> result = writev(xprt->xp_fd, wiov, iw);
> remaining -= result;
>
> if (result == fbytes) {
> wiov += iw - 1;
> iw = 0;
> continue;
> }
> if (unlikely(result < 0)) {
> __warnx(TIRPC_DEBUG_FLAG_ERROR,
> "%s() writev failed (%d)\n",
> __func__, errno);
> cfconn_set_dead(xprt);
> break;
> }
>
> I think when the return code is less than 0, we should judge whether the
error code is EAGAIN.
> _______________________________________________
> Devel mailing list -- devel(a)lists.nfs-ganesha.org
> To unsubscribe send an email to devel-leave(a)lists.nfs-ganesha.org