How does remote NFS open keep local SB in memory after umount?

From: Carl Spalletta
Date: Fri Jun 02 2006 - 16:03:03 EST


neilb@xxxxxxxxxxxxxxx wrote:

mount the filesystem over nfs
open a file several directories deep. e.g.
exec 3< /mnt/cramfs/my/long/path/name/file
unmount/remount the file system on the server:
exportfs -avu
umount /test
mount /test
exportfs -av

try to read from the file

So my question is this: what keeps the superblock of the filesystem
on the server from going away when unmounted (assuming it was the last
instance). I have been unable to locate in the code where any reference
counts pertaining to the superblock are incremented as a result of
opening a file.

Obviously however, something must keep the superblock from going away or
the final read would fail. Even if by some means the inode was preserved
across mounts the field inode->i_sb would become invalid if the original
SB was destroyed.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/