optionally enable the NFSv4 server to allow write opens for reading

Rick Macklem rmacklem at uoguelph.ca
Sun Apr 23 22:56:43 UTC 2017

When a client such as the FreeBSD one does a write of a partial block, it will first
read the block in. If the file is opened Write only over NFSv4, the client can try
using this open for the Read. If the server (such as the FreeBSD one in head, etc)
doesn't allow this, it can reply with NFSERR_OPENMODE and the client must find
another way to do the Read, such as using what are called a "special stateid".

The attached patch modifies the FreeBSD NFSv4 server to allow use of a Write Open
for Read operations (this is allowed by the RFCs).

Does this sound reasonable to others to do? rick
ps: You can review/test the patch, but I am mainly wondering if doing this seems like
      a good idea to others?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: writeopenforread.patch
Type: application/octet-stream
Size: 1055 bytes
Desc: writeopenforread.patch
URL: <http://lists.freebsd.org/pipermail/freebsd-fs/attachments/20170423/134a0945/attachment.obj>

More information about the freebsd-fs mailing list