Dear Gluster Devels,
at the moment I do some Xlator stuff and I want to know if there is a way to simulate the existing of a file to the client. It should be a kind of "virtual file". Here are more details.
1. Client lookup for a file e.g. "apple.test". This file does not exist in the backend
$ ls -l apple.test
ls: cannot access apple.test: No such file or directory
Normally the system will not find that file
2. In the backend I have a real file called e.g. "apple". Now there is a Xlator which manipulates the lookup request and is looking for the file "apple" instead of "apple.test". Gluster finds the file "apple" and the client will get a message from gluster that there is a file called "apple.test" with the attributes of the file "apple" (maybe we can manipulate that attributes too).
$ ls -l apple.test
-rw-r--r-- 1 davids davids 0 Jan 5 15:42 apple.test
My first idea is, to have a special lookup and lookup_cbk in some Xlator in the server stack. Or it is better to have this Xlator in the Client Stack?
The lookup function has a parameter called "loc_t *loc". In a first test I tried to manipulate loc->name and loc-path. If I manipulate loc->path I got an error and my volume crashed.
Any hints?
Regards
David Spisla
_______________________________________________
Gluster-devel mailing list
Gluster-devel@xxxxxxxxxxx
http://lists.gluster.org/mailman/listinfo/gluster-devel