Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp1198859rwb; Thu, 10 Nov 2022 12:37:23 -0800 (PST) X-Google-Smtp-Source: AMsMyM6bZT1DV1mx2EdAW5mJ5FbnYaOzBvxgrFolEYtfc2wozGyp3MpJMVC9yhDRPSJPcvCcUIOO X-Received: by 2002:a63:135e:0:b0:46b:8e9:747 with SMTP id 30-20020a63135e000000b0046b08e90747mr3224779pgt.365.1668112643407; Thu, 10 Nov 2022 12:37:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668112643; cv=none; d=google.com; s=arc-20160816; b=yJzBRJALHnSw2JUFe5MxrHTjJUJDbTmySHwQyuGVpl2R4nc0LAPQ88/V8iOcjdAx0A LA4axjf/Rhk0Y4ah1C1onqntOtaWjglMajM1qdZdL0O0l6syoig/5EpeGxzJQzmBsJ8w /YUeiZf4mTOQ3XVn+q9xFSYzaAKcAPav/YuEhaLKUgRx4GywvOFLtZ2GrEIZDMfklSjQ jgumsHth/hsnpnuV4qrIkBRMjgov8dDRU580XMs6Tmdo2FO7mAtYF7aFMKnYqzxmmB6x QrcJdJMh9441I+X4hNQSYUuVi64bJ8hgZAOSkLIwUmNgUX+J7bCADTZWNn+30sFMHUIF 6cRQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:thread-index:thread-topic :content-transfer-encoding:mime-version:subject:references :in-reply-to:message-id:cc:to:from:date; bh=H0rWEl+G9Bd98DzEyJ4MwQSvLK7Z33W+2EdR61+DOD0=; b=dY37W/mqB5oCDVWRrP81w42T7LmqSJ5KYB/wxhSxy5rISB6uir55W9MYR1YcdLUGjH r5wEwC/re1EJGsO8QabQmK+RHlpx/I22xUnX1gtte55sFunvxU0GRwe13yeGWcH4XIfT +p/M0l+nbHCIO3kolC8nyagGzsHfA28f1vjQAM8semgYUmq03EGp7nZpj8efozBiSahb KvPbBO/Q4jL8dtpwYgSojDtt8w1xD8q/Qr/XWfLaLdd9JMInKiLR8oFFCM0g5Mlth6XI mCVLslF5efMYsxzOeJPkm3ggg0s3k0ujeGBXCGjzQTk/m2srrPRyuEZ9PeKmsylODCn3 pJXw== 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 e13-20020a63db0d000000b0046f4d4cc59asi229561pgg.160.2022.11.10.12.37.11; Thu, 10 Nov 2022 12:37:23 -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 S229595AbiKJUMk convert rfc822-to-8bit (ORCPT + 92 others); Thu, 10 Nov 2022 15:12:40 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56104 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229461AbiKJUMh (ORCPT ); Thu, 10 Nov 2022 15:12:37 -0500 Received: from lithops.sigma-star.at (lithops.sigma-star.at [195.201.40.130]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1A2CD2F382; Thu, 10 Nov 2022 12:12:37 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by lithops.sigma-star.at (Postfix) with ESMTP id C40F863CDC5B; Thu, 10 Nov 2022 21:12:35 +0100 (CET) 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 8t93NELvwpPx; Thu, 10 Nov 2022 21:12:35 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by lithops.sigma-star.at (Postfix) with ESMTP id 632B161B8B4D; Thu, 10 Nov 2022 21:12:35 +0100 (CET) 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 drrJ2Br71Io2; Thu, 10 Nov 2022 21:12:35 +0100 (CET) Received: from lithops.sigma-star.at (lithops.sigma-star.at [195.201.40.130]) by lithops.sigma-star.at (Postfix) with ESMTP id 3BA6463CDC5B; Thu, 10 Nov 2022 21:12:35 +0100 (CET) Date: Thu, 10 Nov 2022 21:12:35 +0100 (CET) From: Richard Weinberger To: Daniel Golle 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 Message-ID: <871124728.219224.1668111155161.JavaMail.zimbra@nod.at> In-Reply-To: References: <1691046252.219046.1668109493753.JavaMail.zimbra@nod.at> Subject: Re: [PATCH v4 4/5] mtd_blkdevs: add option to enable scanning for partitions MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8BIT X-Originating-IP: [195.201.40.130] X-Mailer: Zimbra 8.8.12_GA_3807 (ZimbraWebClient - FF97 (Linux)/8.8.12_GA_3809) Thread-Topic: mtd_blkdevs: add option to enable scanning for partitions Thread-Index: JXERWtnlcCWgydDBA6DChmOXmJ0hxw== X-Spam-Status: No, score=0.1 required=5.0 tests=BAYES_00,PDS_OTHER_BAD_TLD, SPF_HELO_NONE,T_SPF_PERMERROR 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 ----- 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. Thanks, //richard