summaryrefslogtreecommitdiffstats
path: root/libglusterfs/src/glusterfs/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-08 14:45:41 +0000
commit7964a320f380fa23727795ad6456ef0020fab35c (patch)
tree6424f8f13818a570720c3d29857e909d51e93a69 /libglusterfs/src/glusterfs/common-utils.h
parent9c441360acc7288b75ba948726d2b7bc2e3d561c (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#1684029 > Change-Id: I1508f000e8c9895588b6011b8b6cc0eda7102193 > BUG: bz#1685120 > Signed-off-by: Sanju Rakonde <srakonde@redhat.com> > (cherry picked from commit 073444b693b7a91c42963512e0fdafb57ad46670) Change-Id: I1508f000e8c9895588b6011b8b6cc0eda7102193
Diffstat (limited to 'libglusterfs/src/glusterfs/common-utils.h')
-rw-r--r--libglusterfs/src/glusterfs/common-utils.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/libglusterfs/src/glusterfs/common-utils.h b/libglusterfs/src/glusterfs/common-utils.h
index f03d2c1049a..0e2ecc73af1 100644
--- a/libglusterfs/src/glusterfs/common-utils.h
+++ b/libglusterfs/src/glusterfs/common-utils.h
@@ -833,12 +833,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 *