diff options
| author | Gaurav <gaurav@gluster.com> | 2011-03-23 00:50:17 +0000 | 
|---|---|---|
| committer | Vijay Bellur <vijay@dev.gluster.com> | 2011-03-23 04:55:29 -0700 | 
| commit | 9bd4f25b6b0ea8103324b685fcc21525a29849a8 (patch) | |
| tree | 7b0e0b875934521dea0c6fdd3412ac61972a527e /libglusterfs/src/xlator.h | |
| parent | 6f6c817314a2a867be996c2ad6d9a1337617ded4 (diff) | |
CLI : Validate options farmework.
Signed-off-by: Gaurav <gaurav@gluster.com>
Signed-off-by: Vijay Bellur <vijay@dev.gluster.com>
BUG: 2064 (NFS options are removed upon glusterd restart)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2064
Diffstat (limited to 'libglusterfs/src/xlator.h')
| -rw-r--r-- | libglusterfs/src/xlator.h | 20 | 
1 files changed, 14 insertions, 6 deletions
diff --git a/libglusterfs/src/xlator.h b/libglusterfs/src/xlator.h index 604c8c08f32..e587ae5784d 100644 --- a/libglusterfs/src/xlator.h +++ b/libglusterfs/src/xlator.h @@ -771,8 +771,8 @@ typedef struct volume_options {          char                *key[ZR_VOLUME_MAX_NUM_KEY];          /* different key, same meaning */          volume_option_type_t type; -        int64_t              min;  /* -1 means no range */ -        int64_t              max;  /* -1 means no range */ +        int64_t              min;  /* 0 means no range */ +        int64_t              max;  /* 0 means no range */          char                *value[ZR_OPTION_MAX_ARRAY_SIZE];          /* If specified, will check for one of             the value from this array */ @@ -806,10 +806,9 @@ struct _xlator {          void              (*fini) (xlator_t *this);          int32_t           (*init) (xlator_t *this);          int32_t           (*reconfigure) (xlator_t *this, dict_t *options); -        int32_t           (*mem_acct_init) (xlator_t *this); -        int32_t           (*validate_options) (xlator_t *this, dict_t *options, -                                               char **op_errstr); -        event_notify_fn_t notify; +	int32_t           (*mem_acct_init) (xlator_t *this); +        int32_t           (*validate_options) (xlator_t *this, char **op_errstr); +	event_notify_fn_t notify;          gf_loglevel_t    loglevel;   /* Log level for translator */ @@ -865,5 +864,14 @@ int is_gf_log_command (xlator_t *trans, const char *name, char *value);  int xlator_validate_rec (xlator_t *xlator, char **op_errstr);  int graph_reconf_validateopt (glusterfs_graph_t *graph, char **op_errstr);  int glusterd_check_log_level (const char *value); +int validate_xlator_volume_options_attacherr (xlator_t *xl, +                                          volume_option_t *opt, +                                         char **op_errstr); +int _volume_option_value_validate_attacherr (xlator_t *xl,  +                               data_pair_t *pair,  +                               volume_option_t *opt,  +                               char **op_errstr); + +  #endif /* _XLATOR_H */  | 
