summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnand Avati <avati@redhat.com>2014-03-26 10:59:27 -0700
committerAnand Avati <avati@redhat.com>2014-04-20 18:06:57 -0700
commita67630b3970f9ad035a1d1463d9c2a6c6e7de736 (patch)
tree2e7dc713df74627bd9b508cc511dfcbbb8eccf76
parent99d86b1a1afe62c06f7aa2e3d6bb68df7762ce48 (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>
-rw-r--r--libglusterfs/src/defaults.c51
-rw-r--r--libglusterfs/src/defaults.h2
2 files changed, 53 insertions, 0 deletions
diff --git a/libglusterfs/src/defaults.c b/libglusterfs/src/defaults.c
index 8a1c281..599f947 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 1b33e80..9bd5eb8 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,