lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <b85af4b7-bf17-709f-cf45-d1fbc7573131@suse.de>
Date:   Wed, 31 Jul 2019 14:04:59 +0200
From:   Hannes Reinecke <hare@...e.de>
To:     Anthony Iliopoulos <ailiopoulos@...e.com>,
        Keith Busch <kbusch@...nel.org>, Jens Axboe <axboe@...com>,
        Christoph Hellwig <hch@....de>,
        Sagi Grimberg <sagi@...mberg.me>
Cc:     linux-kernel@...r.kernel.org, linux-nvme@...ts.infradead.org,
        Johannes Thumshirn <jthumshirn@...e.de>
Subject: Re: [PATCH] nvme/multipath: revalidate nvme_ns_head gendisk in
 nvme_validate_ns

On 7/29/19 2:40 PM, Anthony Iliopoulos wrote:
> When CONFIG_NVME_MULTIPATH is set, only the hidden gendisk associated
> with the per-controller ns is run through revalidate_disk when a
> rescan is triggered, while the visible blockdev never gets its size
> (bdev->bd_inode->i_size) updated to reflect any capacity changes that
> may have occurred.
> 
> This prevents online resizing of nvme block devices and in extension of
> any filesystems atop that will are unable to expand while mounted, as
> userspace relies on the blockdev size for obtaining the disk capacity
> (via BLKGETSIZE/64 ioctls).
> 
> Fix this by explicitly revalidating the actual namespace gendisk in
> addition to the per-controller gendisk, when multipath is enabled.
> 
> Signed-off-by: Anthony Iliopoulos <ailiopoulos@...e.com>
> ---
>  drivers/nvme/host/core.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
> index 8f3fbe5ca937..80c7a7ee240b 100644
> --- a/drivers/nvme/host/core.c
> +++ b/drivers/nvme/host/core.c
> @@ -1715,6 +1715,7 @@ static void __nvme_revalidate_disk(struct gendisk *disk, struct nvme_id_ns *id)
>  	if (ns->head->disk) {
>  		nvme_update_disk_info(ns->head->disk, ns, id);
>  		blk_queue_stack_limits(ns->head->disk->queue, ns->queue);
> +		revalidate_disk(ns->head->disk);
>  	}
>  #endif
>  }
> 
Reviewed-by: Hannes Reinecke <hare@...e.com>

Cheers,

Hannes
-- 
Dr. Hannes Reinecke		   Teamlead Storage & Networking
hare@...e.de			               +49 911 74053 688
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Felix Imendörffer, Mary Higgins, Sri Rasiah
HRB 21284 (AG Nürnberg)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ