diff options
author | Kaushal M <kaushal@redhat.com> | 2013-04-30 13:03:08 +0530 |
---|---|---|
committer | Vijay Bellur <vbellur@redhat.com> | 2013-05-31 06:43:42 -0700 |
commit | 599c6b472869cfaf0058e7b169de204450a41948 (patch) | |
tree | 2c66b1022fd61b76a4e2beaa6fa30f779e767637 /xlators/mgmt/glusterd/src/glusterd-volgen.h | |
parent | 003713139c8a7830a90a40dfead72f8299c17e31 (diff) |
glusterd-volgen: Improve volume op-versions calculation
Volume op-versions calculations now take into account if an option,
a. enables/disables an xlator, or
b. is a boolean option.
This prevents op-versions from being updated when a feature is disabled.
Also, correctly close the dynamically loaded xlators in
xlator_volopt_dynload() and prevent leaks.
Change-Id: I895ddeeec6f6a33e509325f0ce6f01b7aad3cf5c
BUG: 954256
Signed-off-by: Kaushal M <kaushal@redhat.com>
Reviewed-on: http://review.gluster.org/4952
Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-volgen.h')
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-volgen.h | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-volgen.h b/xlators/mgmt/glusterd/src/glusterd-volgen.h index 746c6e92bc8..6a41f47c16c 100644 --- a/xlators/mgmt/glusterd/src/glusterd-volgen.h +++ b/xlators/mgmt/glusterd/src/glusterd-volgen.h @@ -60,7 +60,9 @@ typedef enum { typedef enum gd_volopt_flags_ { OPT_FLAG_NONE, - OPT_FLAG_FORCE = 1, + OPT_FLAG_FORCE = 0x01, // option needs force to be reset + OPT_FLAG_XLATOR_OPT = 0x02, // option enables/disables xlators + OPT_FLAG_CLIENT_OPT = 0x04, // option affects clients } gd_volopt_flags_t; typedef enum { @@ -102,7 +104,7 @@ struct volopt_map_entry { /* If client_option is true, the option affects clients. * this is used to calculate client-op-version of volumes */ - gf_boolean_t client_option; + //gf_boolean_t client_option; }; int glusterd_create_rb_volfiles (glusterd_volinfo_t *volinfo, @@ -143,4 +145,11 @@ glusterd_get_op_version_for_key (char *key); gf_boolean_t gd_is_client_option (char *key); + +gf_boolean_t +gd_is_xlator_option (char *key); + +gf_boolean_t +gd_is_boolean_option (char *key); + #endif |