Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp3554763imm; Mon, 2 Jul 2018 00:57:13 -0700 (PDT) X-Google-Smtp-Source: AAOMgpeo7FxV3ZpZPlVGXdsLuQgLO2mkM5xmQ/XKLYjPjG/lVhlaUL2YypeKA1OBRfCua6gLNMMM X-Received: by 2002:aa7:818b:: with SMTP id g11-v6mr24304841pfi.50.1530518233303; Mon, 02 Jul 2018 00:57:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530518233; cv=none; d=google.com; s=arc-20160816; b=GLsmWijbSo5qrtiLGbceZPR9PaueZkugriqLkw+hh/MlVV3JIe+0Z2RupJiB9Dwvw6 zaaECv+IZWF9+VKujIpVUzsHdUdhBOWzVLum3FpRlNSv1FyeGXnN+Tk9T7O9sUukXXQy 5gLwJyfWon5qP1QMmrEpAo19SMxFQnqoPrHlHwlZKdiUoiVy/X3/Iy9B8/yCZuZDO7Nm dkiYq8QpPhFf3qLsrE1xEQcR/Mra8Ln50778ZfeB+eph3F5BYfAdV7UOLJXjXJYS+nNF o/onSGaBGLm2/27ar8FIDGlBiEhTzxSr+EP+gmbM+hObadeMvK3nsZjZYWQBmwUxqXJw ozcA== 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=Wu9sl/IouQ6yl69xXfV0m7jWpCAIaEQICd4/22wARwc=; b=Lai3XcO5oZMmAGH9Ois2HXdR3+Evz7BnkNsuKGHp7UN07aLEXlQGAeQleTsjMDtHZL +z54GqCz+WhRvQFFKR1UX8ZWab0o8rlXzQ3PQXiuZFPJoztSqY55QLBo6lAkmiYCs6FN zZLlKWgBIi9mjkviDV49KasUIGqMTiOPsAvJHcVgvKqEhX2C4GQX2CfPelLYVzG4yxzT JvCZyWUV0Z3ZIDSEDjCfRUh1UmqwPE11HeRe1glIuuHoU0v50R5Y4umRiz1Lwc6I8num 1VF8zgkYcd1Pcamt301X6w6D2+2ECudgRkbOUlB2/sv2DArL7eqcYsyZkX7lqfEryXwV SJWQ== 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 u19-v6si347038pgk.100.2018.07.02.00.56.59; Mon, 02 Jul 2018 00:57:13 -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 S933436AbeGBH4T (ORCPT + 99 others); Mon, 2 Jul 2018 03:56:19 -0400 Received: from lithops.sigma-star.at ([195.201.40.130]:43338 "EHLO lithops.sigma-star.at" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932988AbeGBH4R (ORCPT ); Mon, 2 Jul 2018 03:56:17 -0400 Received: from localhost (localhost [127.0.0.1]) by lithops.sigma-star.at (Postfix) with ESMTP id 8E1D660A04AC; Mon, 2 Jul 2018 09:56:15 +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 AD2_qy6G_05v; Mon, 2 Jul 2018 09:56:15 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by lithops.sigma-star.at (Postfix) with ESMTP id 4ED4760A04A9; Mon, 2 Jul 2018 09:56:15 +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 3fhyr-REtMcQ; Mon, 2 Jul 2018 09:56:15 +0200 (CEST) Received: from blindfold.localnet (unknown [82.150.214.1]) by lithops.sigma-star.at (Postfix) with ESMTPSA id 2AF36609332A; Mon, 2 Jul 2018 09:56:15 +0200 (CEST) From: Richard Weinberger To: Boris Brezillon Cc: Artem Bityutskiy , Quentin Schulz , dwmw2@infradead.org, computersforpeace@gmail.com, marek.vasut@gmail.com, linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org, thomas.petazzoni@bootlin.com Subject: Re: [PATCH v3 1/2] ubi: provide a way to skip CRC checks Date: Mon, 02 Jul 2018 09:56:14 +0200 Message-ID: <1767453.cfoEQ8yxZA@blindfold> In-Reply-To: <20180702095121.67bc61ef@bbrezillon> References: <1530516625.469.82.camel@gmail.com> <20180702095121.67bc61ef@bbrezillon> 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 Am Montag, 2. Juli 2018, 09:51:21 CEST schrieb Boris Brezillon: > Hi Artem, > > On Mon, 02 Jul 2018 10:30:25 +0300 > Artem Bityutskiy wrote: > > > Hi, > > > > On Thu, 2018-06-28 at 09:40 +0200, Quentin Schulz wrote: > > > diff --git a/drivers/mtd/ubi/kapi.c b/drivers/mtd/ubi/kapi.c > > > index d4b2e87..e9e9ecb 100644 > > > --- a/drivers/mtd/ubi/kapi.c > > > +++ b/drivers/mtd/ubi/kapi.c > > > @@ -202,7 +202,7 @@ struct ubi_volume_desc *ubi_open_volume(int ubi_num, int vol_id, int mode) > > > desc->mode = mode; > > > > > > mutex_lock(&ubi->ckvol_mutex); > > > - if (!vol->checked) { > > > + if (!vol->checked && !vol->skip_check) { > > > /* This is the first open - check the volume */ > > > err = ubi_check_volume(ubi, vol_id); > > > if (err < 0) { > > > > Did you deliberately did not add a similar check to 'vol_cdev_write()' ? > > You want to skip checking on load but do have the checking after volume update ? > > Yep, it's on purpose, I asked Quentin to keep the test on the update > volume path. > > > Looks a bit inconsistent to me. At the very least deserves a comment in > > 'vol_cdev_write()' about why 'skip_check' flag is ignored there. > > Well, I thought checking the CRC just after updating the volume made > sense, just to make sure things were written correctly on the medium. > Let's add a comment explaining why we keep the check here, unless you > see a strong reason to get rid of this check in the update path. +1 I also vote for keeping the check. vol->skip_check is really just "skip the check upon volume open". Thanks, //richard