rpc: return sent and err from xs_sendpages()
authorJason Baron <jbaron@akamai.com>
Wed, 24 Sep 2014 18:08:00 +0000 (18:08 +0000)
committerTrond Myklebust <trond.myklebust@primarydata.com>
Thu, 25 Sep 2014 03:13:37 +0000 (23:13 -0400)
commitf279cd008fc9742f5ec294d9b8a793a7a0b163ef
treeb8622a23661a1937c090c87d29f5393cb559a511
parent173b3afceebe76fa2205b2c8808682d5b541fe3c
rpc: return sent and err from xs_sendpages()

If an error is returned after the first bits of a packet have already been
successfully queued, xs_sendpages() will return a positive 'int' value
indicating success. Callers seem to treat this as -EAGAIN.

However, there are cases where its not a question of waiting for the write
queue to drain. For example, when there is an iptables rule dropping packets
to the destination, the lower level code can return -EPERM only after parts
of the packet have been successfully queued. In this case, we can end up
continuously retrying resulting in a kernel softlockup.

This patch is intended to make no changes in behavior but is in preparation for
subsequent patches that can make decisions based on both on the number of bytes
sent by xs_sendpages() and any errors that may have be returned.

Signed-off-by: Jason Baron <jbaron@akamai.com>
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
net/sunrpc/xprtsock.c
This page took 0.025076 seconds and 5 git commands to generate.