Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp747935pxb; Wed, 27 Oct 2021 11:36:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx9DUPPaF7d9pNvdZxr5xUe0ikISU9YbhaoYDyYX39x6tcyEwEGBOvTRv5FVNxvDC/f2VnR X-Received: by 2002:a17:906:26c4:: with SMTP id u4mr40461286ejc.511.1635359792670; Wed, 27 Oct 2021 11:36:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635359792; cv=none; d=google.com; s=arc-20160816; b=qkJg/AdktsHdnHtgkdtLyMUELGPmKpWqfjZ7lM1REXpBpvGvgVckey8yKZAow8g3PC wMDYxdD5uZdybc7pe/7jswEyh9zXc001YYtf16opYyCQgO8Eh9BSBl+CGoXWw8EuBcSi 34bHS1qnfoht3Hx0zw49yq0f1TerKhl35ik366wxOJk0WcYZT7aiWeaDgtHzjXS/PVZX 2U7WLmMbRehlJb7kjjrKRVvlTzxoFnIhbMsA0hQEc0xW04r/Wrc2/TAsCm20SL3kK2hS ctef15a0u/ZhbTFBNgR7b5m1ca5NnooR04uh0o55CupwF44ZUa6sVK3bF1TLoILYGdG3 FoLw== 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=zRi7FJUCOhsdjgbw/serbNCpemaKbs5MpCiaL6eB1dc=; b=hcBYbYvvy7D9EeKPIvXWrreF3yOVLFPQOf1UlpXpkgUYKIr/uUHZI5ANFBGBkyB1ai Pn1zvLoNGVjsfmGt9CkMGICEbPfWub9iaqgiOJx7tDtd7nsfW0z+U/l5qVjxpYqgw6+z PmvLIBtXfA0ugUNmDuan7ryUM1n/LnKraKazhh//HxlzJJ7KsGcK34i447byOKhGnunb 6SgevXC5dm980Y8FXRgXvsOARvnXeLOiydORCuntpBOB9AVacqkYiGjZh4Dz4uklhjMN 4vGjdCSmw0D16e4Gwlvi4ZisUxCkd6ice+NEg/WsCi4qeN1MmtfJjOHOzD5PpxUtulzc YsJQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=NiJCffsK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y8si877191edw.247.2021.10.27.11.36.07; Wed, 27 Oct 2021 11:36:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=NiJCffsK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240148AbhJ0G6P (ORCPT + 99 others); Wed, 27 Oct 2021 02:58:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52412 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231776AbhJ0G6O (ORCPT ); Wed, 27 Oct 2021 02:58:14 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E629CC061570 for ; Tue, 26 Oct 2021 23:55:49 -0700 (PDT) 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=zRi7FJUCOhsdjgbw/serbNCpemaKbs5MpCiaL6eB1dc=; b=NiJCffsKblIi/jSsb6kR+Dje0g +lSEESDWarV4avddWq6MXCJUiWAFzi/4/PddNxC0H07Hs+zZTFL7CgiPeZEbWNgI6S37KNUTWWnbY qbFuP/JgqYNk3swbZeYAtcJI57i0KreX6gpHh70+TNKSfMi9OANBHVQrmmO3tc67ijnKABZHCb4SO P6UN/CVwmRAX49h3/EC6P2xSJ/W9zaYLEfrCqAINi/pGEzwWRUmwFKjU2mklHG63MEmDxggMmhLEO 05sd8M+/Dc/ZWnfd7sc6DrFC56scjVVMYHtTA6ZE9JpkP7ZDMf9ap5nJCJNbDMTOKPtSOM8rXicAi S+H3AkrQ==; Received: from hch by bombadil.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1mfcqd-0044Zu-OG; Wed, 27 Oct 2021 06:55:43 +0000 Date: Tue, 26 Oct 2021 23:55:43 -0700 From: Christoph Hellwig To: Mark-PK Tsai Cc: agk@redhat.com, snitzer@redhat.com, dm-devel@redhat.com, matthias.bgg@gmail.com, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, tequila.yuang@mediatek.com, yj.chiang@mediatek.com Subject: Re: [PATCH] dm: add module parameter bdev_wait Message-ID: References: <20211022064748.30136-1-mark-pk.tsai@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20211022064748.30136-1-mark-pk.tsai@mediatek.com> X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Oct 22, 2021 at 02:47:47PM +0800, Mark-PK Tsai wrote: > 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.