Re: file as a directory
From: Christian Mayrhuber
Date: Wed Nov 24 2004 - 11:16:31 EST
On Wednesday 24 November 2004 16:02, Paolo Ciarrocchi wrote:
> On 24 Nov 2004 09:16:03 +0000, Peter Foldiak
> <peter.foldiak@xxxxxxxxxxxxxxxx> wrote:
> [...]
> > I would really like to implement this for the next version of Hans' file
> > system.
>
> I don't undersand how you want to use Xpath for not XML file.
> I agree with you that the idea behind Xpath is cool but I fail to
> unserstand how it can be applied to anything but XML
>
> --
> Paolo
> Picasa users groups: www.picasa-users.tk
> join the blog group: http://groups-beta.google.com/group/blog-users
>
Apache Cocoon uses so called generators to parse non-XML formats and produce a
XML representation thereof. This XML can be addressed by XPath.
To store modifications back this XML needs to be serialized to the original
format. That's **very** fat and slow.
Maybe an automount with a special fuse filesystem could accomplish this.
For example:
# cd /etc/passwd/..metas/contents/
automounts /etc/passwd as "fuse-xpath-passwd" fs
to /etc/passwd/..metas/contents/
Doing 'cat /etc/passwd/..metas/contents/shell[username = "joe"]' could work
then.
Reiser4 would need a content-mount plugin that automounts
the respective file by means of a per file configureable
mount command. Something like
# cat /etc/passwd/..metas/plugins/content-mount
-t fuse-xpath-passwd -o ro
fuse-xpath-* filesystems would have to be written. These could be designed
similiar to the apache cocoon approach of generators/serializers to
work with an intermediate XML representation of the file interior.
All the stuff besides mounting the fuse-xpath-fs's would happen in userspace.
I don't think that anyone can guarantee posix fs semantics by this approach.
--
lg, Chris
-
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/