]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/commit
MFC: r317345
authorrmacklem <rmacklem@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Mon, 8 May 2017 21:40:42 +0000 (21:40 +0000)
committerrmacklem <rmacklem@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Mon, 8 May 2017 21:40:42 +0000 (21:40 +0000)
commit2f8458919a35d50013e62fda94c4a0b3a96e7e24
tree4786e8d7e424ad5fc4f32da47b3d4c7da172752e
parentb2918d1709e43d6f39a79427f44e5daefb7f2153
MFC: r317345
Make the NFSv4 client to use a write open for reading if allowed by the server.

An NFSv4 server has the option of allowing a Read to be done using a Write
Open. If this is not allowed, the server will return NFSERR_OPENMODE.
This patch attempts the read with a write open and then disables this
if the server replies NFSERR_OPENMODE.
This change will avoid some uses of the special stateids. This will be
useful for pNFS/DS Reads, since they cannot use special stateids.
It will also be useful for any NFSv4 server that does not support reading
via the special stateids. It has been tested against both types of NFSv4 server.

git-svn-id: svn://svn.freebsd.org/base/stable/10@317984 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
sys/fs/nfs/nfsport.h
sys/fs/nfsclient/nfs_clrpcops.c
sys/fs/nfsclient/nfs_clstate.c