| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
 Re: [PATCH 03/24] nvme: let set_capacity_revalidate_and_notify update the bdev size
 
To: Christoph Hellwig <hch@xxxxxx>, Jens Axboe <axboe@xxxxxxxxx>From: Hannes Reinecke <hare@xxxxxxx>Date: Mon, 9 Nov 2020 08:53:58 +0100Cc: Justin Sanders <justin@xxxxxxxxxx>, Josef Bacik <josef@xxxxxxxxxxxxxx>, Ilya Dryomov <idryomov@xxxxxxxxx>, Jack Wang <jinpu.wang@xxxxxxxxxxxxxxx>, "Michael S. Tsirkin" <mst@xxxxxxxxxx>, Jason Wang <jasowang@xxxxxxxxxx>, Paolo Bonzini <pbonzini@xxxxxxxxxx>, Stefan Hajnoczi <stefanha@xxxxxxxxxx>, Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Minchan Kim <minchan@xxxxxxxxxx>, Mike Snitzer <snitzer@xxxxxxxxxx>, Song Liu <song@xxxxxxxxxx>, "Martin K. Petersen" <martin.petersen@xxxxxxxxxx>, dm-devel@xxxxxxxxxx, linux-block@xxxxxxxxxxxxxxx, drbd-dev@xxxxxxxxxxxxxxxx, nbd@xxxxxxxxxxxxxxxx, ceph-devel@xxxxxxxxxxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxxx, linux-raid@xxxxxxxxxxxxxxx, linux-nvme@xxxxxxxxxxxxxxxxxxx, linux-scsi@xxxxxxxxxxxxxxx, linux-fsdevel@xxxxxxxxxxxxxxxDelivery-date: Mon, 09 Nov 2020 07:54:06 +0000List-id: Xen developer discussion <xen-devel.lists.xenproject.org> 
 
On 11/6/20 8:03 PM, Christoph Hellwig wrote:
 
There is no good reason to call revalidate_disk_size separately.
Signed-off-by: Christoph Hellwig <hch@xxxxxx>
---
  drivers/nvme/host/core.c | 5 +----
  1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
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. 
While personally I would _love_ to have this patch, we should at least 
document this by making it a separate patch.
And we possibly should check if both sizes are the same, and think of 
what we should be doing if they are not. 
Cheers,
Hannes
--
Dr. Hannes Reinecke                Kernel Storage Architect
hare@xxxxxxx                              +49 911 74053 688
SUSE Software Solutions GmbH, Maxfeldstr. 5, 90409 Nürnberg
HRB 36809 (AG Nürnberg), Geschäftsführer: Felix Imendörffer
 
 |