Hi Jeff,
Jeff Mahoney:
> In my tree, I use the following check to enable NFS access in general,
> but disable NFSv4. I also use lookup_one_len instead of __lookup_hash if
> __lookup_hash isn't available. NFS4 isn't enabled without __lookup_hash.
:::
> I've done some light testing with NFSv3 and ensured it refuses an NFSv4
> branch, but haven't tested otherwise with NFSv4.
I might find a problem of your approach which passes NULL nameidata for
NFSv2/v3 branch fs.
In linux-2.6.27/fs/nfs/dir.c, nfs_lookup() and nfs_lookup_revalidate()
calls nfs_is_exclusive_create(). It accepts the NULL nameidata, but the
behaviour differs. When nd is not NULL, it checks the flags and the
return value may be altered. Finally nfs_lookup() and
nfs_lookup_revalidate() behaves differently.
Isn't this difference a problem in your environment?
I am afraid some tests for the open(2) flags O_CREAT | O_EXCL may fail...
Junjiro R. Okajima
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/