]> git.karo-electronics.de Git - karo-tx-linux.git/commit
statfs() gives ESTALE error
authorMenyhart Zoltan <Zoltan.Menyhart@bull.net>
Sun, 12 Sep 2010 23:55:26 +0000 (19:55 -0400)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 20 Sep 2010 20:36:37 +0000 (13:36 -0700)
commitbcedd390d037d0e3b43da97a86e37a9bb7ceac91
tree7cc44ade3d445f1ad5d734aab8172e56d772029f
parente921923ed257d47c720f4fd71eeed812c4f5af9b
statfs() gives ESTALE error

commit fbf3fdd2443965d9ba6fb4b5fecd1f6e0847218f upstream.

Hi,

An NFS client executes a statfs("file", &buff) call.
"file" exists / existed, the client has read / written it,
but it has already closed it.

user_path(pathname, &path) looks up "file" successfully in the
directory-cache  and restarts the aging timer of the directory-entry.
Even if "file" has already been removed from the server, because the
lookupcache=positive option I use, keeps the entries valid for a while.

nfs_statfs() returns ESTALE if "file" has already been removed from the
server.

If the user application repeats the statfs("file", &buff) call, we
are stuck: "file" remains young forever in the directory-cache.

Signed-off-by: Zoltan Menyhart <Zoltan.Menyhart@bull.net>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
fs/nfs/super.c