Re: VFS + path walktrough

From: Miklos Szeredi
Date: Mon May 05 2008 - 12:44:35 EST


> > * Al Viro <viro@xxxxxxxxxxxxxxxxxx> wrote:
> > > That you have quite forgotten about mounts.
> >
> > hmm, I though this would be done before the link_path_walk()
> > call happens ;-o
>
> How on the earth...? You don't know where will pathname resolution
> get you, so how could you possibly handle mountpoint transitions prior
> to it?

One way this could be done cleanly, is to pass the rest of the path
(as hint) to the filesystem in its lookup function. Most filesystems
would just ignore it, but those which have the capabilities can use it
to do the lookup in one go, and internally cache the result. The VFS
doesn't need to know _anything_ about all this. If there are
mountpoints, they are already cached, so ->lookup() wouldn't be called
at all, only ->d_revalidate(), which is a different issue.

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