On Fri, 2011-07-15 at 15:01 +0100, Trond Myklebust wrote: > On Fri, 2011-07-15 at 12:07 +0100, Ian Campbell wrote: > > 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@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html