Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1972987pxb; Mon, 8 Mar 2021 10:39:31 -0800 (PST) X-Google-Smtp-Source: ABdhPJxOR1a+BRQmAU6Tg74DIqCQ76shgr7VdkUXAJ2nNYv0T6ZXhAl+ek0Eps5smsxsk5+u4oEp X-Received: by 2002:a17:906:9501:: with SMTP id u1mr16550513ejx.324.1615228771551; Mon, 08 Mar 2021 10:39:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615228771; cv=none; d=google.com; s=arc-20160816; b=Unkn1s05nVfkD37/m3N2jwcri7OvHnee7O3CctQZych9PQOY5yU68ppN2hWeeml3Je 9ScrxnPhFg3vVBz0KYv7q/Yv5xFKAgePReAMOx5MPu28htkHm/6QJ9ZNNfDs1WxMcAGT 7LWE5kxnvZNCZg9G2ty4fn/ojqJt4kowRI2zOThDri7QecruT/CEPIJ6vv/BV3cwLPuA sBr7hdv6GF4TjWGhoUbI3XA0LUTvgNKVMl00P7dVGeNCyGDAI7t4JJ0fX1sa7CwSyqQ4 qcO7KvM7nNAZl9f9u2f/TUoHpuwujttIRp5y4Wah0ZxAkgDVL6I+G+8+3dbolMveIWCB 40iA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=YZXAjbVY/GC5GHtXtKpAcZqXRLvNPfB4paO5kyafZSQ=; b=F2/gpjrsSCwqvd/FCP/23zmtUiDq3cpz8VqKCZhqOqzZye0LlI7o4KkCqLF0Nlg6Fo 0N/Clr3qNTdKD82llwBjnhU1e833iK6AwjkZ/fM2tmpTJ2OaSDpv4teqdcuLxemoXP7H vK1E94PtjhUfNiYVhCZNj83jRd1OeFKjUWQaR2gvNhfAaveXFC2yIIKzfBXLrXpLgV00 /0ffjcCNrAthBXRF6h6h8AI93XHiIRxU997VIWJo/8JODSVkFmIbeDU/iZidqt5Hvjyu t2eceKmIQqRKGx3ucoSBOo5bDajW/7AiI5wk5je07kt1ZozsxaBmTk4aPwpwYgO2abZw i7yQ== ARC-Authentication-Results: i=1; mx.google.com; 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 l12si8018716edi.290.2021.03.08.10.39.08; Mon, 08 Mar 2021 10:39:31 -0800 (PST) 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; 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 S230512AbhCHSiG (ORCPT + 99 others); Mon, 8 Mar 2021 13:38:06 -0500 Received: from verein.lst.de ([213.95.11.211]:57001 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229646AbhCHShy (ORCPT ); Mon, 8 Mar 2021 13:37:54 -0500 Received: by verein.lst.de (Postfix, from userid 2407) id 5D6C768B02; Mon, 8 Mar 2021 19:37:51 +0100 (CET) Date: Mon, 8 Mar 2021 19:37:51 +0100 From: Christoph Hellwig To: Martin Wilck Cc: Daniel Wagner , linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, Jens Axboe , Christoph Hellwig Subject: Re: [PATCH] block: Suppress uevent for hidden device when removed Message-ID: <20210308183751.GA17380@lst.de> References: <20210303171201.8432-1-dwagner@suse.de> <66a9b7ff4958ab990f58a3dad8152d00c59775ce.camel@suse.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <66a9b7ff4958ab990f58a3dad8152d00c59775ce.camel@suse.com> User-Agent: Mutt/1.5.17 (2007-11-01) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Mar 03, 2021 at 06:30:34PM +0100, Martin Wilck wrote: > I wonder if it wouldn't be wiser to remove this code > > if (disk->flags & GENHD_FL_HIDDEN) { > dev_set_uevent_suppress(ddev, 0); > return; > } > > from register_disk(). The way you did it now, we would receive neither > "add" nor "remove" events in user space, but there might be change > events in between ? Well, we'll need to keep the return. That being said keepign the uevents supressed entirely might be a good idea.