Skip to content
Commit f279cd00 authored by Jason Baron's avatar Jason Baron Committed by Trond Myklebust
Browse files

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: default avatarJason Baron <jbaron@akamai.com>
Signed-off-by: default avatarTrond Myklebust <trond.myklebust@primarydata.com>
parent 173b3afc
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment