Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E5E92C433EF for ; Thu, 28 Oct 2021 05:49:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C45F661056 for ; Thu, 28 Oct 2021 05:49:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229775AbhJ1FwV (ORCPT ); Thu, 28 Oct 2021 01:52:21 -0400 Received: from mailgw02.mediatek.com ([210.61.82.184]:60282 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S229689AbhJ1FwS (ORCPT ); Thu, 28 Oct 2021 01:52:18 -0400 X-UUID: 0500a93a3b824aa4914b4f2b68f923ac-20211028 X-UUID: 0500a93a3b824aa4914b4f2b68f923ac-20211028 Received: from mtkmbs10n1.mediatek.inc [(172.21.101.34)] by mailgw02.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 1976393245; Thu, 28 Oct 2021 13:49:47 +0800 Received: from mtkmbs10n1.mediatek.inc (172.21.101.34) by mtkmbs10n1.mediatek.inc (172.21.101.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.792.15; Thu, 28 Oct 2021 13:49:46 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkmbs10n1.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.2.792.15 via Frontend Transport; Thu, 28 Oct 2021 13:49:46 +0800 From: Mark-PK Tsai To: CC: , , , , , , , , , Subject: Re: [PATCH] dm: add module parameter bdev_wait Date: Thu, 28 Oct 2021 13:49:46 +0800 Message-ID: <20211028054946.1524-1-mark-pk.tsai@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain X-MTK: N Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > > dm_early_create() fail if the target block device not found in > > the late init stage. > > The block device is created in mmc_rescan() which kernel do > > it async by queue it into system_freezable_wq. > > Add module param bdev_wait to support waiting the block device > > ready before dm_early_create() like prepare_namespace() does. > > This adds a busy loop. There is a reason why we usually set up > stacking drivers from userspace, in that we have a working event > system there. So the answer is not to add further hacks to the > in-kernel DM setup hack, but to stop using it. Thanks for your kind reply. But We want to use DM target as root device without adding an initramfs. Is there any other way to do so?