[Bug 18874] [2TB] 32bit NFS servers export wrong negative values to 64bit clients

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Wed Nov 11 02:59:03 UTC 2015


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=18874

--- Comment #24 from Rick Macklem <rmacklem at FreeBSD.org> ---
The NFSv3 and NFSv4 RFCs specify the field as 64bit unsigned on
the wire. To "cheat" and put a negative value in it will break
non-BSD clients like Solaris.

The new/current FreeBSD server checks for a negative value for f_bavail
and puts 0 on the wire if it is negative.
The new/current FreeBSD client divides the unsigned 64bit value off the
wire by NFS_FABLKSIZE before assigning it to the 64bit signed f_bavail,
so it can never be negative (because the unsigned value fits in 63bits
after the divide).

I think this can be closed, rick

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-fs mailing list