Re: how to avoid stale NFS filehandles?

From: Neil Brown (neilb@cse.unsw.edu.au)
Date: Sat Feb 16 2002 - 00:39:32 EST


On Friday February 15, matt@theBachChoir.org.uk wrote:
> Hi,
>
> I'm wondering what encoding is used for NFSv{2,3} file handles under
> knfsd. In particular, can I upgrade kernel from 2.4.x to 2.4.y without
> my clients accumulating stale filehandles?

In general, you should be able to upgrade a minor version (e.g. 2.2 to
2.4) and up or down grade a patch leverl (e.g. 2.4.2 to 2.4.10 and
back to 2.4.2) without and filehandle compatability problems.
This only applies from 2.2.16 or there abouts. Before that it was a
bit of a mess.

In particular, 2.4 introduced a new file handle format, but still
recognises the old file handle format. Further, in response to a
request that contains an old style file handle, it generates an old
style file handle so that the client can compare filehandles and so
that thos filehandles can still be used in the server is down graded.

Some time in 2.4 I will probably introduce a new export option
(fs=nnnn) which will cause the filehandles to look slightly different
(i.e. not have any device numbers in them). This will be optional
(options are like that...) but even if you do change a filesystem to
be exported with the new option, clients that currently have it
mounted will still work without getting stale file handles.

So, you should be safe (but if something does go wrong, let me know
... there could always be a bug in there somewhere).

NeilBrown
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sat Feb 23 2002 - 21:00:10 EST