Re: silent semantic changes with reiser4

From: Neil Brown
Date: Sun Aug 29 2004 - 20:44:48 EST


On Sunday August 29, torvalds@xxxxxxxx wrote:
>
> Also, while the VFS layer no longer cares (to it, ".." is purely virtual,
> and it never uses it), the NFS export routines still do actually want to
> get the on-disk parent. A filesystem that can't do that may be unable to
> be exported with full semantics (ie you might get ESTALE errors after
> server reboots, although you'd have to ask somebody with more kNFSd
> knowledge than me on exactly why that is the case ;)
>

The VFS requires all directories to have full paths from the
filesystem root in the dcache. This is needed for loop detection when
renaming directories.

suppose and NFS client: (UPPERCASE words refer to file handles)
Says "lookup ROOT 'a'" and gets A (file handle for /a)
Says "lookup A 'b'" and gets B (file handle for /a/b)
waits for /a and /a/b to be flushed from the dcache
Says "RENAME ROOT 'a' to B 'z'" (i.e. asks for /a to be moved to /a/b/c)

how can the VFS detect that that is not allowed? It needs to know
that B is a subdirectory of /a. The complete path cannot fit in
filehandle, so to needs to be computed by repeated lookup of "..",
which must be on disk.


Even without that, storing ".." on disk makes lots of sense for
fsck-like tools.

NeilBrown
-
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/