Solomon Boulos has uploaded this change for review.

View Change

Implement read!

On the server:

$ dd if=/dev/urandom of=bytes.txt bs=512KB count=7
$ sha1sum bytes.txt
74cef82f324de11f714be420749b4eca8d46d1e9 bytes.txt

and the client:

$ sha1sum proxy-mount/bytes.txt
74cef82f324de11f714be420749b4eca8d46d1e9 proxy-mount/bytes.txt

Found a couple things along the way:

- First, nobody seems to implement hildebrand@'s READPLUS.

- Second, Ganesha's "iovec"/readv() support seems inane. There's only a single
offset, unlike readv(), so I don't see the point. Ganesha's NFSD won't ever
generate a >1 length iovec either to the FSAL layer (seemingly), which is
probably why the v4 Proxy FSAL just ignores this (but doesn't check).

- Finally, my hardcoded 4KB buffer in rpc.c didn't cut it when attempting to
read a bigger file. I still don't understand how you're supposed to allow
xdrmem_create or whatever to do the right thing for you / allocate.

Change-Id: I6aa2e69d6bc376cbbe4d2742ebcb62d51ac0ed21
Signed-off-by: Solomon Boulos <boulos@google.com>
---
M src/FSAL/FSAL_PROXY_V3/main.c
M src/FSAL/FSAL_PROXY_V3/rpc.c
2 files changed, 115 insertions(+), 3 deletions(-)

git pull ssh://review.gerrithub.io:29418/ffilz/nfs-ganesha refs/changes/48/487448/1

To view, visit change 487448. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: ffilz/nfs-ganesha
Gerrit-Branch: next
Gerrit-Change-Id: I6aa2e69d6bc376cbbe4d2742ebcb62d51ac0ed21
Gerrit-Change-Number: 487448
Gerrit-PatchSet: 1
Gerrit-Owner: Solomon Boulos <boulos@google.com>
Gerrit-MessageType: newchange