Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp847790rwd; Wed, 31 May 2023 06:19:43 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6AXP1buEJvNi3oOB4OaSn0w3PsVFj6XgYxIl/ZwDVkFiNQ+Z8OYKe1yGv0FuuCGTPEKsXt X-Received: by 2002:a17:902:e993:b0:1ae:40ed:4b8 with SMTP id f19-20020a170902e99300b001ae40ed04b8mr4086391plb.22.1685539183170; Wed, 31 May 2023 06:19:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685539183; cv=none; d=google.com; s=arc-20160816; b=i60r3BhrLBfRtjt+SiVfANe2ibG1UuAUulDxy4P6wUA1G+fdbYJqe2afri0i/j62RQ crB5t5tgHJdNS6cYrv0s+2IibYDt8nDTOdKFJNpcdJxakkbWl69go1q1o2l2WQ4wqGnN wNW84EMKIdant3QNGsOYZ1qEPe2RXEvahGN2DYn7uKpqH5cOoFMmzynD13AEn/KJZ2ZQ eia/b+VOC4RH1pt0iSLj+Z51Bz6QrE6YWnU7QdxlkHyifzPiCqazz0wg8+01hT9RwpjR QyKsemeDI+HNeAIBFj2IS4Amblvo8ttIaSBsz+ZqIczad0R56RoXDRkJ1cfDfXZk2lP6 AyrQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=vvrMwE8BjC38RZj2WyqFyAbLSvr7o9QLGri8y3hsVWs=; b=i3UqVO694Gqn6SuqD4xrhJ/geDAm10MDbpyMYGNiBjR5Ep5haSLBnPRmhXuRYedPv/ yB2G2rIvolLqYUk4em6U2EL2eZKeBrAO9SrHBL8pPa9DgtCDKGy4uK4xrj2xkuYr+LpM m8S8AyzvWdoO4MBXw3e15DQTA1t6wti2oX/6IuyeR+LJ0Sq0tGM1KzsmTF68Ej5gAETm ZVksORXH5FAePnKJiAsSIXZhd5OPrI1XLdUoJj9ARg8ZRd2zyWIJw75gbtifu+Wd5xgt CMvFrrydN1DtTn3G6bP0aVg/h+sqxxR+G/+GHneO1MFBR+ip18cP6/JRmEy77SvPokat nikA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=LsMvMjod; 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 jb7-20020a170903258700b001a9f42553ddsi853139plb.296.2023.05.31.06.19.31; Wed, 31 May 2023 06:19:43 -0700 (PDT) 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=LsMvMjod; 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 S236087AbjEaM4e (ORCPT + 99 others); Wed, 31 May 2023 08:56:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52576 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236061AbjEaM4a (ORCPT ); Wed, 31 May 2023 08:56:30 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7ED841BD; Wed, 31 May 2023 05:56:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type: Content-ID:Content-Description:In-Reply-To:References; bh=vvrMwE8BjC38RZj2WyqFyAbLSvr7o9QLGri8y3hsVWs=; b=LsMvMjodlrdIcQmqStvcRmEg6a p73uxa7uiSXgEqFhriiibCgnB2FhMDBVH4F2qp9/qRc6mLk+JyM9MYIWiIlxZ2DHT6qWm5atTLfMa OpHvyzf9lvD6g/hEdnuHMYAEmiyKQv+bsfJgYbLtvSXhFxarfCZfT1PX2QA+FFcehUhxw0W+GeQVN NffZr8VRBrS0QaOyFJ5XBR/nAoMFXL4+YlFyQJFt994UVHC1i9Y0g0P9eAmgLbTpU3RmOQq2Ym4T7 wdFYC75VgJy0nGYxtTNHpqZ8CPmOZWDdNL1ZsMTtTGI7eHwh40D1mxHOHRxxzeUxn8pqODLBK0yHT 1GqWLJxw==; Received: from [2001:4bb8:182:6d06:2e49:a56:513a:92ee] (helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.96 #2 (Red Hat Linux)) id 1q4LMZ-00HQu7-1g; Wed, 31 May 2023 12:55:40 +0000 From: Christoph Hellwig To: Jens Axboe Cc: Greg Kroah-Hartman , "Rafael J. Wysocki" , Mike Snitzer , Joern Engel , Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , Pavel Machek , Loic Poulain , dm-devel@redhat.com, linux-kernel@vger.kernel.org, linux-block@vger.kernel.org, linux-mtd@lists.infradead.org, linux-pm@vger.kernel.org Subject: fix the name_to_dev_t mess v2 Date: Wed, 31 May 2023 14:55:11 +0200 Message-Id: <20230531125535.676098-1-hch@lst.de> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED 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 Hi all, this series tries to sort out accumulated mess around the name_to_dev_t function. This function is intended to allow looking up the dev_t of a block device based on a name string before the root file systems is mounted and thus the normal path based lookup is available. Unfortunately a few years ago it managed to get exported and used in non-init contexts, leading to the something looking like a path name also beeing lookuped up by a different and potential dangerous algorithm. This series does a fair amount of refactoring and finally ends up with the renamed and improved name_to_dev_t only beeing available for the early init code again. The series is against Jens' for-6.5/block tree but probably applies against current mainline just fine as well. A git tree is also available here: git://git.infradead.org/users/hch/block.git blk-init-cleanup Gitweb: http://git.infradead.org/users/hch/block.git/shortlog/refs/heads/blk-init-cleanup Changes since v1: - really propagate the actual error in dm_get_device - improve the documentation in kernel-parameters.txt - spelling fixes Diffstat: