Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp4761406rwp; Sun, 16 Jul 2023 10:05:43 -0700 (PDT) X-Google-Smtp-Source: APBJJlHFuL0uS7R15T063qa5WVlc/lWjyy0Ofm/4ATxUVSRUxNqbMl2LiXIDMH2d4nC4fQZ4eZuJ X-Received: by 2002:a17:907:8a11:b0:993:e691:6dd5 with SMTP id sc17-20020a1709078a1100b00993e6916dd5mr11764121ejc.7.1689527143177; Sun, 16 Jul 2023 10:05:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689527143; cv=none; d=google.com; s=arc-20160816; b=u66gXMRIx84cXrcnhx4SEnFVciQDeiuKGGTvy1TKr5eZSF2SHb2ndnBzRnLzcO2JHp JR8JatDpX9I3l6RGJEsMvL6g7yYfSQCW5+u4YGC9pl42v7RhyQS5ECNc/GAhjpOf6X3+ 0wXcvfVmzrlpj9kfrWa8zIMA0ZDdU/pJaKtV4C1ow0UyTqf7B/99zYPanyhRz/XAhpke s7SMjKixgnwnH0otfmaJViPg0UBhPgm3L9+Ax5TTE0tOgjSTz2wRzIB/TXXvRoh0xkIu ewdJHf0v/+9xLQdxh66FfHUW8UjTlZjH05u21ScnkzbIRh5x893kkB6bZw2v+W73IrTG iXcQ== 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=E8YK+g6bbaiBzRtsdDfNlqPPIdMif4KpRQIjjMRTwGk=; fh=E2QInIwb5y6o4Vnh2zUp36ssz+eSGrZGCgCL0EjBI6M=; b=vDSeapJOodMBMbYlyOv4697+iSqJxZwMtjPqS/tC7BmWwsTix3vWHRpsSHxqMu3Hih frTHNe6EMVuDPBP0JII4mq7Hcfza7R+gC7Lmv0YisjlRj5YhEk17LRXnAodi1dFj+iYa xO+2bYtlCuK62/oyxbjQD+nNl+gkHbI86c81Ihkxk2ykwpnRswus+0VFsiqyiCoC0Aym 28zUHBKz8WlktIVDTW+EGd43sjsI+PXGEjkx2j6KOtuRImOMTwJBw0L68yp49rlPllFz ll2KGNbF2CcVZeeH3QF8UrV3cYcOOudAuKDf+EFH0wp+cP3zIlv504G/trZHkBiiimuv mUDA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=DQARaTQa; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n22-20020a170906841600b00992bd86ece6si5680303ejx.725.2023.07.16.10.05.19; Sun, 16 Jul 2023 10:05: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=@linuxfoundation.org header.s=korg header.b=DQARaTQa; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229795AbjGPPne (ORCPT + 99 others); Sun, 16 Jul 2023 11:43:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47736 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229451AbjGPPnd (ORCPT ); Sun, 16 Jul 2023 11:43:33 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B3DAAE5D; Sun, 16 Jul 2023 08:43:32 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 395E260D58; Sun, 16 Jul 2023 15:43:32 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 15F5FC433C8; Sun, 16 Jul 2023 15:43:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1689522211; bh=jaqa0HCS19s0PDvOrcJ3LKInhBxF2KV171eQMHttwyo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=DQARaTQayEv+DfaM2Gz058pqDQpaTD9G0lzO7bgWOpLc2MuguNh4fzrA5+1uzT+g8 PvsLDuduUSxPdblx0IFoyiF5tN4W4E9uDIxRcur4W4Ua4Of9NCZQ18qXMBj3TU6VC/ 5q5k6KyJAdq2YB8dcgZBAaHjUo01dA3SM6NP4U28= Date: Sun, 16 Jul 2023 17:43:28 +0200 From: Greg KH To: Mike Snitzer Cc: Mark-PK Tsai , Alasdair Kergon , "development, device-mapper" , Jonathan Corbet , Matthias Brugger , yj.chiang@mediatek.com, Peter Korsgaard , Mike Snitzer , stable@vger.kernel.org, linux-doc@vger.kernel.org, Linux Kernel Mailing List , linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org Subject: Re: [PATCH 5.15] dm init: add dm-mod.waitfor to wait for asynchronously probed block devices Message-ID: <2023071657-marry-usual-882f@gregkh> References: <20230713055841.24815-1-mark-pk.tsai@mediatek.com> <2023071603-lustily-defraud-2149@gregkh> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 Sun, Jul 16, 2023 at 11:36:36AM -0400, Mike Snitzer wrote: > On Sun, Jul 16, 2023, 11:16 AM Greg KH wrote: > > > On Thu, Jul 13, 2023 at 01:58:37PM +0800, Mark-PK Tsai wrote: > > > From: Peter Korsgaard > > > > > > Just calling wait_for_device_probe() is not enough to ensure that > > > asynchronously probed block devices are available (E.G. mmc, usb), so > > > add a "dm-mod.waitfor=[,..,]" parameter to get > > > dm-init to explicitly wait for specific block devices before > > > initializing the tables with logic similar to the rootwait logic that > > > was introduced with commit cc1ed7542c8c ("init: wait for > > > asynchronously scanned block devices"). > > > > > > E.G. with dm-verity on mmc using: > > > dm-mod.waitfor="PARTLABEL=hash-a,PARTLABEL=root-a" > > > > > > [ 0.671671] device-mapper: init: waiting for all devices to be > > available before creating mapped devices > > > [ 0.671679] device-mapper: init: waiting for device PARTLABEL=hash-a > > ... > > > [ 0.710695] mmc0: new HS200 MMC card at address 0001 > > > [ 0.711158] mmcblk0: mmc0:0001 004GA0 3.69 GiB > > > [ 0.715954] mmcblk0boot0: mmc0:0001 004GA0 partition 1 2.00 MiB > > > [ 0.722085] mmcblk0boot1: mmc0:0001 004GA0 partition 2 2.00 MiB > > > [ 0.728093] mmcblk0rpmb: mmc0:0001 004GA0 partition 3 512 KiB, > > chardev (249:0) > > > [ 0.738274] mmcblk0: p1 p2 p3 p4 p5 p6 p7 > > > [ 0.751282] device-mapper: init: waiting for device PARTLABEL=root-a > > ... > > > [ 0.751306] device-mapper: init: all devices available > > > [ 0.751683] device-mapper: verity: sha256 using implementation > > "sha256-generic" > > > [ 0.759344] device-mapper: ioctl: dm-0 (vroot) is ready > > > [ 0.766540] VFS: Mounted root (squashfs filesystem) readonly on > > device 254:0. > > > > > > Signed-off-by: Peter Korsgaard > > > Signed-off-by: Mike Snitzer > > > Cc: stable@vger.kernel.org > > > Signed-off-by: Mark-PK Tsai > > > --- > > > .../admin-guide/device-mapper/dm-init.rst | 8 +++++++ > > > drivers/md/dm-init.c | 22 ++++++++++++++++++- > > > 2 files changed, 29 insertions(+), 1 deletion(-) > > > > What is the git commit id of this change in Linus's tree? > > > > thanks, > > > > greg k-h > > > > > > Hey Greg, > > This change shouldn't be backported to stable@. It is a feature, if > Mark-PK feels they need it older kernels they need to carry the change > in their own tree. Or at a minimum they need to explain why this > change is warranted in stable@. Ok, I'll drop it from my queue. > But to answer your original question the upstream commit is: > > 035641b01e72 dm init: add dm-mod.waitfor to wait for asynchronously probed block devices Ah, showed up in 6.2, so we have to have a 6.1.y backport as well, I can't take patches for only older kernels, sorry. thanks, greg k-h