20ef211cfa
libglusterfs devel package headers are referenced in code using include semantics for a program, this while it works can be better especially when dealing with out of tree xlator builds or in general out of tree devel package usage. Towards this, the following changes are done, - moved all devel headers under a glusterfs directory - Included these headers using system header notation <> in all code outside of libglusterfs - Included these headers using own program notation "" within libglusterfs This change although big, is just moving around the headers and making it correct when including these headers from other sources. This helps us correctly include libglusterfs includes without namespace conflicts. Change-Id: Id2a98854e671a7ee5d73be44da5ba1a74252423b Updates: bz#1193929 Signed-off-by: ShyamsundarR <srangana@redhat.com> |
||
---|---|---|
.. | ||
generate_xlator.py | ||
new-xlator-tmpl.c | ||
README.md |
####This document explains how to create a template for your new xlator.
$ python ./generate_xlator.py <XLATOR_DIRECTORY> <XLATOR_NAME> <FOP_PREFIX>
* XLATOR_DIRECTORY: Directory path where the new xlator folder will reside
* XLATOR_NAME: Name of the xlator you wish to create
* FOP_PREFIX: This is the fop prefix that you wish to prefix every fop definition in your xlator, fop prefix is generally different than xlator name, if the xlator name is too long.
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 etc.
Note that there shouldn't be a "/" specified at the end of the <XLATOR_DIRECTORY>
* /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 functions are generated, if you wish to not implement certain fops and functions, comment those lines (by adding '#' at the start of the line) in libglusterfs/src/generate_xlator.py
Few other manual steps required to get the new xlator completely functional:
- Change configure.ac
- Change
<XLATOR_DIRECTORY>/Makefile.am
to include the new xlator directory. Eg:/home/u1/glusterfs/xlators/features/Makefile.am
- Change vol file or glusterd volgen to include the new xlator in volfile