From 915385553e46d65e0b91ce62066a5575b07ee44d Mon Sep 17 00:00:00 2001 From: Kaushal M Date: Mon, 1 Apr 2013 17:55:30 +0530 Subject: glusterd: Introduce volume op-versions Each volume is now associated with two op-versions, * op_version - the op-version of the highest op-versioned feature enabled * client_op_version - the op-version of the highest op-versioned feature enabled which affects the clients only. These two op-versions are generated dynamically and kept updated during runtime. Glusterd now uses the respective volumes' client-op-version during getspec requests. To achieve the above a new field in the vme table is introduced, client_option, this boolean field tells if the option is a client side option. Change-Id: I12c83b1dd29ab506026efd50d448cebbcee53c27 BUG: 907311 Signed-off-by: Kaushal M Reviewed-on: http://review.gluster.org/4584 Reviewed-by: Krishnan Parthasarathi Tested-by: Gluster Build System Reviewed-by: Vijay Bellur --- xlators/mgmt/glusterd/src/glusterd-volgen.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'xlators/mgmt/glusterd/src/glusterd-volgen.h') diff --git a/xlators/mgmt/glusterd/src/glusterd-volgen.h b/xlators/mgmt/glusterd/src/glusterd-volgen.h index 0a9647bdf..746c6e92b 100644 --- a/xlators/mgmt/glusterd/src/glusterd-volgen.h +++ b/xlators/mgmt/glusterd/src/glusterd-volgen.h @@ -99,6 +99,10 @@ struct volopt_map_entry { uint32_t op_version; char *description; vme_option_validation validate_fn; + /* If client_option is true, the option affects clients. + * this is used to calculate client-op-version of volumes + */ + gf_boolean_t client_option; }; int glusterd_create_rb_volfiles (glusterd_volinfo_t *volinfo, @@ -136,4 +140,7 @@ glusterd_check_nfs_volfile_identical (gf_boolean_t *identical); uint32_t glusterd_get_op_version_for_key (char *key); + +gf_boolean_t +gd_is_client_option (char *key); #endif -- cgit