Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp2240382rwl; Thu, 30 Mar 2023 07:49:48 -0700 (PDT) X-Google-Smtp-Source: AKy350a/WnbmickA8kmLFGMlxOG+9T4TUyHZQn0ITLEI12spLBIn9QWYpjrJdQE1Ef6L8dVGCf15 X-Received: by 2002:a05:6a00:2987:b0:624:bf7e:9d8c with SMTP id cj7-20020a056a00298700b00624bf7e9d8cmr2706495pfb.1.1680187787991; Thu, 30 Mar 2023 07:49:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680187787; cv=none; d=google.com; s=arc-20160816; b=vm4jAA7uQVwn83t/3xpZoIHizJ2b727tRIEVvoGEsXTDpNAXfOj5e+MpLcQcGcEpwR UA8kl95TdwSUPlwuGGgrVcS5q4mQUVK78esYvzLvlZwmVUsuZ8mnf4QlpO9MAF6pdnse HAbb8np6XamXHhightnRzxR9vT8QgZzDLpt5DSbacFeVf9EyXQHq4wUOFZFPyRvL4+su 4GumnNVBtAEA8XZ2t+sdaJwpKG3q9IrMaWbWlb3FbQ58gI1C/04W3Xi+InSYa2yNKYc8 3zwUarjJQhLmh5J3BZDFbXehoIJ1iZXomn1koi7/t22PiRdr0R1Dce4xonzK6MAN+5Zs 6wXA== 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; bh=gly8oF7Ua/D9EYPZyv/dEKUgl599k3ARVpS6HgX8iCc=; b=SsrlHbGriRuaPJuZOqSpl50efRXvSveFYa+YIZ0EyTI16rLP6oYSvMleGfD1TKeDhO XtMm3K9u3HAtUcksLE1AqkChqUuXd1hSBuUJU8eJEr0Eu/WMm4F3MEh2Az+0OOXpo2dI QK8ThiwtFKtm9NsK2UFjrBhEfYsmcsSP+N4hhfKQd7yqWl3pzv+AQ7pqMECyw7dbXqlb +t7VV4R3hyED741qdx9zLFHfjaFfD+1v2VYcRqGvyLC1hGwvBBKQu+XV7OJtjdrOVzXw bGt/kWukOa8GlzaIvQt1SMLhQfYvBTgeegIFGAIpiyOsNaiid6PYorcZL5gu0o7dlPYJ hG1A== ARC-Authentication-Results: i=1; mx.google.com; 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 x26-20020a63171a000000b005004b2acf6dsi2461137pgl.810.2023.03.30.07.49.34; Thu, 30 Mar 2023 07:49:47 -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; 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 S232003AbjC3Onr (ORCPT + 99 others); Thu, 30 Mar 2023 10:43:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50632 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232094AbjC3Onn (ORCPT ); Thu, 30 Mar 2023 10:43:43 -0400 Received: from fudo.makrotopia.org (fudo.makrotopia.org [IPv6:2a07:2ec0:3002::71]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D7F7983E8; Thu, 30 Mar 2023 07:43:40 -0700 (PDT) Received: from local by fudo.makrotopia.org with esmtpsa (TLS1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.96) (envelope-from ) id 1phtUl-0006N5-0n; Thu, 30 Mar 2023 16:43:19 +0200 Date: Thu, 30 Mar 2023 15:43:14 +0100 From: Daniel Golle To: Christoph Hellwig Cc: Richard Weinberger , Matthew Wilcox , Jens Axboe , "Martin K. Petersen" , Chaitanya Kulkarni , Wolfram Sang , linux-block@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [RFC PATCH 1/4] init: move block device helpers from init/do_mounts.c Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=0.0 required=5.0 tests=SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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 Christoph, On Tue, Nov 22, 2022 at 04:37:08AM -0800, Christoph Hellwig wrote: > On Sat, Nov 19, 2022 at 04:03:11PM +0000, Daniel Golle wrote: > > [...] > > Yet another (imho not terrible) problem is removal of the lower device. > > Many of the supported SBC use a micro SD card to boot, which can be > > removed by the user while the system is running (which is generally not > > a good idea, but anyway). For partitions this is handled automatically > > by blk_drop_partitions() called directly from genhd.c. > > I'm currently playing with doing something similar using the bus device > > removal notification, but it doesn't seem to work for all cases, e.g. > > mmcblk device do not seem to have the ->bus pointer populated at all > > (ie. disk_to_dev(disk)->bus == NULL for mmcblk devices). > > I have WIP patches that allow the claimer of a block device get > resize and removal notification. It's not going to land for 6.2, > but I hope I have it ready in time for the next merge window. Any news about that patchset? I'd happily review, test and use it ;)