freebsd-dev/module
Jan Sanislo 79065ed5a4 Return -ESTALE to force lookup for missing NFS file handles
There seems to be a annoying problem using NFSv4 to access ZFS
file systems under certain circumstances.  It's easily reproduced:

    nfs_client1:  mount server:/export /mnt
    nfs_client1:  cd /mnt
    nfs_client1:  echo foo >junk
    nfs_client1:  cat junk
    foo

Now on a different NFSv4 client:

    nfs_client2:  mount server:/export /mnt
    nfs_client2:  cd /mnt
    nfs_client2:  vi junk
    # Make some changes to /mnt/junk and save
    # This change the inode associated with /mnt/junk

Now back to the original client:

    nfs_client1:  cat junk
    cat: junk: No such file or directory

Admittedly NFSv4 is not advertised as a cluster file system that
maintains a completely coherent view of data across multiple nodes.
But it does have some mechanisms built in that try to deal with
situations like the above.  Namely, it employs specialized file
handle lookup routines that return ESTALE when a file handle contains
a non-existant inode value.  The ESTALE return triggers a return
full file path lookup from the client to determine if the file has
actually gone away or if the cached file handle is no longer valid.
ZFS behavior can be brought into line with other file systems
(e.g., ext4) by applying the following patch:

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #3224
2015-05-14 11:16:52 -07:00
..
avl Illumos 4873 - zvol unmap calls can take a very long time for larger datasets 2015-04-28 16:24:03 -07:00
nvpair Retire spl_module_init()/spl_module_fini() 2015-02-24 11:37:44 -08:00
unicode Retire spl_module_init()/spl_module_fini() 2015-02-24 11:37:44 -08:00
zcommon Illumos 5027 - zfs large block support 2015-05-11 12:23:16 -07:00
zfs Return -ESTALE to force lookup for missing NFS file handles 2015-05-14 11:16:52 -07:00
zpios Retire spl_module_init()/spl_module_fini() 2015-02-24 11:37:44 -08:00
.gitignore gitignore: anchor entries at their respective directory 2013-04-02 10:50:17 -07:00
Makefile.in Fix modules installation directory 2014-10-28 09:46:14 -07:00