Re: __d_path export and SMP safeness

John Ogness <[email protected]>
Newsgroups gmane.linux.dazuko.devel
Message-ID <[email protected]>
Tikka, Sami wrote:
> Dazuko could use the exported d_path. Then the filename the driver reports
> will be relative to the current root of the process that made the file
> access. But this is not a problem. The process which gets the dazuko events
> can easily check readlink /proc/PID/root and prepend that to the filename in
> the event.
> 
> What do you think, John? Could you make dazuko use d_path on Linux?

Well, this would double the amount of user/kernel switches, which would be a
performance hit. It would also require that the /proc system is available.

But yes, this would work.

If I were to implement this for Linux 2.6 SMP (the only affected kernels),
then I would change Dazuko to send a filename without the beginning "/" for
files in chroot'd environments. This would signal the user application that
it needed to do a lookup for the full path. This would reduce the extra
overhead to *only* file accesses in a chroot environment.

With DazukoFS we won't have this problem because we won't need __d_path().
But we can use this hack until DazukoFS is available.

This hack would only be required for Linux 2.6 SMP kernels that do not
export __d_path().

John Ogness

-- 
Dazuko Maintainer
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.