Thread (1 message) 1 message, 1 author, 2011-07-15

Re: [PATCH 09/10] nfs: use sk fragment destructors to delay I/O completion until page is released by network stack.

From: Ian Campbell <hidden>
Date: 2011-07-15 15:21:18
Also in: linux-nfs

On Fri, 2011-07-15 at 15:01 +0100, Trond Myklebust wrote:
On Fri, 2011-07-15 at 12:07 +0100, Ian Campbell wrote: 
quoted
Thos prevents an issue where an ACK is delayed, a retransmit is queued (either
at the RPC or TCP level) and the ACK arrives before the retransmission hits the
wire. If this happens then the write() system call and the userspace process
can continue potentially modifying the data before the retransmission occurs.

NB: this only covers the O_DIRECT write() case. I expect other cases to need
handling as well.
That is why this belongs entirely in the RPC layer, and really should
not touch the NFS layer.
If you move your callback to the RPC layer and have it notify the
rpc_task when the pages have been sent, then it should be possible to
achieve the same thing.

IOW: Add an extra state machine step after call_decode() which checks if
all the page data has been transmitted and if not, puts the rpc_task on
a wait queue, and has it wait for the fragment destructor callback
before calling rpc_exit_task().
Make sense, I'll do that.

Thanks,
Ian.


--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help