[Gluster-users] Guideline needed for a xlator project

Jeff Darcy jdarcy at redhat.com
Tue Jan 25 14:09:42 UTC 2011


On 01/25/2011 08:25 AM, Paulo Jorge de Melo wrote:
> Greetings,
> I am having a bit trouble to write a new translator for glusterfs.
> The main idea is when I try to read a file that not existing in the
> glusterfs volume, the xlator will look in a predefined local directory
> and if the file exist will perform the operation as usual but only in
> the local file.
> 
> I have read most of the xlators source codes to search for some clues
> but so far still digging...

I've attached a copy of a document I wrote a while ago when I started
writing translators myself.  It probably needs some updates, but it
should give a decent conceptual overview that will help understand what
other translators you look at are doing.  I recommend starting with some
of the simplest translators, such as performance/* or debug/trace.  Stay
away from DHT and AFR, which are not only complex generally but each
introduce additional layers of control-flow complexity to deal with
lookups and transactions respectively.  Note that your translator
doesn't need to handle all entry points; any you don't specify in your
fops table will be set to a default value which just passes through to
the first subvolume.


More information about the Gluster-users mailing list