From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from verein.lst.de (verein.lst.de [213.95.11.211]) by mail19.linbit.com (LINBIT Mail Daemon) with ESMTP id CF56F420209 for ; Mon, 9 Nov 2020 09:53:42 +0100 (CET) Date: Mon, 9 Nov 2020 09:53:40 +0100 From: Christoph Hellwig To: Hannes Reinecke Message-ID: <20201109085340.GB27483@lst.de> References: <20201106190337.1973127-1-hch@lst.de> <20201106190337.1973127-4-hch@lst.de> <1d06cdfa-a904-30be-f3ec-08ae2fa85cbd@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1d06cdfa-a904-30be-f3ec-08ae2fa85cbd@suse.de> Cc: Justin Sanders , Mike Snitzer , "Michael S. Tsirkin" , Jason Wang , linux-nvme@lists.infradead.org, Song Liu , dm-devel@redhat.com, Christoph Hellwig , drbd-dev@lists.linbit.com, linux-scsi@vger.kernel.org, xen-devel@lists.xenproject.org, Ilya Dryomov , Jack Wang , Konrad Rzeszutek Wilk , Josef Bacik , nbd@other.debian.org, linux-block@vger.kernel.org, Stefan Hajnoczi , ceph-devel@vger.kernel.org, Jens Axboe , linux-raid@vger.kernel.org, "Martin K. Petersen" , Minchan Kim , linux-fsdevel@vger.kernel.org, Paolo Bonzini , Roger Pau =?iso-8859-1?Q?Monn=E9?= Subject: Re: [Drbd-dev] [PATCH 03/24] nvme: let set_capacity_revalidate_and_notify update the bdev size List-Id: "*Coordination* of development, patches, contributions -- *Questions* \(even to developers\) go to drbd-user, please." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Mon, Nov 09, 2020 at 08:53:58AM +0100, Hannes Reinecke wrote: >> index 376096bfc54a83..4e86c9aafd88a7 100644 >> --- a/drivers/nvme/host/core.c >> +++ b/drivers/nvme/host/core.c >> @@ -2053,7 +2053,7 @@ static void nvme_update_disk_info(struct gendisk *disk, >> capacity = 0; >> } >> - set_capacity_revalidate_and_notify(disk, capacity, false); >> + set_capacity_revalidate_and_notify(disk, capacity, true); >> nvme_config_discard(disk, ns); >> nvme_config_write_zeroes(disk, ns); >> @@ -2136,7 +2136,6 @@ static int nvme_update_ns_info(struct nvme_ns *ns, struct nvme_id_ns *id) >> blk_stack_limits(&ns->head->disk->queue->limits, >> &ns->queue->limits, 0); >> blk_queue_update_readahead(ns->head->disk->queue); >> - nvme_update_bdev_size(ns->head->disk); >> blk_mq_unfreeze_queue(ns->head->disk->queue); >> } >> #endif > > Hold on. > This, at the very least, should be a separate patch. > With this you are changing the behaviour of nvme multipath. > > Originally nvme multipath would update/change the size of the multipath > device according to the underlying path devices. > With this patch the size of the multipath device will _not_ change if there > is a change on the underlying devices. Yes, it will. Take a close look at nvme_update_disk_info and how it is called.