Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp3553094imm; Mon, 2 Jul 2018 00:54:18 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJ4kowQnWDrkgajcAXuQplfjMog3ivTv+iGAcwvo8WQ7vvvgfpiPhcYKP+Vrj7Wb5dJymT9 X-Received: by 2002:a63:7703:: with SMTP id s3-v6mr21161049pgc.339.1530518058067; Mon, 02 Jul 2018 00:54:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530518058; cv=none; d=google.com; s=arc-20160816; b=rOvyE2NbH1xXZOzAvWb1TAvq+kobZhmQ/uYzbSP//az/ApnzcplgKoBE/cyRlxq4N/ sw0JB0/Muk1fQAAogZZHkwQMwrMspBVs6V5Csr14z/oB1yYU4svt8FK4QA8hMf3LYc96 ThFKbiHlVBx9jxRkAOcFd+hZ+fs7uDy/tMMb+DVEf4DMXnyrT8dxxGU/8Ij/E0sh6THf KOUqZsGzCleXSoJ9JfzDhaVtXdirxOB2Hofudxten2/UemAmfQ55Ou2gwY+qkvtpq8W/ 7oawSpT7CHYpmtelsxOWr8XUaeybMJahfjZU27NTw+IBZliQMNxJy+olotiaDoUk3+Wt SKHA== 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:subject:cc:to:from:date :arc-authentication-results; bh=NJZVUkHTQHXMp8WPs9nP+KW/nxl6oTe9naCurFNZAPY=; b=azbFJn0uT2xYebvnMUmKXiINZ0MKsL6/rgPPiiOx2FCGmSTWLPWYT3Iq37bQL+QMqu TiR36Rjp0KdB7ieg8N+LPHyNYpLTSDOHkHmLnlUpoM+yYXefC6cmQSXw2VVekdHHSumd XePqI61ldUh9P/c237ksT+/DHSzSGo13YebEd3rTiok+b9j6KwYcqYctu2a+H9bSNDxZ 1uKlTaG8oM7GbjhpZC3ux3xFEfUx2Tuhb5gEjXLXvkLbYEuiL0mlAacuP46I2y+yOSSK NqkqbotpfhXYxi4ECCQ9aeD+LDdeb8XRSh89X8rojEy8RPnfAyctCWd+tWNWB+HQyejA Y2ug== 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.54.03; Mon, 02 Jul 2018 00:54:18 -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 S933453AbeGBHvh (ORCPT + 99 others); Mon, 2 Jul 2018 03:51:37 -0400 Received: from mail.bootlin.com ([62.4.15.54]:47832 "EHLO mail.bootlin.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753698AbeGBHvd (ORCPT ); Mon, 2 Jul 2018 03:51:33 -0400 Received: by mail.bootlin.com (Postfix, from userid 110) id 7B516208B3; Mon, 2 Jul 2018 09:51:31 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail.bootlin.com X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT shortcircuit=ham autolearn=disabled version=3.4.0 Received: from bbrezillon (AAubervilliers-681-1-87-188.w90-88.abo.wanadoo.fr [90.88.29.188]) by mail.bootlin.com (Postfix) with ESMTPSA id 33AF820703; Mon, 2 Jul 2018 09:51:21 +0200 (CEST) Date: Mon, 2 Jul 2018 09:51:21 +0200 From: Boris Brezillon To: Artem Bityutskiy Cc: Quentin Schulz , richard@nod.at, 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 Message-ID: <20180702095121.67bc61ef@bbrezillon> In-Reply-To: <1530516625.469.82.camel@gmail.com> References: <3f9cef553d4f5da3fe2d76113d79ada1f0fe5224.1530169759.git-series.quentin.schulz@bootlin.com> <1530516625.469.82.camel@gmail.com> X-Mailer: Claws Mail 3.15.0-dirty (GTK+ 2.24.31; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. Regards, Boris