diff options
| author | Raghavendra Bhat <raghavendrabhat@gluster.com> | 2011-04-13 00:18:17 +0000 | 
|---|---|---|
| committer | Anand Avati <avati@gluster.com> | 2011-05-31 22:52:16 -0700 | 
| commit | 40b4e44049e37d987cd5329cd6a854f894a8a1cf (patch) | |
| tree | 81640f046ce89ffe98c5b7b3d0d878aa46283612 /xlators/cluster | |
| parent | 105cc9a772e524cbe1729c868cb4748187342e9f (diff) | |
cluster/afr: declare favorite_child as int instead of unsigned int
In afr_private_t structure favorite child is declared as unsigned int.
In init function of afr we set favorite child to -1, if that option is
not found in volfile. But favorite child value will be set to a huge
value instead of -1 since it is an unsigned int and in statedump file
favorite child value is displayed as a huge value instead of -1.
Signed-off-by: Raghavendra Bhat <raghavendrabhat@gluster.com>
Signed-off-by: Anand Avati <avati@gluster.com>
BUG: 2668 ([glusterfs-3.2.9qa7]: createbench error)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2668
Diffstat (limited to 'xlators/cluster')
| -rw-r--r-- | xlators/cluster/afr/src/afr-common.c | 2 | ||||
| -rw-r--r-- | xlators/cluster/afr/src/afr.h | 2 | 
2 files changed, 2 insertions, 2 deletions
diff --git a/xlators/cluster/afr/src/afr-common.c b/xlators/cluster/afr/src/afr-common.c index ce1eb60cde5..3d0ffb1d89e 100644 --- a/xlators/cluster/afr/src/afr-common.c +++ b/xlators/cluster/afr/src/afr-common.c @@ -2466,7 +2466,7 @@ afr_priv_dump (xlator_t *this)          gf_proc_dump_build_key(key, key_prefix, "read_child");          gf_proc_dump_write(key, "%d", priv->read_child);          gf_proc_dump_build_key(key, key_prefix, "favorite_child"); -        gf_proc_dump_write(key, "%u", priv->favorite_child); +        gf_proc_dump_write(key, "%d", priv->favorite_child);          gf_proc_dump_build_key(key, key_prefix, "data_lock_server_count");          gf_proc_dump_write(key, "%u", priv->data_lock_server_count);          gf_proc_dump_build_key(key, key_prefix, "metadata_lock_server_count"); diff --git a/xlators/cluster/afr/src/afr.h b/xlators/cluster/afr/src/afr.h index 6af96f9db18..7bd24e0ac6e 100644 --- a/xlators/cluster/afr/src/afr.h +++ b/xlators/cluster/afr/src/afr.h @@ -68,7 +68,7 @@ typedef struct _afr_private {  	gf_boolean_t entry_change_log;      /* on/off */  	int read_child;               /* read-subvolume */ -	unsigned int favorite_child;  /* subvolume to be preferred in resolving +	int favorite_child;  /* subvolume to be preferred in resolving  					 split-brain cases */  	unsigned int data_lock_server_count;  | 
