Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp3111804imm; Sun, 1 Jul 2018 12:36:55 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJODmCQ6Xq7q0lz4vsoP26goK+/WRTKoMiMaDk0sSWkng1/ZaRH8TzlQmTN5MgkdrwoAz64 X-Received: by 2002:a65:468e:: with SMTP id h14-v6mr18718961pgr.89.1530473815786; Sun, 01 Jul 2018 12:36:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530473815; cv=none; d=google.com; s=arc-20160816; b=PjISspA9Kj3MktL0aV0ttcWHfX6/7CtmKIOK5fzQY7XGUs3pILw2LMPM2IfSkRebf/ 7YYqYaYxIMi0BlAtBB/breuxbpEurM2jld9eUjMeX+qgnB89w6vYaSHXDeieqekjOJq3 naSAegIFMenxggcYMiWUxa0vmbpihCwGWhL8E8upt4NW1NS0mZ6rnwbKy0yFX8/Vntd+ lR9EkIasgNeMzq30L4XWANm0Y2XrNbVCpvxMprVWvffV8UQxD1ElbgO0xbb7PPttJT29 SIvAG4iNaHPyj7kOdwIhAk76llafclO4SH2SOUdnX16K1/6fSUDkLkw6sOZknOf2en0q +3Hg== 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:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=6kDQtyos4bzj3kOuavo4OgxihmDb6Ze9IP7FpR0YqNA=; b=mmYNwyqTGUbjjLPxZhgzZyaDhr5y6fraVfkqp7VsoV8a1lpQoI4McNuO7Py+qIKrhd IF/4BGUzPBXhBQi+cnfm0DBBjoC43Oes7UGQiHr9rw1A1WA2cMDK0D7qFvxL70b3SWzY 1/Hn9GgpoxG+s24rBWsSQR25Cyr3iIe8Nwz8LcAz/khWPb4aM+0OMQSjtTM2bWuSNafl rYniPnxmFAjnzJH/rQsBnTtT2fl3q7oKX2yics9m2xdc7AoOanHf8wNQ4kYWQa6P+Lyn Tkcg5ELY/aePCcxlV6CbhpkRTl/4mVGyqL70PO2tsAG/UoiuWuFzRUKyQ3Jro0XagkUE f16A== 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 w21-v6si14258049plp.199.2018.07.01.12.36.40; Sun, 01 Jul 2018 12:36:55 -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 S1752542AbeGATgA (ORCPT + 99 others); Sun, 1 Jul 2018 15:36:00 -0400 Received: from lithops.sigma-star.at ([195.201.40.130]:33598 "EHLO lithops.sigma-star.at" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752424AbeGATf7 (ORCPT ); Sun, 1 Jul 2018 15:35:59 -0400 Received: from localhost (localhost [127.0.0.1]) by lithops.sigma-star.at (Postfix) with ESMTP id 54DAC6093333; Sun, 1 Jul 2018 21:35:58 +0200 (CEST) Received: from lithops.sigma-star.at ([127.0.0.1]) by localhost (lithops.sigma-star.at [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id GFQiw1_grtna; Sun, 1 Jul 2018 21:35:58 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by lithops.sigma-star.at (Postfix) with ESMTP id 11DCF6093334; Sun, 1 Jul 2018 21:35:58 +0200 (CEST) Received: from lithops.sigma-star.at ([127.0.0.1]) by localhost (lithops.sigma-star.at [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id FdaRdrYuih0s; Sun, 1 Jul 2018 21:35:58 +0200 (CEST) Received: from blindfold.localnet (213-47-184-186.cable.dynamic.surfer.at [213.47.184.186]) by lithops.sigma-star.at (Postfix) with ESMTPSA id E37386093322; Sun, 1 Jul 2018 21:35:57 +0200 (CEST) From: Richard Weinberger To: Quentin Schulz Cc: dedekind1@gmail.com, dwmw2@infradead.org, computersforpeace@gmail.com, boris.brezillon@bootlin.com, marek.vasut@gmail.com, linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org, thomas.petazzoni@bootlin.com Subject: Re: [PATCH v3 2/2] ubi: expose the volume CRC check skip flag Date: Sun, 01 Jul 2018 21:35:57 +0200 Message-ID: <382648641.QZzOm4Mo72@blindfold> In-Reply-To: <0ace6202bddb495ae0e632ae2fd0346f99fcdab4.1530169759.git-series.quentin.schulz@bootlin.com> References: <0ace6202bddb495ae0e632ae2fd0346f99fcdab4.1530169759.git-series.quentin.schulz@bootlin.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Quentin, Am Donnerstag, 28. Juni 2018, 09:40:53 CEST schrieb Quentin Schulz: > Now that we have the logic for skipping CRC check for static UBI volumes > in the core, let's expose it to users. > > This makes use of a padding byte in the volume description data > structure as a flag. This flag only tell for now whether we should skip > the CRC check of a volume. > > This checks the UBI volume for which we are trying to skip the CRC check > is static. > > Suggested-by: Boris Brezillon > Signed-off-by: Quentin Schulz > Reviewed-by: Boris Brezillon > --- > drivers/mtd/ubi/cdev.c | 4 ++++ > drivers/mtd/ubi/vmt.c | 3 +++ > include/uapi/mtd/ubi-user.h | 16 ++++++++++++++-- > 3 files changed, 21 insertions(+), 2 deletions(-) > > diff --git a/drivers/mtd/ubi/cdev.c b/drivers/mtd/ubi/cdev.c > index 45c3296..3eea1df 100644 > --- a/drivers/mtd/ubi/cdev.c > +++ b/drivers/mtd/ubi/cdev.c > @@ -622,6 +622,10 @@ static int verify_mkvol_req(const struct ubi_device *ubi, > req->vol_type != UBI_STATIC_VOLUME) > goto bad; > > + if (req->flags & UBI_VOL_SKIP_CRC_CHECK_FLG && > + req->vol_type != UBI_STATIC_VOLUME) > + goto bad; We should also reject unknown flags here. Thanks, //richard