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, URIBL_BLOCKED,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 B6580C2D0E4 for ; Fri, 27 Nov 2020 09:41:17 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 47B9E20B80 for ; Fri, 27 Nov 2020 09:41:15 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 47B9E20B80 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=lst.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 8A93D6B0068; Fri, 27 Nov 2020 04:41:14 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 8821D6B006C; Fri, 27 Nov 2020 04:41:14 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 796BC6B006E; Fri, 27 Nov 2020 04:41:14 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0254.hostedemail.com [216.40.44.254]) by kanga.kvack.org (Postfix) with ESMTP id 617556B0068 for ; Fri, 27 Nov 2020 04:41:14 -0500 (EST) Received: from smtpin01.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 29F1816B07 for ; Fri, 27 Nov 2020 09:41:14 +0000 (UTC) X-FDA: 77529704868.01.frog60_58161aa27387 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin01.hostedemail.com (Postfix) with ESMTP id 09B5710058C8F for ; Fri, 27 Nov 2020 09:41:14 +0000 (UTC) X-HE-Tag: frog60_58161aa27387 X-Filterd-Recvd-Size: 2597 Received: from verein.lst.de (verein.lst.de [213.95.11.211]) by imf27.hostedemail.com (Postfix) with ESMTP for ; Fri, 27 Nov 2020 09:41:13 +0000 (UTC) Received: by verein.lst.de (Postfix, from userid 2407) id D046C68B05; Fri, 27 Nov 2020 10:41:09 +0100 (CET) Date: Fri, 27 Nov 2020 10:41:09 +0100 From: Christoph Hellwig To: Jan Kara Cc: Christoph Hellwig , 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: <20201127094109.GB14976@lst.de> References: <20201126130422.92945-1-hch@lst.de> <20201126130422.92945-30-hch@lst.de> <20201126165036.GO422@quack2.suse.cz> <20201126175208.GA24843@lst.de> <20201126180408.GB422@quack2.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201126180408.GB422@quack2.suse.cz> User-Agent: Mutt/1.5.17 (2007-11-01) 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, Nov 26, 2020 at 07:04:08PM +0100, Jan Kara wrote: > 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... Note that this version only prints if the gendisk is up. So any initial setup does not see a message. I think that is a better indicator than checking for 0. Especially as say a remotely triggered change to 0 is an even worth printing, and except for DRBD all drivers did print the message. > > Honza > -- > Jan Kara > SUSE Labs, CR ---end quoted text---