Re: [AVFS] Problems with fork, Questions about avfs

Miklos Szeredi <[email protected]> Tue, 15 Feb 2005 11:14:49 +0100
Newsgroups gmane.comp.file-systems.avfs.user
Message-ID <[email protected]>
> I changed the code so segment_len will now check with another function
> is the next segment describes a local file. This way parse_path is
> almost untouched. I currently trying to add the test to virtual files
> to only enter the next avfs hierarchy if a file containing the magic
> char is not present in the current avfs mount.
> Is there a easy way to call av_file_getattr? It looks like I need a
> vfile which itself needs a ventry which the function currently tries to
> build.

Tricky.  How about leaving the test till the next segment: so instead
of blindly accepting the magic char, at the beginning of the segment,
do a stat on the file which is the current ps->ve plus from the magic
char up to the next slash.  This way you already hold the correct
ventry.  This means that you'd have to modify lookup_segment() instead
of segment_len().  Does this sound solvable?

> If this is not possible then I would go with your solution and just
> testing at the beginning of parse_path for local files. Although we
> cannot test for symlinks (remember followsymlinks code in parse_path)
> the lstat will fail for the first symlink to a virtual file.

Hmm.  Not following links to virtual files was one of the shortcomings
of avfscoda and ld_preload, so yes it would be nice if this would also
work.

> If we can find a way to call avfs->stat we can support this but it
> wouldn't hurt much if not.

Agreed.

Thanks,
Miklos


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click