File: adding-fops.md

package info (click to toggle)
glusterfs 11.2-2
  • links: PTS
  • area: main
  • in suites: forky, sid
  • size: 28,244 kB
  • sloc: ansic: 471,238; sh: 45,610; python: 16,893; perl: 3,328; makefile: 2,014; yacc: 487; ruby: 171; lisp: 124; xml: 75; lex: 61
file content (17 lines) | stat: -rw-r--r-- 670 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
Adding a new FOP
================

Steps to be followed when adding a new FOP to GlusterFS:

1. Edit `glusterfs.h` and add a `GF_FOP_*` constant.
2. Edit `xlator.[ch]` and:
    * add the new prototype for fop and callback.
    * edit `xlator_fops` structure.
3. Edit `xlator.c` and add to fill_defaults.
4. Edit `protocol.h` and add struct necessary for the new FOP.
5. Edit `defaults.[ch]` and provide default implementation.
6. Edit `call-stub.[ch]` and provide stub implementation.
8. Edit client-protocol and add your FOP.
9. Edit server-protocol and add your FOP.
10. Implement your FOP in any translator for which the default implementation
    is not sufficient.