diff options
author | Anand Avati <avati@redhat.com> | 2014-03-26 10:59:27 -0700 |
---|---|---|
committer | Anand Avati <avati@redhat.com> | 2014-04-20 18:06:57 -0700 |
commit | a67630b3970f9ad035a1d1463d9c2a6c6e7de736 (patch) | |
tree | 2e7dc713df74627bd9b508cc511dfcbbb8eccf76 /libglusterfs | |
parent | 99d86b1a1afe62c06f7aa2e3d6bb68df7762ce48 (diff) |
defaults: add new symbol default_fops
with members filled with pointers to appropriate default methods
Change-Id: I6cdc43e4f6776e2ad45cd5cbca5642e0c639ffde
BUG: 1089216
Signed-off-by: Anand Avati <avati@redhat.com>
Reviewed-on: http://review.gluster.org/7504
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
Diffstat (limited to 'libglusterfs')
-rw-r--r-- | libglusterfs/src/defaults.c | 51 | ||||
-rw-r--r-- | libglusterfs/src/defaults.h | 2 |
2 files changed, 53 insertions, 0 deletions
diff --git a/libglusterfs/src/defaults.c b/libglusterfs/src/defaults.c index 8a1c281a5e0..599f9477dca 100644 --- a/libglusterfs/src/defaults.c +++ b/libglusterfs/src/defaults.c @@ -2200,6 +2200,57 @@ default_getspec (call_frame_t *frame, xlator_t *this, const char *key, return 0; } + +struct xlator_fops _default_fops = { + .create = default_create, + .open = default_open, + .stat = default_stat, + .readlink = default_readlink, + .mknod = default_mknod, + .mkdir = default_mkdir, + .unlink = default_unlink, + .rmdir = default_rmdir, + .symlink = default_symlink, + .rename = default_rename, + .link = default_link, + .truncate = default_truncate, + .readv = default_readv, + .writev = default_writev, + .statfs = default_statfs, + .flush = default_flush, + .fsync = default_fsync, + .setxattr = default_setxattr, + .getxattr = default_getxattr, + .fsetxattr = default_fsetxattr, + .fgetxattr = default_fgetxattr, + .removexattr = default_removexattr, + .fremovexattr = default_fremovexattr, + .opendir = default_opendir, + .readdir = default_readdir, + .readdirp = default_readdirp, + .fsyncdir = default_fsyncdir, + .access = default_access, + .ftruncate = default_ftruncate, + .fstat = default_fstat, + .lk = default_lk, + .inodelk = default_inodelk, + .finodelk = default_finodelk, + .entrylk = default_entrylk, + .fentrylk = default_fentrylk, + .lookup = default_lookup, + .rchecksum = default_rchecksum, + .xattrop = default_xattrop, + .fxattrop = default_fxattrop, + .setattr = default_setattr, + .fsetattr = default_fsetattr, + .fallocate = default_fallocate, + .discard = default_discard, + .zerofill = default_zerofill, + + .getspec = default_getspec, +}; +struct xlator_fops *default_fops = &_default_fops; + /* notify */ int default_notify (xlator_t *this, int32_t event, void *data, ...) diff --git a/libglusterfs/src/defaults.h b/libglusterfs/src/defaults.h index 1b33e809900..9bd5eb842ad 100644 --- a/libglusterfs/src/defaults.h +++ b/libglusterfs/src/defaults.h @@ -34,6 +34,8 @@ int32_t default_release (xlator_t *this, fd_t *fd); int32_t default_releasedir (xlator_t *this, fd_t *fd); +extern struct xlator_fops *default_fops; + /* Management Operations */ int32_t default_getspec (call_frame_t *frame, |