Relax permission checking on OPEN CREATE

If we have an OPEN CREATE, the file may be created with a mode that would
preclude the access type of the open. That is not what is expected, so
make a best effort determination that we created the file, and use that
to skip permission checking on open.

Note that we REALLY need to make a better effort at atomicity of OPEN CREATE.
This code is subject to a race where our lookup fails, but simultaneously
someone else creates the file in a way that would preclude this OPEN from
opening the file. Particularly insidious would be another user creating the
file...

Signed-off-by: Frank S. Filz <ffilzlnx@mindspring.com>
Acked-by: Malahal Naineni <malahal@us.ibm.com>
Add export option to enable use of readdir results for negative dirent cache

Most current FSALs do not provide the proper cache coherency to support use
of the readdir results to perform negative dirent caching. Further, some
filesystems support implied files, which are not enumerated in readdir
results but can be looked up directly, in such a case, even with proper
invalidation of dirent cache, use of the dirent cache to infer negative
lookup results would prevent looking up one of these implied files once
a readdir had been performed.

This behavior is controled by a new export option, which defaults to false
in support of the bulk of current FSALs and filesystems.

Signed-off-by: Frank S. Filz <ffilzlnx@mindspring.com>
Acked-by: Malahal Naineni <malahal@us.ibm.com>
Acked-by: Jim Lieb <lieb@sea-troll.net>
Acked-by: Soumya Koduri <skoduri@redhat.com>
Acked-by: Matt Benjamin <matt@linuxbox.com>
Fix crash if try to open-create an existing non-regular file

Signed-off-by: Frank S. Filz <ffilzlnx@mindspring.com>