[Gluster-devel] Writing a new xlator is made a bit easier now
Atin Mukherjee
amukherj at redhat.com
Thu Dec 24 06:15:53 UTC 2015
This is nice Poornima!
~Atin
On 12/24/2015 11:32 AM, Poornima Gurusiddaiah wrote:
> Hi All,
>
> Here is a patch http://review.gluster.org/#/c/13061/ that creates the initial template for any new xlator that you wish to write.
>
> How to use:
> $ python ./generate_xlator.py <XLATOR_DIRECTORY> <XLATOR_NAME> <FOP_SUFFIX>
>
> Eg: python ./generate_xlator.py /home/u1/glusterfs/xlators/features compression cmpr
> This command will create the following files with some initial contents like copyright, fops definition, header definition etc. :
> * /home/u1/glusterfs/xlators/features/compression/Makefile.am
> * /home/u1/glusterfs/xlators/features/compression/src/Makefile.am
> * /home/u1/glusterfs/xlators/features/compression/src/compression.c
> * /home/u1/glusterfs/xlators/features/compression/src/compression.h
> * /home/u1/glusterfs/xlators/features/compression/src/compression-mem-types.h
> * /home/u1/glusterfs/xlators/features/compression/src/compression-messages.h
>
> By default all the fops and other functions are generated, if you do not need to implement certain functions, delete those functions from the the file `config.py`.
> One can customize the fop definition by changing CBK_TEMPLATE/FOP_TEMPLATE in generate_xlator.py.
>
> This is an addition to Jeff's http://review.gluster.org/#/c/9411/
> Reviews are welcome.
>
> Merry Christmas:)
>
> Regards,
> Poornima
>
>
>
>
>
> _______________________________________________
> Gluster-devel mailing list
> Gluster-devel at gluster.org
> http://www.gluster.org/mailman/listinfo/gluster-devel
>
More information about the Gluster-devel
mailing list