diff options
| author | Susant Palai <spalai@redhat.com> | 2018-05-03 17:41:16 +0530 |
|---|---|---|
| committer | Amar Tumballi <amarts@redhat.com> | 2018-05-22 07:48:38 +0000 |
| commit | 3ec6ae1c1fb103df077f44b18604e768fea00ddc (patch) | |
| tree | 77a4bea667cf50bbb751348016fe5d730a7aeac7 /xlators/features/cloudsync/src/cloudsync.h | |
| parent | 985a1d15db910e012ddc1dcdc2e333cc28a9968b (diff) | |
features/cloudsync: Make plugins configurable
This patch brings the configuration option for plugins.
For new plugins, an entry has to be created in to cs_plugin structure e.g.
struct cs_plugin plugins[] = {
{
.name = "amazons3",
.library = "libamazons3.so",
.description = "amazon s3 store."
},
{.name = NULL},
};
Library field describes the name of the shared library for the plugin.
To configure plugin type "feature.cloudsync-storetype" option need
to be set to the remote-store type. e.g.
gluster volume set VOLNAME cloudsync-storetype amazons3. This should be same
as the ".name" field in cs_plugin structure.
cs_init will pick this up in run time to load the plugin.
Change-Id: I2cec10b206f71ac4e71d472631a3a5badf278b59
fixes: bz#1576842
Signed-off-by: Susant Palai <spalai@redhat.com>
Diffstat (limited to 'xlators/features/cloudsync/src/cloudsync.h')
| -rw-r--r-- | xlators/features/cloudsync/src/cloudsync.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/xlators/features/cloudsync/src/cloudsync.h b/xlators/features/cloudsync/src/cloudsync.h index bd54d760864..18840a6523d 100644 --- a/xlators/features/cloudsync/src/cloudsync.h +++ b/xlators/features/cloudsync/src/cloudsync.h @@ -34,6 +34,12 @@ typedef struct cs_inode_ctx { gf_cs_obj_state state; } cs_inode_ctx_t; +struct cs_plugin { + char *name; /* store name */ + char *library; /* library to load for the given store */ + char *description; /* description about the store */ +}; + cs_local_t * cs_local_init (xlator_t *this, call_frame_t *frame, loc_t *loc, fd_t *fd, glusterfs_fop_t fop); |
