[nfs][client] - Question about handling of the NFS3_EEXIST error in SYMLINK rpc

Rick Macklem rmacklem at uoguelph.ca
Sun Jun 21 14:30:44 UTC 2015


Alex Burlyga wrote:
> Hi,
> 
> NFS client code in nfsrpc_symlink() masks server returned NFS3_EEXIST
> error
> code
> by returning 0 to the upper layers. I'm assuming this was an attempt
> to
> work around
> some server's broken replay cache out there, however, it breaks a
> more
> common
> case where server is returning EEXIST for legitimate reason and
> application
> is expecting this error code and equipped to deal with it.
> 
> To fix it I see three ways of doing this:
>  * Remove offending code
>  * Make it optional, sysctl?
>  * On NFS3_EEXIST send READLINK rpc to make sure symlink content is
>  right
> 
> Which of the ways will maximize the chances of getting this fix
> upstream?
> 
I've attached a patch for testing/review that does essentially #2.
It has no effect on trivial tests, since the syscall does a Lookup
before trying to create the symlink and fails with EEXIST.
Do you have a case where competing clients are trying to create
the symlink or something like that, which runs into this?

Please test the attached patch, since I don't know how to do that, rick

> One more point, old client circa FreeBSD 7.0 does not exhibit this
> problem.
> 
> Alex
> _______________________________________________
> freebsd-fs at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-fs
> To unsubscribe, send any mail to "freebsd-fs-unsubscribe at freebsd.org"
> 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: eexist.patch
Type: text/x-patch
Size: 1927 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-fs/attachments/20150621/a8dabdec/attachment.bin>


More information about the freebsd-fs mailing list