fix potential overflow in nfs_pread_mcb

Signed-off-by: Peter Lieven <pl@kamp.de>
introduce nfs_fill_{READ,WRITE}3args

Signed-off-by: Peter Lieven <pl@kamp.de>
fix possible wrong cast to 32-bit unsigned

when calculation the max_offset the (unsigned) leads to a cast
to a 32-bit unsigned integer depending on the platform. as a result
we update the max_offset everytime when it grows beyond 2^32.
this leads to a wrong return max_offset value if the callbacks
are received out of order.

Signed-off-by: Peter Lieven <pl@kamp.de>
nfs_pwrite_async: handle short writes

the RFC allows the server to write less bytes than requested.
this patch implements a reissue logic for the reminder of the
write request(s).

Signed-off-by: Peter Lieven <pl@kamp.de>
nfs_pread_async: handle short reads

the RFC allows the server to read less bytes than requested even
if not at the EOF.
this patch implements a reissue logic for the reminder of the
read request(s).

Signed-off-by: Peter Lieven <pl@kamp.de>
{pread,pwrite}_async: fix potential segfault in out of memory condition

if there are already requests in flight we cannot return with an error immediately
from the functions since the caller will likely tidy up his data structures directly
and later on we call his callback with private_data that has likely already
been freed.

Signed-off-by: Peter Lieven <pl@kamp.de>
Merge pull request #67 from plieven/for-1.9.3

For 1.9.3