]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
nfsclient: Protest loudly when GETATTR responses are invalid
authorConrad Meyer <cem@FreeBSD.org>
Wed, 5 Aug 2015 22:27:30 +0000 (22:27 +0000)
committerConrad Meyer <cem@FreeBSD.org>
Wed, 5 Aug 2015 22:27:30 +0000 (22:27 +0000)
commitb5af3f30a752cb607b8ab430cdc46c9bc463f227
treeb3cc70da7dcb1d3a52cb9521e1586b9d6fd83e16
parent7d0d4342e3649b5a1894a77c3b1af102aae854c6
nfsclient: Protest loudly when GETATTR responses are invalid

BROKEN NFS SERVER OR MIDDLEWARE: Certain WAN "accelerators" attempt to cache
NFS GETATTR traffic, but actually corrupt it (e.g., responding to requests
with attributes for totally different files).

Warn very verbosely when this is detected. Linux' NFS client has a similar
warning.

Adds a sysctl/tunable (vfs.nfs.fileid_maxwarnings) to configure the quantity
of warnings; default to 10. (Zero disables; -1 is unlimited.)

Adds a failpoint to aid in validating the warning / behavior with a
non-broken server. Use something like:

    sysctl 'debug.fail_point.nfscl_force_fileid_warning=10%return(1)'

Reviewed by: rmacklem
Approved by: markj (mentor)
Sponsored by: EMC / Isilon Storage Division
Differential Revision: https://reviews.freebsd.org/D3304
sys/fs/nfsclient/nfs_clport.c