Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp3135018imm; Mon, 16 Jul 2018 22:47:37 -0700 (PDT) X-Google-Smtp-Source: AAOMgpe2Kk4L6vMQycCc82rU4g13PbBnNbymesmLcdO2/jdUBFbC8GxSzjQWebRivnq90USQuN0f X-Received: by 2002:a65:64d7:: with SMTP id t23-v6mr211474pgv.207.1531806457372; Mon, 16 Jul 2018 22:47:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531806457; cv=none; d=google.com; s=arc-20160816; b=bB/mRzNSks6IFqe9jDRR+Z59+ihRd5VA9aE2qMjZkUuxNkNsP+lOii0mtfFkfonAfH FwwWAk0T6KBV4GzjCE9Gxl42OfFmzT0fhpqfwKiqgcuKkZB1Puy8MzEEfb0eGWEFUNhY 9s7PiWCXJ3TMFZCTIRUSDEsJVSQWthX7O6J0UypMvXYO7h+zU8GBwC8csxuttjdepO+m d1PNBD9oGwYsYyyxqJvFsYuqjZo5v3kKi5MHyu+7vTlbP8qzeODtyhm0m6Egzm5sC56l u2epMhn16gTRK28HyqIwJyr6yjLTErBUohVMQ+fr3IGby/cMn4qTJlI6orFwOUUbOdSt GTDg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:arc-authentication-results; bh=bFFcqEYFtjDAowu5jIrG+eVDhzdasHORlzZp2dcXOI8=; b=H1onKa4me8UpzPdTnNbrFhaWQMG7elyehYGc5ADC0NEnFpKwsZxYGA/xOX45WA08YM n/yDBU760Jh+XzpxDWBPiNcD7rr4ekX1XtY8XDq4kkTFUonIuKJK7dkiMkvoT3uL0uIg uwJ4cNTqdR8UF+EjnAk6URbGQWdDpPd9PzayFi9ROkgVLsfFk7SBqscgfaKgOJp3OP9l eINIIA8RIgONUnokHu5sEdxqkbV2o62Q2B4L6gt8ciKHt98ycfX+eeskzelbRV0XJxWz GaIago+qSKCNU90nt64mkSG1gtQaS8pqqjbKLuGfSNYf7Cwx/RhIwXmY86TtFi+MGzxV LK3g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w13-v6si99053plp.51.2018.07.16.22.47.22; Mon, 16 Jul 2018 22:47:37 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727629AbeGQGRk (ORCPT + 99 others); Tue, 17 Jul 2018 02:17:40 -0400 Received: from mx2.suse.de ([195.135.220.15]:42852 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727096AbeGQGRk (ORCPT ); Tue, 17 Jul 2018 02:17:40 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 67761AD93; Tue, 17 Jul 2018 05:46:48 +0000 (UTC) Subject: Re: [PATCH 0/4] add crc64 calculation as kernel library To: Coly Li , linux-kernel@vger.kernel.org Cc: linux-bcache@vger.kernel.org, linux-block@vger.kernel.org, Andy Shevchenko , Greg Kroah-Hartman , "Luis R . Rodriguez" , Linus Torvalds , Thomas Gleixner , Michael Lyle , Kent Overstreet , Kate Stewart References: <20180716165507.23100-1-colyli@suse.de> From: Hannes Reinecke Message-ID: <8538b45b-bf30-926a-50fb-700b4bf1c636@suse.de> Date: Tue, 17 Jul 2018 07:46:46 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20180716165507.23100-1-colyli@suse.de> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 07/16/2018 06:55 PM, Coly Li wrote: > This patch set adds basic implementation of crc64 calculation as Linux > kernel library. Since bcache already does crc64 by itself, this patch > set also modifies bcache code to use the new crc64 library routine. > > bcache uses crc64 as storage checksum, if a change of crc lib routines > results an inconsistent result, the unmatched checksum may make bcache > 'think' the on-disk is corrupted, such change should be avoided or > detected as early as possible. Therefore the last patch in this series > adds a crc test framework, to check consistency of different calculations. > > Coly Li > > Cc: Andy Shevchenko > Cc: Greg Kroah-Hartman > Cc: Luis R. Rodriguez > Cc: Linus Torvalds > Cc: Thomas Gleixner > Cc: Michael Lyle > Cc: Kent Overstreet > Cc: Kate Stewart > --- > Andy Shevchenko (1): > lib/crc64: add crc64 option to lib/Kconfig > > Coly Li (3): > lib: add crc64 calculation routines > bcache: use routines from lib/crc64.c for CRC64 calculation > lib/test_crc: Add test cases for crc calculation > > drivers/md/bcache/bcache.h | 7 +- > drivers/md/bcache/btree.c | 2 +- > drivers/md/bcache/request.c | 2 +- > drivers/md/bcache/super.c | 5 +- > drivers/md/bcache/util.c | 131 ---------------------------------- > drivers/md/bcache/util.h | 5 +- > include/linux/crc64.h | 15 ++++ > lib/.gitignore | 2 + > lib/Kconfig | 8 +++ > lib/Kconfig.debug | 11 +++ > lib/Makefile | 12 ++++ > lib/crc64.c | 71 +++++++++++++++++++ > lib/gen_crc64table.c | 76 ++++++++++++++++++++ > lib/test_crc.c | 136 ++++++++++++++++++++++++++++++++++++ > 14 files changed, 341 insertions(+), 142 deletions(-) > create mode 100644 include/linux/crc64.h > create mode 100644 lib/crc64.c > create mode 100644 lib/gen_crc64table.c > create mode 100644 lib/test_crc.c > Actually, I would merge patch 1 & 2 together (pointless to introduce an option for which no code exists). Otherwise for the whole series: Reviewed-by: Hannes Reinecke Cheers, Hannes -- Dr. Hannes Reinecke Teamlead Storage & Networking hare@suse.de +49 911 74053 688 SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton HRB 21284 (AG Nürnberg)