Re: [PATCH 03/24] nvme: let set_capacity_revalidate_and_notify update the bdev size
- To: Christoph Hellwig <hch@lst.de>
- Cc: Jens Axboe <axboe@kernel.dk>, Justin Sanders <justin@coraid.com>, Josef Bacik <josef@toxicpanda.com>, Ilya Dryomov <idryomov@gmail.com>, Jack Wang <jinpu.wang@cloud.ionos.com>, "Michael S. Tsirkin" <mst@redhat.com>, Jason Wang <jasowang@redhat.com>, Paolo Bonzini <pbonzini@redhat.com>, Stefan Hajnoczi <stefanha@redhat.com>, Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>, Roger Pau Monné <roger.pau@citrix.com>, Minchan Kim <minchan@kernel.org>, Mike Snitzer <snitzer@redhat.com>, Song Liu <song@kernel.org>, "Martin K. Petersen" <martin.petersen@oracle.com>, dm-devel@redhat.com, linux-block@vger.kernel.org, drbd-dev@lists.linbit.com, nbd@other.debian.org, ceph-devel@vger.kernel.org, xen-devel@lists.xenproject.org, linux-raid@vger.kernel.org, linux-nvme@lists.infradead.org, linux-scsi@vger.kernel.org, linux-fsdevel@vger.kernel.org
- Subject: Re: [PATCH 03/24] nvme: let set_capacity_revalidate_and_notify update the bdev size
- From: Hannes Reinecke <hare@suse.de>
- Date: Mon, 9 Nov 2020 10:25:22 +0100
- Message-id: <[🔎] e79f9a96-ef53-d6ea-f6e7-e141bdd2e2d2@suse.de>
- In-reply-to: <20201109085340.GB27483@lst.de>
- References: <20201106190337.1973127-1-hch@lst.de> <20201106190337.1973127-4-hch@lst.de> <[🔎] 1d06cdfa-a904-30be-f3ec-08ae2fa85cbd@suse.de> <20201109085340.GB27483@lst.de>
On 11/9/20 9:53 AM, Christoph Hellwig wrote:
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;
[ .. ]
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.
Okay, then: What would be the correct way of handling a size update for
NVMe multipath?
Assuming we're getting an AEN for each path signalling the size change
(or a controller reset leading to a size change).
So if we're updating the size of the multipath device together with the
path device at the first AEN/reset we'll end up with the other paths
having a different size than the multipath device (and the path we've
just been updating).
- Do we care, or cross fingers and hope for the best?
- Shouldn't we detect the case where we won't get a size update for the
other paths, or, indeed, we have a genuine device size mismatch due to a
misconfiguration on the target?
IE shouldn't we have a flag 'size update pending' for the other paths,,
to take them out ouf use temporarily until the other AENs/resets have
been processed?
Cheers,
Hannes
--
Dr. Hannes Reinecke Kernel Storage Architect
hare@suse.de +49 911 74053 688
SUSE Software Solutions GmbH, Maxfeldstr. 5, 90409 Nürnberg
HRB 36809 (AG Nürnberg), Geschäftsführer: Felix Imendörffer
Reply to: