summaryrefslogtreecommitdiffstats
path: root/libglusterfs/src/common-utils.h
diff options
context:
space:
mode:
authorSanju Rakonde <srakonde@redhat.com>2019-03-04 16:53:01 +0530
committerShyamsundar Ranganathan <srangana@redhat.com>2019-03-11 00:31:01 +0000
commita00953ed212a7071b152c4afccd35b92fa5a682a (patch)
tree9f4c970bb3cf736000d4c34159b9980e1dc6c5fe /libglusterfs/src/common-utils.h
parent8fb4631c65f28dd0a5e0304386efff3c807e64a4 (diff)
core: make compute_cksum function op_version compatible
Problem: commit 5a152a changed the mechansim of computing the checksum. In heterogeneous cluster, peers are running into rejected state because we have different cksum computation mechansims in upgraded and non-upgraded nodes. Solution: add a check for op-version so that all the nodes in the cluster follow the same mechanism for computing the cksum. fixes: bz#1684569 > Change-Id: I1508f000e8c9895588b6011b8b6cc0eda7102193 > BUG: bz#1685120 > Signed-off-by: Sanju Rakonde <srakonde@redhat.com> Change-Id: I1508f000e8c9895588b6011b8b6cc0eda7102193 Signed-off-by: Sanju Rakonde <srakonde@redhat.com>
Diffstat (limited to 'libglusterfs/src/common-utils.h')
-rw-r--r--libglusterfs/src/common-utils.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/libglusterfs/src/common-utils.h b/libglusterfs/src/common-utils.h
index 6a6fd8c9893..f623e770cc7 100644
--- a/libglusterfs/src/common-utils.h
+++ b/libglusterfs/src/common-utils.h
@@ -830,12 +830,12 @@ int
gf_unlockfd(int fd);
int
-get_checksum_for_file(int fd, uint32_t *checksum);
+get_checksum_for_file(int fd, uint32_t *checksum, int op_version);
int
log_base2(unsigned long x);
int
-get_checksum_for_path(char *path, uint32_t *checksum);
+get_checksum_for_path(char *path, uint32_t *checksum, int op_version);
int
get_file_mtime(const char *path, time_t *stamp);
char *