Subject: Re: FFS reliability problems
To: <>
From: David Laight <david@l8s.co.uk>
List: tech-kern
Date: 06/08/2002 13:43:52
On Sat, Jun 08, 2002 at 05:55:39AM -0400, der Mouse wrote:
> > When I was playing guessing the NFS handle for the filesystem root
> > was trivial - inode 2, use count 1 (or similar).
> 
> If fsirand has not been run on the filesystem, yes.

I'm not sure the systems I was using had a fsirand...
It is also a 'cludge' for broken fs code - since the actual
fix is to allocate 'random' 'use count' values.

Other 'fun' places for NFS are trying to find the correct
file after a server reload:

- file system types are (typically) small integers and depend
on the order filesystems are installed into a running kernel.
This could be different when a system reboots - leading to
NFS referencing the a device on the wrong FS.

- For file systems that are not based on physical disks you
can't use the 'dev' number of the disk partition to select
the correct filesystem.  Allocating small integers leads to
accesses to files in the wrong fs.

- For file systems without inode numbers, the wrong file
can be referenced.

(I sufferred from the 2nd two on the same request!
I fixed the fs code to use random numbers - so any old
NFS file handle was extremely likely to be invalid after
a server reboot.  Unfortunately that lead to a hard retry
loop and required the client to be reloaded....)

	David

-- 
David Laight: david@l8s.co.uk