[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Hurd NFS translator



On 21/06/2025 18:18, Samuel Thibault wrote:
Better validate progressively.
I have attached the first in a series of patches to enable NFSv3 support in the NFS translator. These will each include a small number of changes to simplify validation. There is no command line argument to activate the NFSv3 code at present and the patches will not change that until there is sufficient functionality in place to complete a build of both gnumach and hurd using NFSv3. These are my test cases for ordinary files.

This first patch is extracted from my local code that is capable of building the above on NFSv3. I have tested this patch alone by building gnumach on an NFSv2 server and then booting with that image without obvious problem.

To link gnumach on NFS it is necessary to use my patched binutils ld. I spent quite a long time working on 2 bugs that I found which were exposed by it not being possible to mmap an NFS mounted file on Hurd. I have a possible fix for 1 bug and an understanding of the other, which allows me to workaround it, but which might need quite a bit of development to fix properly. Is it recommended to liaise with the Debian or the upstream maintainer in this case?

Please indicate whether this patch is acceptable and if approved I will begin generating further patches. In total there is around 500 lines of contextual diff yet to be presented. I also have work in progress to add TCP/IP transport option which would give a performance benefit on NFSv3.

Patch summary:

1) All 64 bit integers defined in the NFSv3 RPC appear to be uint64_t so I have modified the xdr_encode_64bit and xdr_decode_64bit interface accordingly. These functions are only used in NFSv3 code.

2) bug in xdr_encode_64bit: 'bit shift' and 'bitwise and' occur in the wrong sequence

3) bugs in xdr_decode_fattr: fsid and ino are both 64 bit values in NFSv3

4) bugs in process_wcc_stat: sizeof(int) wrongly used with integer pointer arithmetic

5) bugs in netfs_attempt_write: offset is 64 bit and missing count field

Attachment: patch.v3.1
Description: Unix manual page


Reply to: