From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7D835C64E7A for ; Thu, 26 Nov 2020 18:04:11 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 3466B207BC for ; Thu, 26 Nov 2020 18:04:11 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3466B207BC Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id A7B196B0070; Thu, 26 Nov 2020 13:04:10 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id A03C96B0072; Thu, 26 Nov 2020 13:04:10 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 8CBD46B0073; Thu, 26 Nov 2020 13:04:10 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0077.hostedemail.com [216.40.44.77]) by kanga.kvack.org (Postfix) with ESMTP id 780C36B0070 for ; Thu, 26 Nov 2020 13:04:10 -0500 (EST) Received: from smtpin14.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 3D35C180AD815 for ; Thu, 26 Nov 2020 18:04:10 +0000 (UTC) X-FDA: 77527343460.14.trees33_3c0dcaf27381 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin14.hostedemail.com (Postfix) with ESMTP id 210A118229835 for ; Thu, 26 Nov 2020 18:04:10 +0000 (UTC) X-HE-Tag: trees33_3c0dcaf27381 X-Filterd-Recvd-Size: 2334 Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by imf37.hostedemail.com (Postfix) with ESMTP for ; Thu, 26 Nov 2020 18:04:09 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 8607EAC55; Thu, 26 Nov 2020 18:04:08 +0000 (UTC) Received: by quack2.suse.cz (Postfix, from userid 1000) id 1FC061E10D0; Thu, 26 Nov 2020 19:04:08 +0100 (CET) Date: Thu, 26 Nov 2020 19:04:08 +0100 From: Jan Kara To: Christoph Hellwig Cc: Jan Kara , Jens Axboe , Tejun Heo , Josef Bacik , Coly Li , Mike Snitzer , Greg Kroah-Hartman , Johannes Thumshirn , dm-devel@redhat.com, Jan Kara , linux-block@vger.kernel.org, linux-bcache@vger.kernel.org, linux-mtd@lists.infradead.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, Chao Yu Subject: Re: [PATCH 29/44] block: remove the nr_sects field in struct hd_struct Message-ID: <20201126180408.GB422@quack2.suse.cz> References: <20201126130422.92945-1-hch@lst.de> <20201126130422.92945-30-hch@lst.de> <20201126165036.GO422@quack2.suse.cz> <20201126175208.GA24843@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201126175208.GA24843@lst.de> User-Agent: Mutt/1.10.1 (2018-07-13) X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Thu 26-11-20 18:52:08, Christoph Hellwig wrote: > On Thu, Nov 26, 2020 at 05:50:36PM +0100, Jan Kara wrote: > > > + if (size == capacity || > > > + (disk->flags & (GENHD_FL_UP | GENHD_FL_HIDDEN)) != GENHD_FL_UP) > > > + return false; > > > + pr_info("%s: detected capacity change from %lld to %lld\n", > > > + disk->disk_name, size, capacity); > > > + kobject_uevent_env(&disk_to_dev(disk)->kobj, KOBJ_CHANGE, envp); > > > > I think we don't want to generate resize event for changes from / to 0... > > Didn't you ask for that in the last round? I've asked for the message - which you've added :). But the udev event was correct in the previous version IMHO... Honza -- Jan Kara SUSE Labs, CR