From c2b7b82ef49212c5f52a08b0503e4b31de43b2dd Mon Sep 17 00:00:00 2001 From: Harshavardhana Date: Thu, 4 Oct 2018 10:16:38 -0700 Subject: [PATCH] Verify bitrot in ReadFile correctly when verifier is set (#6563) This is a major regression introduced in this commit ce02ab613d21bd777eeb35386d0eb6676c2499a2 is the first bad commit commit ce02ab613d21bd777eeb35386d0eb6676c2499a2 Author: Krishna Srinivas <634494+krishnasrinivas@users.noreply.github.com> Date: Mon Aug 6 15:14:08 2018 -0700 Simplify erasure code by separating bitrot from erasure code (#5959) :040000 040000 794f58d82abb62bc02439e0118dc32825a45d255 d2201ebfc8df0b0f1d15347d50e9360541ddd7c9 M cmd This effects all distributed server deployments since this commit All the following releases are affected - RELEASE.2018-09-25T21-34-43Z - RELEASE.2018-09-12T18-49-56Z - RELEASE.2018-09-11T01-39-21Z - RELEASE.2018-09-01T00-38-25Z - RELEASE.2018-08-25T01-56-38Z - RELEASE.2018-08-21T00-37-20Z - RELEASE.2018-08-18T03-49-57Z Thanks to Anis for reproducing the issue --- cmd/storage-rpc-client.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/storage-rpc-client.go b/cmd/storage-rpc-client.go index 16076ca6d..bada5f8b7 100644 --- a/cmd/storage-rpc-client.go +++ b/cmd/storage-rpc-client.go @@ -242,7 +242,7 @@ func (client *StorageRPCClient) ReadFile(volume string, path string, offset int6 Path: path, Offset: offset, Length: int64(len(buffer)), - Verified: true, // mark read as verified by default + Verified: verifier == nil, // Marked accordingly if verifier is set or not. } if verifier != nil { args.Algo = verifier.algorithm