Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp3055988ybz; Mon, 27 Apr 2020 09:12:19 -0700 (PDT) X-Google-Smtp-Source: APiQypLFokVCsU8sy5P9l8s0abXAU5Z+H501mB/iEisiJd92jWa0ODqi05HG9Y9ZXl78ykasiFJ0 X-Received: by 2002:a17:906:3e96:: with SMTP id a22mr20753756ejj.232.1588003939100; Mon, 27 Apr 2020 09:12:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588003939; cv=none; d=google.com; s=arc-20160816; b=Zix9FjHwdsYT5zGmjYEi6gXtW/wJzknHrjfYJJATsAbRPAjh5/hyHdSAuKBeVDVeen yGChEaZRC26XmDARHoMWKpqIMb5GMnxSXoXqAE6tXoYm4XlA+jYq7afEooq+T4PrYNut XWDH376SGqaLhcXVsyxz+ReY6NBGZuzY+4Ku09vITSvA1zNhEBY4+7FLkiyUCXjUwel2 qK7kKTAhqZTYODg/DxBdmcGVhRkDUl5Awp+HRNc/snx76WvSsciNObabbMxejVNg/lfj /MXA+lYw2UXYQ2qmH3aDwbRChGr87CzhjXQHYCBnzyb8lscHdb3iB3dNjS3AF7VJ6sdn IWPg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=ZTTvGLR7ZhgxOGmfNltvS2YiOPBxP92FZQtcm2yemlQ=; b=vZUXrsKNS0dkfSlCyYwqHZkGMXfcAFdepRKhZw0VoTWONEY5dJ+Rp15hOJOS7t+N97 GWMJlwDu0ls17bGYozGNd/8t9OA06I0+zXEeAr5uaVe8STg58qjgcYpUOeTG4NGdAzEE 6F9W8aZPpZLsvZa7cKf/mPuK9PwBkYkoQGR2HBxqYF8ygw3O47f00i9Kss7ol4SsdEfN YBfB2Pt46r2FHnB9ZWW8KK1gKkR55aFHiDUGuJNVd0zhjJCqLeQOul/jCWy0kFKWPaEy y2BWvk834/n8s4iyt11txyQGQhzLeRMZmDL4RsAORVXiLC3pUbMhuXf+q+olo6L5+TDf lu+Q== 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 s28si19618eds.186.2020.04.27.09.11.55; Mon, 27 Apr 2020 09:12:19 -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; 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 S1727936AbgD0QKV (ORCPT + 99 others); Mon, 27 Apr 2020 12:10:21 -0400 Received: from verein.lst.de ([213.95.11.211]:49693 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726000AbgD0QKV (ORCPT ); Mon, 27 Apr 2020 12:10:21 -0400 Received: by verein.lst.de (Postfix, from userid 2407) id 1BEE168CFC; Mon, 27 Apr 2020 18:10:17 +0200 (CEST) Date: Mon, 27 Apr 2020 18:10:16 +0200 From: Christoph Hellwig To: Michal =?iso-8859-1?Q?Koutn=FD?= Cc: Christoph Hellwig , Qian Cai , Jens Axboe , Heiko Carstens , Vasily Gorbik , Christian Borntraeger , linux-block@vger.kernel.org, linux-s390@vger.kernel.org, LKML Subject: Re: s390 boot woe due to "block: fix busy device checking in blk_drop_partitions" Message-ID: <20200427161016.GA9719@lst.de> References: <20200410054544.GA17923@lst.de> <20200423110738.GA102241@blackbook> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200423110738.GA102241@blackbook> User-Agent: Mutt/1.5.17 (2007-11-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Michal, can you try the patch below? That should solve the udev race for real hopefully. diff --git a/drivers/block/loop.c b/drivers/block/loop.c index da693e6a834e5..20dbe4cf62cf9 100644 --- a/drivers/block/loop.c +++ b/drivers/block/loop.c @@ -1318,6 +1318,9 @@ loop_set_status(struct loop_device *lo, const struct loop_info64 *info) if (err) goto out_unfreeze; + /* don't send uevents until we've finished the partition scan */ + dev_set_uevent_suppress(disk_to_dev(lo->lo_disk), 1); + if (lo->lo_offset != info->lo_offset || lo->lo_sizelimit != info->lo_sizelimit) { /* kill_bdev should have truncated all the pages */ @@ -1377,6 +1380,7 @@ loop_set_status(struct loop_device *lo, const struct loop_info64 *info) if (partscan) loop_reread_partitions(lo, bdev); + dev_set_uevent_suppress(disk_to_dev(lo->lo_disk), 0); return err; }