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
..
2015-05-11 12:23:16 -07:00
2014-08-01 14:28:05 -07:00
2015-01-16 14:41:26 -08:00
2015-05-11 12:23:16 -07:00
2015-01-16 14:41:26 -08:00
2015-01-16 14:41:26 -08:00
2015-01-16 14:41:26 -08:00
2015-05-11 15:09:56 -07:00
2015-01-16 14:41:26 -08:00
2013-12-18 16:46:35 -08:00
2015-01-16 14:41:26 -08:00
2015-01-16 14:41:26 -08:00
2015-01-16 14:41:26 -08:00
2015-01-16 14:41:26 -08:00
2015-01-16 14:41:26 -08:00
2010-08-31 13:41:59 -07:00
2010-08-31 13:41:58 -07:00
2015-01-16 14:41:26 -08:00
2015-05-11 12:23:16 -07:00
2015-01-16 14:41:26 -08:00
2015-01-16 14:41:26 -08:00
2015-01-06 16:53:24 -08:00
2015-01-16 14:41:26 -08:00
2013-10-31 14:58:04 -07:00
2015-01-16 14:41:26 -08:00
2015-01-16 14:41:26 -08:00
2015-01-16 14:41:26 -08:00
2013-10-31 14:58:04 -07:00
2015-05-11 12:23:16 -07:00
2015-05-04 09:41:09 -07:00
2015-01-16 14:41:26 -08:00
2010-08-31 13:41:58 -07:00
2014-07-29 10:55:29 -07:00
2015-01-16 14:41:26 -08:00
2015-01-16 14:41:26 -08:00
2013-10-30 14:51:27 -07:00
2015-01-16 14:41:26 -08:00
2014-09-05 15:11:43 -07:00
2015-01-16 14:41:26 -08:00
2015-05-11 12:23:16 -07:00
2014-08-01 14:28:05 -07:00
2014-08-01 14:28:05 -07:00
2015-05-11 12:23:16 -07:00
2015-04-24 09:54:22 -07:00