Bug 1208124

Summary: BitRot :- checksum value stored in xattr is different than actual value for some file (checksum is truncated if it has terminating character as part of checksum itself)
Product: [Community] GlusterFS Reporter: Rachana Patel <racpatel>
Component: bitrotAssignee: Venky Shankar <vshankar>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: high Docs Contact: bugs <bugs>
Priority: medium    
Version: mainlineCC: atumball, bugs, smohan
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: glusterfs-3.8.0 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1224222 (view as bug list) Environment:
Last Closed: 2019-05-11 11:34:48 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1186580    

Description Rachana Patel 2015-04-01 12:56:46 UTC
Description of problem:
=======================
If checksum value has terminating character in checksum value, it truncates remaining part before storing in xattr. Hence checksum value is different then stored value


Version-Release number of selected component (if applicable):
=============================================================
0.803.gitf64666f.el6.x86_64

How reproducible:
=================
always

Steps to Reproduce:
===================
1. create and mount volume.
2. enable bitrot
3. create few files.
4. verify the checksum for each file

[root@rhs-client44 ~]# sha256sum /pavanbrick7/r1/rhs-client37.lab.eng.blr.redhat.com/linux-3.19/arch/alpha/include/asm/cache.h
439634a7ce7919c5b05afe05495219a3cbbcf5ced2c45f003c1db8d37a08cbd3  /pavanbrick7/r1/rhs-client37.lab.eng.blr.redhat.com/linux-3.19/arch/alpha/include/asm/cache.h
[root@rhs-client44 ~]# getfattr -d -m . -e hex /pavanbrick7/r1/rhs-client37.lab.eng.blr.redhat.com/linux-3.19/arch/alpha/include/asm/cache.h
getfattr: Removing leading '/' from absolute path names
# file: pavanbrick7/r1/rhs-client37.lab.eng.blr.redhat.com/linux-3.19/arch/alpha/include/asm/cache.h
trusted.gfid=0x3e6e212be7fa4e83861ac4224b008c16
trusted.glusterfs.bit-rot.signature=0x01000000000000000100000000000000439634a7ce7919c5b05afe05495219a3cbbcf5ced2c45f
trusted.glusterfs.bit-rot.version=0x0100000000000000551a6a04000b30ee


checksum has - 00 so remaing part (3c1db8d37a08cbd3) is truncated in trusted.glusterfs.bit-rot.signature


Actual Result:-
===============
checksum mismatch

Comment 1 Venky Shankar 2015-04-10 10:07:31 UTC
Patch[1] contains fixes for this bug which is already merged, hence moving bug to MODIFIED.

[1]: http://review.gluster.org/10118