Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp1457077rwb; Thu, 10 Nov 2022 16:53:23 -0800 (PST) X-Google-Smtp-Source: AMsMyM6Uqb8hR5NQ6/2VGKq3I8gQZW/ie4mW5D8N84nQolfZXZvbi0RISyZbIMItREnV73Js4ysB X-Received: by 2002:a05:6402:24a1:b0:463:f3a:32ce with SMTP id q33-20020a05640224a100b004630f3a32cemr4055683eda.366.1668128002823; Thu, 10 Nov 2022 16:53:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668128002; cv=none; d=google.com; s=arc-20160816; b=UCmGIE0OLC2MeCW/ki18NhUFtFU2Nh+Lmfv+zkDGLbPSKdbXbtOPAkfE7zQXYL14rE XteDGdkRppAFdbt5CraQFEqWY029m/IceC9XC8hBQCwKblcCve5InYPP0xAQNC370NUp Pqyr240kh0ySvPuPwVfpAIQVdr/JUZRJfJ2z9WfcyT4rrccHSq4i9C0bXypnReEUmW/B RZ8B62RaQXPTWtdxxTx5z+srCNHpEhyflpCLKpkNPYLoJWX/f5Qze8qxBtEkTeUny0Zg 8X42BHkjymEi8a2ePuLw5kR22/3rHEtTo4hkeneGQehgnHZiuMEbyh2VJ7ja5iAcS6Fn WPDQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=6XsYF5MESjOjEWnvgmhCHmsq1QpJG1ZxCPE3y8E+Vc8=; b=X1p6HYBgQm9XFzja9HSbRiAW+JoTCWsPiFXIZUrO2MDCDt7YRTDZSR/o1poYiSeGmz 4WRdtHtFcH7lt/f4SW+diifQIRy5wl/WzEclVjjOLoAzawg5e40PAx7zsVpGOher68jX hl96wY/GAOhRGkZkfBaCTvEA2aUzGl3dDwlAVplJkfcMX8nLqD8OHX5+9r1eTXZlBmEe Kk6+a59sLUXCiHIwKZMCpXpG2RRGifpzBYTr6niFHOrBGp7TTvkXsc5bjHEYNqqscGH0 2RB1AsYrncrUlVa+FqhEJTULKXxpvZHRdIECkLILKaArk2xoJBc+q1dXFkGFUadSgt36 gcjw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j18-20020aa7de92000000b00461a2654335si812775edv.425.2022.11.10.16.53.00; Thu, 10 Nov 2022 16:53:22 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229636AbiKKAjh (ORCPT + 92 others); Thu, 10 Nov 2022 19:39:37 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57630 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229558AbiKKAjg (ORCPT ); Thu, 10 Nov 2022 19:39:36 -0500 Received: from fudo.makrotopia.org (fudo.makrotopia.org [IPv6:2a07:2ec0:3002::71]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8D6C311C21; Thu, 10 Nov 2022 16:39:35 -0800 (PST) Received: from local by fudo.makrotopia.org with esmtpsa (TLS1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.94.2) (envelope-from ) id 1otI4k-0006Am-98; Fri, 11 Nov 2022 01:39:18 +0100 Date: Fri, 11 Nov 2022 00:39:15 +0000 From: Daniel Golle To: Richard Weinberger Cc: Jens Axboe , Miquel Raynal , Vignesh Raghavendra , Davidlohr Bueso , Matthew Wilcox , "Martin K. Petersen" , Chaitanya Kulkarni , Ming Lei , linux-block , linux-kernel , linux-mtd , linux-efi Subject: Re: [PATCH v4 4/5] mtd_blkdevs: add option to enable scanning for partitions Message-ID: References: <1691046252.219046.1668109493753.JavaMail.zimbra@nod.at> <871124728.219224.1668111155161.JavaMail.zimbra@nod.at> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <871124728.219224.1668111155161.JavaMail.zimbra@nod.at> X-Spam-Status: No, score=0.1 required=5.0 tests=BAYES_00,PDS_OTHER_BAD_TLD, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Nov 10, 2022 at 09:12:35PM +0100, Richard Weinberger wrote: > ----- Urspr?ngliche Mail ----- > > On Thu, Nov 10, 2022 at 08:44:53PM +0100, Richard Weinberger wrote: > >> ----- Urspr?ngliche Mail ----- > >> > Von: "Daniel Golle" > >> > + > >> > + if (!IS_ENABLED(CONFIG_MTD_BLOCK_PARTITIONS) || mtd_type_is_nand(new->mtd)) > >> > + gd->flags |= GENHD_FL_NO_PART; > >> > >> I know that NAND should not get used with mtdblock because lack of wearleveling > >> and > >> in general too many writes. But what exactly is the rationale to deny part > >> scanning for NAND? > > > > As UBI should be used on NAND, partition scanning should be enabled for > > ubiblock devices to have uImage.FIT filesystem subimages mapped by the > > partition parser. > > > > If not skipping partition scanning on NAND-backed mtdblock devices the > > scanning itself will already trigger multiple warnings which now happen > > every time when a NAND-backed mtdblock device is being opened since > > commit 96a3295c ("mtdblock: warn if opened on NAND"). > > I see, you want to promote UBI. Makes sense. > In case you do a v5 series, please add a comment to the code. Will do, I'm planning to send v5 early next week. If we are going to have only CONFIG_MTD_BLOCK_PARTITIONS and no other config symbol for ubiblock devices I'd also merge the two patches for mtdblock and ubiblock partition scanning into a single one. Thank you for reviewing! Daniel