Adding a new FOP
Steps to be followed when adding a new FOP to GlusterFS:
- Edit
glusterfs.h
and add aGF_FOP_*
constant. - Edit
xlator.[ch]
and:- add the new prototype for fop and callback.
- edit
xlator_fops
structure.
- Edit
xlator.c
and add to fill_defaults. - Edit
protocol.h
and add struct necessary for the new FOP. - Edit
defaults.[ch]
and provide default implementation. - Edit
call-stub.[ch]
and provide stub implementation. - Edit
common-utils.c
and add to gf_global_variable_init(). - Edit client-protocol and add your FOP.
- Edit server-protocol and add your FOP.
- Implement your FOP in any translator for which the default implementation is not sufficient.