Skip to main content

NFS V3- yanfs issue with reading files larger that 2GB

No replies
Joined: 2013-01-11
Points: 0

I am not sure that this is correct forum to post this question but I could not find a project specific group.
I have a linux machine used as an nfs server and there are large sized files on it (around 64 bit offset ).
Now I am working on a java application running on a windows client, using nfs and xfile api for file operations, and I need to read some of those large files from the nfs server (..later on will do some processing on the file content..)
RFC for NFS3 indicates that 64 bit file offset is allowed but however, it seems yanfs have some issue with it:

It has an attempt to copy the entire file to a (or at least have a capable of holding entire file data ), thus expect this bufferList have a list size of n, where n = length of file / rsize..

Length of file can have a long value, but bufferlist size (n) is of type int. So below casting in results in a negative size array exception, when file is larger than 2 GB :

* Make sure an array of buffers exists that's big enough
* to for the entire file.

if (bufferList == null)

bufferList = new Buffer[(int) length() / rsize + 1];

Did anyone else already realised this problem before and have a fix for it ?

Thank you,