Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp4721344rwp; Sun, 16 Jul 2023 09:14:28 -0700 (PDT) X-Google-Smtp-Source: APBJJlH/7SsaU+rYlNXxa0F+RuTakNxkiEgFvzveGDyqKs3wdPNpLYIolHFfik5B7T5kTbiWvmPc X-Received: by 2002:a17:906:6488:b0:987:f332:5329 with SMTP id e8-20020a170906648800b00987f3325329mr7266234ejm.1.1689524068269; Sun, 16 Jul 2023 09:14:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689524068; cv=none; d=google.com; s=arc-20160816; b=0rIWLL9pyCOX9zCjY9W+7TnFv6a+aoghxhnrQMRQp1RFohnl7D8XW0+rc2yzQXmtuA M9Tvmigd5j6PVN5i5yUJ/2oEvXQ6cpbMLacIKtm6qwa70BLXixxUzogaMHiiNOfAPXZa PkQo0zHCUxlnzQnyb78CYRkPZFkmq5nzzYgwPxzR07RLa2q1Z3QESlRrx8xtV3mAyU0v sG7HeBoTXVPVgDgFvYKOi6PyCMW55eQJOM5TH2i5Cb/F5Q+AV4ne74VK0e3cqxhQWfpL EDOtBgCLr4dM7HWXESZ41Biy9iQGc0anfeT5GFEhvYXrUW/UXWSjuaCthzlDC5MIhD4s ggjg== 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=SjKpqR/un+xqnmH4u/xs4cWkynkrba3RxsIKpUmzl5A=; fh=irwsBx7+EGRvGZPICFgPxq5LHSfxq7P3NQGrGOFcAgw=; b=wVtRN9B7yoPBWYog3W7nCy/U4Fah86JKP0jMxpBOQuXwxNsHHF4om/GmR/ZL5D6MQo IDChpuSxkUAFXifAf2DygAlgO3dK6pQeoYaWzlMKRNxhGDThi7yLxr0m5nk9898KgDZa 1N6O2wJAHwDclG3Bxl6hc0euDUgX3jFXVkSMtjHhlBhXn2jgUI06Z1w/KSpQ7VfWw34m Ly5UDOD84g+x4V94+lEtbP3Z47qS7YJY2I8KlY8h8RbNoy3uKjaPtgXisqv7sLlrSWv1 q+kuaE90X71Vu+Ltu6ZR3DW3w65929YLP1DBZZCncyku9/okA5JPy2g7KNXEgVZeIChV DsAg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=e4goNhhT; 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=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l18-20020a1709065a9200b0098e07395327si12674220ejq.757.2023.07.16.09.14.04; Sun, 16 Jul 2023 09:14:28 -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=@redhat.com header.s=mimecast20190719 header.b=e4goNhhT; 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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230172AbjGPPh0 (ORCPT + 99 others); Sun, 16 Jul 2023 11:37:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47112 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230173AbjGPPhZ (ORCPT ); Sun, 16 Jul 2023 11:37:25 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B9AB0E5D for ; Sun, 16 Jul 2023 08:36:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1689521800; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=SjKpqR/un+xqnmH4u/xs4cWkynkrba3RxsIKpUmzl5A=; b=e4goNhhTIF7jP7Saio+B9w5kryDdEBKXTi8lBWA4wBWRRUGw3NfcEQqh9xcWw1Tb8v5F+4 Tw+KsrtcXA80xE/Xsducrf+Z1EPX7gzcg8gWwQ/YYSHCxo60YhwVow3fogWErmHmbI+cd5 bzNTwqPOHKdF/gkz65C8WHEGnwISKy0= Received: from mail-qk1-f199.google.com (mail-qk1-f199.google.com [209.85.222.199]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-350-8aE3dtpfOvO2MBFtdIlY6A-1; Sun, 16 Jul 2023 11:36:39 -0400 X-MC-Unique: 8aE3dtpfOvO2MBFtdIlY6A-1 Received: by mail-qk1-f199.google.com with SMTP id af79cd13be357-7679e5ebad2so561706385a.3 for ; Sun, 16 Jul 2023 08:36:39 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689521799; x=1692113799; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=SjKpqR/un+xqnmH4u/xs4cWkynkrba3RxsIKpUmzl5A=; b=CQBr+Ks90BZCeUR1aAsQO5fjYLmOwh9Jbj2cpYZK6M2s5J58vy0sJTirLWuOPD2AFh dKwhlrRiMQz/paUyt88Vb/7Q3p/J6PUWVvdEhdervrrjTwSrf1t4+atmEElQoEoto3vt TxHEeRDG6x7UjYcVBgAtsX03biU33E5bdWjIrVqB9YheYPkLe0M7JZZX7Q44m6FpztX5 99cxSI9p6BeXEMYLaiZpqQRfOp32eA1MH7Z3i1lP9YUJPkTY7owK+qXKOuy9zjddiWCk Pxrtt6DYYiwWikbn5dm4tA1wRvZVOWRmFGFNnydYUjuBA4DI9XjofuUSb+wUjP4rMQ4X HJHQ== X-Gm-Message-State: ABy/qLahv/w3khUGuqOglHy9ySGqNFyneiXD1Bo+pO38aJs6nFGDILqf nKRDforQJyZyrOa6a4KBzbD4mlF4gRwke8/fB2s4580CzDv8CZjSfoZQoEhtszmvi+gOra5dvaO RqZPz/HhjpNa85p6XlkgXzjs= X-Received: by 2002:a05:620a:e1b:b0:767:f130:8f8a with SMTP id y27-20020a05620a0e1b00b00767f1308f8amr11678569qkm.49.1689521798779; Sun, 16 Jul 2023 08:36:38 -0700 (PDT) X-Received: by 2002:a05:620a:e1b:b0:767:f130:8f8a with SMTP id y27-20020a05620a0e1b00b00767f1308f8amr11678558qkm.49.1689521798519; Sun, 16 Jul 2023 08:36:38 -0700 (PDT) Received: from localhost (pool-68-160-166-30.bstnma.fios.verizon.net. [68.160.166.30]) by smtp.gmail.com with ESMTPSA id g7-20020ae9e107000000b0075cd80fde9esm5405203qkm.89.2023.07.16.08.36.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 16 Jul 2023 08:36:37 -0700 (PDT) Date: Sun, 16 Jul 2023 11:36:36 -0400 From: Mike Snitzer To: Greg KH 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: 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: <2023071603-lustily-defraud-2149@gregkh> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL, SPF_HELO_NONE,SPF_NONE,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, 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@. But to answer your original question the upstream commit is: 035641b01e72 dm init: add dm-mod.waitfor to wait for asynchronously probed block devices Thanks, Mike