Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp1389301rwb; Wed, 14 Dec 2022 09:33:45 -0800 (PST) X-Google-Smtp-Source: AA0mqf4xAjiQdm97TuZGBbuUbMWj5Uowz/TlNLP07hY5vgkxlsqlgSS+lzqzTlZ2ORR+zM7GTZNq X-Received: by 2002:a17:902:c1c5:b0:185:441f:709c with SMTP id c5-20020a170902c1c500b00185441f709cmr24567793plc.33.1671039225312; Wed, 14 Dec 2022 09:33:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671039225; cv=none; d=google.com; s=arc-20160816; b=ZDB/f+jJmqdVwrV/3KTzATAlT7NmSIneacXFO7nNQNW8T6tqPehahVy/MVOseaC0en u5z53fSKUkrH+8YPKRAwJYpEVGrxfSiMvf/OMtjdx+a5AjVtiNsDAo3YfJVFR2Xu+Lki DFbxBdPev8BekPanuRVM5PTc4SM6YrmlUh25mghB6C+L2ai0oEe+PZXcA1ooI7f3/d/Q OGuQyUCwmBJCxVDa9ZEg23mSga3rkLmVtMRzSNAaw/xUNyMvhNGjV/PSllZkPY6t/JFq 5nO7hWpRtxBqWiei2dLeAaoGE1tO+AUvLq23n7XxGJVUcGIaKF+fyCUsDx6diBmGKnCr gXug== 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-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=Ta+FkplGhIQKdorRO8rZ4lONlODdKGw1emfoP2dg42Q=; b=QaxrF4NNpcJESZfcsky/931bu4FR9woAwldV+NsSSKMw350LumfaY5cxqg38ISdAiC DMFRgkgrZLpMgNZKKm5mF10d9obsd8bWvWNK7VyIFtMmGA2cmTgTUbndo6X5hDH2LeSF pqTiqTSzdV/1n3BXVvhSAUy/VU/OzrrrWE7GVQk2lRu6R4ulKz3/WMNTwPd1URGr5Fdo geN6jZVdz7bEkH6dosT62O8MGEt3PNloOqy2rMbLijCDOOwrh2X1eIeyPJQMuRBjq8lS AugzOnt6qso+yM+YwxAL8WpgZJ71ryewDRIPAuSV1VxtJIgh38QmV/HKHuzKBd+VJrpP H/NA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=JYDzwpAo; 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 c11-20020a170902b68b00b00186abd0c784si3249383pls.217.2022.12.14.09.33.36; Wed, 14 Dec 2022 09:33:45 -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; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=JYDzwpAo; 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 S238671AbiLNQnl (ORCPT + 69 others); Wed, 14 Dec 2022 11:43:41 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57690 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229649AbiLNQnk (ORCPT ); Wed, 14 Dec 2022 11:43:40 -0500 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5EA3B2630; Wed, 14 Dec 2022 08:43:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=Ta+FkplGhIQKdorRO8rZ4lONlODdKGw1emfoP2dg42Q=; b=JYDzwpAonrVhdqNUlrzeg2/AYt Ee5Z8uENr87qybhJnwlgvbnmQVfAm6sAde48sjjB9Ji6ZRkZeiyGJXYlK/lsiknTzDumZfpmwh/qn groS5dMaDBigUIaxg4Lo9Y4dNm6PGmaHVpt3kRx8JvgSOH9qXIoqTxDw5IaDGPwtLOUMC2FIpLfjR BUa5maQj2iVjl+2P9bv2/kA7C5sv7Y2ym0AIusZG3YDITRkkdJlJlgFi03oNiJVTIMdXLbOZK3xbk rUinHuAfTlsIfOzrjBWQRCSIYmKqnRxFMvKnb77Gdsc6GyE/BHBXL4rJPtOtTdhheYJNSzncy1IAZ qghj2D7Q==; Received: from hch by bombadil.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1p5Uqv-000m01-3e; Wed, 14 Dec 2022 16:43:29 +0000 Date: Wed, 14 Dec 2022 08:43:29 -0800 From: Christoph Hellwig To: Daniel Golle Cc: Christoph Hellwig , Richard Weinberger , Matthew Wilcox , Jens Axboe , "Martin K. Petersen" , Chaitanya Kulkarni , Wolfram Sang , linux-block@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [RFC PATCH 1/4] init: move block device helpers from init/do_mounts.c Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE,T_PDS_OTHER_BAD_TLD autolearn=ham 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 Tue, Dec 13, 2022 at 12:45:27PM +0000, Daniel Golle wrote: > > Yes, but a completely non-standard format that nests inside an > > partition. > > The reason for this current discussion (see subject line) is exactly > that you didn't like the newly introduced partition type GUID which > then calls the newly introduced partition parser taking care of the > uImage.FIT content of a partition. Which is the exact nesting I'm complaining about. Why do you need to use your format inside a GPT partition table? What you're doing is bascially nesting a partition table format inside another one, which doesn't make any sense at all. > This block driver (if built-into the kernel and relied upon to expose > the block device used as root filesystem) will need to identify the > lower device it should work on. And for that the helper functions such > as devt_from_devname() need to be available for that driver. And devt_from_devname must not be used by more non-init code. It is bad it got exposed at all, but new users are not acceptable. > A block representation is the common denominator of all the > above. Sure, I could implement splitting MTD devices according to > uImage.FIT and then add MTD support to squashfs. Then implement > splitting of UBI volumes and add UBI support to squashfs. Implementing MTD and/or UBI support would allow you to build a kernel without CONFIG_BLOCK, which will save you a lot more than the 64k you were whining about above. > > None of this explains the silly nesting inside the GPT partition. > > It is not needed for the any use cases and the root probem here. > > So where would you store the uImage (which will have to exist > even to just load kernel and DTB in U-Boot, even without containing > the root filesystem) on devices with eMMC then? Straight on the block device, where else? > Are you suggesting to come up with an entirely new type of partition > table only for that purpose? Which will require its own tools and > implementation in both, U-Boot and Linux? What would be the benefit > over just using GPT partitioning? Why do you need another layer of partitioning instead of storing all your information either in the uImage, or in some other partition format of your choice? See, if you have GPT, DOS or whatever partitions, you just use partitions and store all the bits your care about in them. If you want a fancy not invented here syndrome image format you use that. But don't use both.