diff options
author | Sanju Rakonde <srakonde@redhat.com> | 2019-03-04 16:53:01 +0530 |
---|---|---|
committer | Amar Tumballi <amarts@redhat.com> | 2019-03-07 05:01:04 +0000 |
commit | 073444b693b7a91c42963512e0fdafb57ad46670 (patch) | |
tree | d5f31d17d52c695502f71a62999ff432b81c8105 /libglusterfs/src/glusterfs/common-utils.h | |
parent | 27f6375df009c8c4798b72aeafce79456007d21f (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.
Change-Id: I1508f000e8c9895588b6011b8b6cc0eda7102193
fixes: bz#1685120
Signed-off-by: Sanju Rakonde <srakonde@redhat.com>
Diffstat (limited to 'libglusterfs/src/glusterfs/common-utils.h')
-rw-r--r-- | libglusterfs/src/glusterfs/common-utils.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libglusterfs/src/glusterfs/common-utils.h b/libglusterfs/src/glusterfs/common-utils.h index 1418c6531c7..0140f7b9fd5 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 * |