Linux-NVME Archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH 19/26] nfblock: convert to blk_alloc_disk/blk_cleanup_disk
       [not found] ` <20210521055116.1053587-20-hch@lst.de>
@ 2021-05-21  8:37   ` Geert Uytterhoeven
  2021-05-23  8:21   ` Hannes Reinecke
  1 sibling, 0 replies; 45+ messages in thread
From: Geert Uytterhoeven @ 2021-05-21  8:37 UTC (permalink / raw
  To: Christoph Hellwig
  Cc: Jens Axboe, Chris Zankel, Max Filippov, Philipp Reisner,
	Lars Ellenberg, Jim Paris, Joshua Morris, Philip Kelleher,
	Minchan Kim, Nitin Gupta, Matias Bjorling, Coly Li, Mike Snitzer,
	Song Liu, Maxim Levitsky, Alex Dubov, Ulf Hansson, Dan Williams,
	Vishal Verma, Dave Jiang, Heiko Carstens, Vasily Gorbik,
	Christian Borntraeger, linux-block, dm-devel, linux-m68k,
	open list:TENSILICA XTENSA PORT (xtensa), Lars Ellenberg,
	linuxppc-dev, linux-bcache, linux-raid, Linux MMC List, nvdimm,
	linux-nvme, linux-s390

On Fri, May 21, 2021 at 7:52 AM Christoph Hellwig <hch@lst.de> wrote:
> Convert the nfblock driver to use the blk_alloc_disk and blk_cleanup_disk
> helpers to simplify gendisk and request_queue allocation.
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>

Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [dm-devel] [PATCH 01/26] block: refactor device number setup in __device_add_disk
       [not found] ` <20210521055116.1053587-2-hch@lst.de>
@ 2021-05-21 17:16   ` Luis Chamberlain
  2021-05-24  7:20     ` Christoph Hellwig
  2021-05-23  7:46   ` Hannes Reinecke
  1 sibling, 1 reply; 45+ messages in thread
From: Luis Chamberlain @ 2021-05-21 17:16 UTC (permalink / raw
  To: Christoph Hellwig
  Cc: Jens Axboe, Geert Uytterhoeven, Chris Zankel, Max Filippov,
	Philipp Reisner, Lars Ellenberg, Jim Paris, Joshua Morris,
	Philip Kelleher, Minchan Kim, Nitin Gupta, Matias Bjorling,
	Coly Li, Mike Snitzer, Song Liu, Maxim Levitsky, Alex Dubov,
	Ulf Hansson, Dan Williams, Vishal Verma, Dave Jiang,
	Heiko Carstens, Vasily Gorbik, Christian Borntraeger,
	linux-xtensa, linux-m68k, linux-raid, nvdimm, linux-s390,
	linux-mmc, linux-bcache, linux-nvme, linux-block, dm-devel,
	drbd-dev, linuxppc-dev

On Fri, May 21, 2021 at 07:50:51AM +0200, Christoph Hellwig wrote:
> diff --git a/block/genhd.c b/block/genhd.c
> index 39ca97b0edc6..2c00bc3261d9 100644
> --- a/block/genhd.c
> +++ b/block/genhd.c
> @@ -335,52 +335,22 @@ static int blk_mangle_minor(int minor)

<-- snip -->

> -int blk_alloc_devt(struct block_device *bdev, dev_t *devt)
> +int blk_alloc_ext_minor(void)
>  {
> -	struct gendisk *disk = bdev->bd_disk;
>  	int idx;
>  
> -	/* in consecutive minor range? */
> -	if (bdev->bd_partno < disk->minors) {
> -		*devt = MKDEV(disk->major, disk->first_minor + bdev->bd_partno);
> -		return 0;
> -	}
> -

It is not obviously clear to me, why this was part of add_disk()
path, and ...

> diff --git a/block/partitions/core.c b/block/partitions/core.c
> index dc60ecf46fe6..504297bdc8bf 100644
> --- a/block/partitions/core.c
> +++ b/block/partitions/core.c
> @@ -379,9 +380,15 @@ static struct block_device *add_partition(struct gendisk *disk, int partno,
>  	pdev->type = &part_type;
>  	pdev->parent = ddev;
>  
> -	err = blk_alloc_devt(bdev, &devt);
> -	if (err)
> -		goto out_put;
> +	/* in consecutive minor range? */
> +	if (bdev->bd_partno < disk->minors) {
> +		devt = MKDEV(disk->major, disk->first_minor + bdev->bd_partno);
> +	} else {
> +		err = blk_alloc_ext_minor();
> +		if (err < 0)
> +			goto out_put;
> +		devt = MKDEV(BLOCK_EXT_MAJOR, err);
> +	}
>  	pdev->devt = devt;
>  
>  	/* delay uevent until 'holders' subdir is created */

... and why we only add this here now.

Other than that, this looks like a super nice cleanup!

Reviewed-by: Luis Chamberlain <mcgrof@kernel.org>

  Luis

_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [dm-devel] [PATCH 02/26] block: move the DISK_MAX_PARTS sanity check into __device_add_disk
       [not found] ` <20210521055116.1053587-3-hch@lst.de>
@ 2021-05-21 17:18   ` Luis Chamberlain
  2021-05-23  7:48   ` Hannes Reinecke
  1 sibling, 0 replies; 45+ messages in thread
From: Luis Chamberlain @ 2021-05-21 17:18 UTC (permalink / raw
  To: Christoph Hellwig
  Cc: Jens Axboe, Geert Uytterhoeven, Chris Zankel, Max Filippov,
	Philipp Reisner, Lars Ellenberg, Jim Paris, Joshua Morris,
	Philip Kelleher, Minchan Kim, Nitin Gupta, Matias Bjorling,
	Coly Li, Mike Snitzer, Song Liu, Maxim Levitsky, Alex Dubov,
	Ulf Hansson, Dan Williams, Vishal Verma, Dave Jiang,
	Heiko Carstens, Vasily Gorbik, Christian Borntraeger,
	linux-xtensa, linux-m68k, linux-raid, nvdimm, linux-s390,
	linux-mmc, linux-bcache, linux-nvme, linux-block, dm-devel,
	drbd-dev, linuxppc-dev

On Fri, May 21, 2021 at 07:50:52AM +0200, Christoph Hellwig wrote:
> Keep this together with the first place that actually looks at
> ->minors and prepare for not passing a minors argument to
> alloc_disk.
> 
> Signed-off-by: Christoph Hellwig <hch@lst.de>

Reviewed-by: Luis Chamberlain <mcgrof@kernel.org>

  Luis

_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [dm-devel] [PATCH 03/26] block: automatically enable GENHD_FL_EXT_DEVT
       [not found] ` <20210521055116.1053587-4-hch@lst.de>
@ 2021-05-21 17:22   ` Luis Chamberlain
  2021-05-23  7:50   ` Hannes Reinecke
  1 sibling, 0 replies; 45+ messages in thread
From: Luis Chamberlain @ 2021-05-21 17:22 UTC (permalink / raw
  To: Christoph Hellwig
  Cc: Jens Axboe, Geert Uytterhoeven, Chris Zankel, Max Filippov,
	Philipp Reisner, Lars Ellenberg, Jim Paris, Joshua Morris,
	Philip Kelleher, Minchan Kim, Nitin Gupta, Matias Bjorling,
	Coly Li, Mike Snitzer, Song Liu, Maxim Levitsky, Alex Dubov,
	Ulf Hansson, Dan Williams, Vishal Verma, Dave Jiang,
	Heiko Carstens, Vasily Gorbik, Christian Borntraeger,
	linux-xtensa, linux-m68k, linux-raid, nvdimm, linux-s390,
	linux-mmc, linux-bcache, linux-nvme, linux-block, dm-devel,
	drbd-dev, linuxppc-dev

On Fri, May 21, 2021 at 07:50:53AM +0200, Christoph Hellwig wrote:
> Automatically set the GENHD_FL_EXT_DEVT flag for all disks allocated
> without an explicit number of minors.  This is what all new block
> drivers should do, so make sure it is the default without boilerplate
> code.
> 
> Signed-off-by: Christoph Hellwig <hch@lst.de>

Reviewed-by: Luis Chamberlain <mcgrof@kernel.org>

  Luis

_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [dm-devel] [PATCH 04/26] block: add a flag to make put_disk on partially initalized disks safer
       [not found] ` <20210521055116.1053587-5-hch@lst.de>
@ 2021-05-21 17:28   ` Luis Chamberlain
  2021-05-23  7:54   ` Hannes Reinecke
  1 sibling, 0 replies; 45+ messages in thread
From: Luis Chamberlain @ 2021-05-21 17:28 UTC (permalink / raw
  To: Christoph Hellwig
  Cc: Jens Axboe, Geert Uytterhoeven, Chris Zankel, Max Filippov,
	Philipp Reisner, Lars Ellenberg, Jim Paris, Joshua Morris,
	Philip Kelleher, Minchan Kim, Nitin Gupta, Matias Bjorling,
	Coly Li, Mike Snitzer, Song Liu, Maxim Levitsky, Alex Dubov,
	Ulf Hansson, Dan Williams, Vishal Verma, Dave Jiang,
	Heiko Carstens, Vasily Gorbik, Christian Borntraeger,
	linux-xtensa, linux-m68k, linux-raid, nvdimm, linux-s390,
	linux-mmc, linux-bcache, linux-nvme, linux-block, dm-devel,
	drbd-dev, linuxppc-dev

On Fri, May 21, 2021 at 07:50:54AM +0200, Christoph Hellwig wrote:
> Add a flag to indicate that __device_add_disk did grab a queue reference
> so that disk_release only drops it if we actually had it.  This sort
> out one of the major pitfals with partially initialized gendisk that
> a lot of drivers did get wrong or still do.
> 
> Signed-off-by: Christoph Hellwig <hch@lst.de>

Reviewed-by: Luis Chamberlain <mcgrof@kernel.org>

  Luis

_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [dm-devel] [PATCH 05/26] block: add blk_alloc_disk and blk_cleanup_disk APIs
       [not found] ` <20210521055116.1053587-6-hch@lst.de>
@ 2021-05-21 17:44   ` Luis Chamberlain
  2021-05-24  7:24     ` Christoph Hellwig
  2021-05-23  7:55   ` Hannes Reinecke
  1 sibling, 1 reply; 45+ messages in thread
From: Luis Chamberlain @ 2021-05-21 17:44 UTC (permalink / raw
  To: Christoph Hellwig
  Cc: Jens Axboe, Geert Uytterhoeven, Chris Zankel, Max Filippov,
	Philipp Reisner, Lars Ellenberg, Jim Paris, Joshua Morris,
	Philip Kelleher, Minchan Kim, Nitin Gupta, Matias Bjorling,
	Coly Li, Mike Snitzer, Song Liu, Maxim Levitsky, Alex Dubov,
	Ulf Hansson, Dan Williams, Vishal Verma, Dave Jiang,
	Heiko Carstens, Vasily Gorbik, Christian Borntraeger,
	linux-xtensa, linux-m68k, linux-raid, nvdimm, linux-s390,
	linux-mmc, linux-bcache, linux-nvme, linux-block, dm-devel,
	drbd-dev, linuxppc-dev

On Fri, May 21, 2021 at 07:50:55AM +0200, Christoph Hellwig wrote:
> Add two new APIs to allocate and free a gendisk including the
> request_queue for use with BIO based drivers.  This is to avoid
> boilerplate code in drivers.
> 
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---
>  block/genhd.c         | 35 +++++++++++++++++++++++++++++++++++
>  include/linux/genhd.h | 22 ++++++++++++++++++++++
>  2 files changed, 57 insertions(+)
> 
> diff --git a/block/genhd.c b/block/genhd.c
> index e4974af3d729..6d4ce962866d 100644
> --- a/block/genhd.c
> +++ b/block/genhd.c
> @@ -1302,6 +1302,25 @@ struct gendisk *__alloc_disk_node(int minors, int node_id)
>  }
>  EXPORT_SYMBOL(__alloc_disk_node);
>  
> +struct gendisk *__blk_alloc_disk(int node)
> +{
> +	struct request_queue *q;
> +	struct gendisk *disk;
> +
> +	q = blk_alloc_queue(node);
> +	if (!q)
> +		return NULL;
> +
> +	disk = __alloc_disk_node(0, node);
> +	if (!disk) {
> +		blk_cleanup_queue(q);
> +		return NULL;
> +	}
> +	disk->queue = q;
> +	return disk;
> +}
> +EXPORT_SYMBOL(__blk_alloc_disk);

Its not obvious to me why using this new API requires you then to
set minors explicitly to 1, and yet here underneath we see the minors
argument passed is 0.

Nor is it clear from the documentation.

  Luis

_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [PATCH 01/26] block: refactor device number setup in __device_add_disk
       [not found] ` <20210521055116.1053587-2-hch@lst.de>
  2021-05-21 17:16   ` [dm-devel] [PATCH 01/26] block: refactor device number setup in __device_add_disk Luis Chamberlain
@ 2021-05-23  7:46   ` Hannes Reinecke
  2021-05-24  7:22     ` Christoph Hellwig
  1 sibling, 1 reply; 45+ messages in thread
From: Hannes Reinecke @ 2021-05-23  7:46 UTC (permalink / raw
  To: Christoph Hellwig, Jens Axboe, Geert Uytterhoeven, Chris Zankel,
	Max Filippov, Philipp Reisner, Lars Ellenberg, Jim Paris,
	Joshua Morris, Philip Kelleher, Minchan Kim, Nitin Gupta,
	Matias Bjorling, Coly Li, Mike Snitzer, Song Liu, Maxim Levitsky,
	Alex Dubov, Ulf Hansson, Dan Williams, Vishal Verma, Dave Jiang,
	Heiko Carstens, Vasily Gorbik, Christian Borntraeger
  Cc: linux-block, dm-devel, linux-m68k, linux-xtensa, drbd-dev,
	linuxppc-dev, linux-bcache, linux-raid, linux-mmc, nvdimm,
	linux-nvme, linux-s390

On 5/21/21 7:50 AM, Christoph Hellwig wrote:
> Untangle the mess around blk_alloc_devt by moving the check for
> the used allocation scheme into the callers.
> 
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---
>   block/blk.h             |  4 +-
>   block/genhd.c           | 96 ++++++++++++++++-------------------------
>   block/partitions/core.c | 15 +++++--
>   3 files changed, 49 insertions(+), 66 deletions(-)
> 
... and also fixes an issue with GENHD_FL_UP remained set in an error 
path in __device_add_disk().

Reviewed-by: Hannes Reinecke <hare@suse.de>

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

_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [PATCH 02/26] block: move the DISK_MAX_PARTS sanity check into __device_add_disk
       [not found] ` <20210521055116.1053587-3-hch@lst.de>
  2021-05-21 17:18   ` [dm-devel] [PATCH 02/26] block: move the DISK_MAX_PARTS sanity check into __device_add_disk Luis Chamberlain
@ 2021-05-23  7:48   ` Hannes Reinecke
  1 sibling, 0 replies; 45+ messages in thread
From: Hannes Reinecke @ 2021-05-23  7:48 UTC (permalink / raw
  To: Christoph Hellwig, Jens Axboe, Geert Uytterhoeven, Chris Zankel,
	Max Filippov, Philipp Reisner, Lars Ellenberg, Jim Paris,
	Philip Kelleher, Minchan Kim, Nitin Gupta, Matias Bjorling,
	Coly Li, Mike Snitzer, Song Liu, Maxim Levitsky, Alex Dubov,
	Ulf Hansson, Dan Williams, Vishal Verma, Dave Jiang,
	Heiko Carstens, Vasily Gorbik, Christian Borntraeger
  Cc: linux-block, dm-devel, linux-m68k, linux-xtensa, drbd-dev,
	linuxppc-dev, linux-bcache, linux-raid, linux-mmc, nvdimm,
	linux-nvme, linux-s390

On 5/21/21 7:50 AM, Christoph Hellwig wrote:
> Keep this together with the first place that actually looks at
> ->minors and prepare for not passing a minors argument to
> alloc_disk.
> 
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---
>   block/genhd.c | 13 ++++++-------
>   1 file changed, 6 insertions(+), 7 deletions(-)
> 
Reviewed-by: Hannes Reinecke <hare@suse.de>

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

_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [PATCH 03/26] block: automatically enable GENHD_FL_EXT_DEVT
       [not found] ` <20210521055116.1053587-4-hch@lst.de>
  2021-05-21 17:22   ` [dm-devel] [PATCH 03/26] block: automatically enable GENHD_FL_EXT_DEVT Luis Chamberlain
@ 2021-05-23  7:50   ` Hannes Reinecke
  1 sibling, 0 replies; 45+ messages in thread
From: Hannes Reinecke @ 2021-05-23  7:50 UTC (permalink / raw
  To: Christoph Hellwig, Jens Axboe, Geert Uytterhoeven, Chris Zankel,
	Max Filippov, Philipp Reisner, Lars Ellenberg, Jim Paris,
	Philip Kelleher, Minchan Kim, Nitin Gupta, Matias Bjorling,
	Coly Li, Mike Snitzer, Song Liu, Maxim Levitsky, Alex Dubov,
	Ulf Hansson, Dan Williams, Vishal Verma, Dave Jiang,
	Heiko Carstens, Vasily Gorbik, Christian Borntraeger
  Cc: linux-block, dm-devel, linux-m68k, linux-xtensa, drbd-dev,
	linuxppc-dev, linux-bcache, linux-raid, linux-mmc, nvdimm,
	linux-nvme, linux-s390

On 5/21/21 7:50 AM, Christoph Hellwig wrote:
> Automatically set the GENHD_FL_EXT_DEVT flag for all disks allocated
> without an explicit number of minors.  This is what all new block
> drivers should do, so make sure it is the default without boilerplate
> code.
> 
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---
>   block/genhd.c                    | 2 +-
>   block/partitions/core.c          | 4 ----
>   drivers/block/n64cart.c          | 2 +-
>   drivers/lightnvm/core.c          | 1 -
>   drivers/memstick/core/ms_block.c | 1 -
>   drivers/nvdimm/blk.c             | 1 -
>   drivers/nvdimm/btt.c             | 1 -
>   drivers/nvdimm/pmem.c            | 1 -
>   drivers/nvme/host/core.c         | 1 -
>   drivers/nvme/host/multipath.c    | 1 -
>   10 files changed, 2 insertions(+), 13 deletions(-)
> 
Reviewed-by: Hannes Reinecke <hare@suse.de>

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

_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [PATCH 04/26] block: add a flag to make put_disk on partially initalized disks safer
       [not found] ` <20210521055116.1053587-5-hch@lst.de>
  2021-05-21 17:28   ` [dm-devel] [PATCH 04/26] block: add a flag to make put_disk on partially initalized disks safer Luis Chamberlain
@ 2021-05-23  7:54   ` Hannes Reinecke
  1 sibling, 0 replies; 45+ messages in thread
From: Hannes Reinecke @ 2021-05-23  7:54 UTC (permalink / raw
  To: Christoph Hellwig, Jens Axboe, Geert Uytterhoeven, Chris Zankel,
	Max Filippov, Philipp Reisner, Lars Ellenberg, Jim Paris,
	Philip Kelleher, Minchan Kim, Nitin Gupta, Matias Bjorling,
	Coly Li, Mike Snitzer, Song Liu, Maxim Levitsky, Alex Dubov,
	Ulf Hansson, Dan Williams, Vishal Verma, Dave Jiang,
	Heiko Carstens, Vasily Gorbik, Christian Borntraeger
  Cc: linux-block, dm-devel, linux-m68k, linux-xtensa, drbd-dev,
	linuxppc-dev, linux-bcache, linux-raid, linux-mmc, nvdimm,
	linux-nvme, linux-s390

On 5/21/21 7:50 AM, Christoph Hellwig wrote:
> Add a flag to indicate that __device_add_disk did grab a queue reference
> so that disk_release only drops it if we actually had it.  This sort
> out one of the major pitfals with partially initialized gendisk that
                        pitfalls

> a lot of drivers did get wrong or still do.
> 
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---
>   block/genhd.c         | 7 +++++--
>   include/linux/genhd.h | 1 +
>   2 files changed, 6 insertions(+), 2 deletions(-)
> 
Reviewed-by: Hannes Reinecke <hare@suse.de>

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

_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [PATCH 05/26] block: add blk_alloc_disk and blk_cleanup_disk APIs
       [not found] ` <20210521055116.1053587-6-hch@lst.de>
  2021-05-21 17:44   ` [dm-devel] [PATCH 05/26] block: add blk_alloc_disk and blk_cleanup_disk APIs Luis Chamberlain
@ 2021-05-23  7:55   ` Hannes Reinecke
  1 sibling, 0 replies; 45+ messages in thread
From: Hannes Reinecke @ 2021-05-23  7:55 UTC (permalink / raw
  To: Christoph Hellwig, Jens Axboe, Geert Uytterhoeven, Chris Zankel,
	Max Filippov, Philipp Reisner, Lars Ellenberg, Jim Paris,
	Joshua Morris, Philip Kelleher, Minchan Kim, Nitin Gupta,
	Matias Bjorling, Coly Li, Mike Snitzer, Song Liu, Maxim Levitsky,
	Alex Dubov, Ulf Hansson, Dan Williams, Vishal Verma, Dave Jiang,
	Heiko Carstens, Vasily Gorbik, Christian Borntraeger
  Cc: linux-block, dm-devel, linux-m68k, linux-xtensa, drbd-dev,
	linuxppc-dev, linux-bcache, linux-raid, linux-mmc, nvdimm,
	linux-nvme, linux-s390

On 5/21/21 7:50 AM, Christoph Hellwig wrote:
> Add two new APIs to allocate and free a gendisk including the
> request_queue for use with BIO based drivers.  This is to avoid
> boilerplate code in drivers.
> 
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---
>   block/genhd.c         | 35 +++++++++++++++++++++++++++++++++++
>   include/linux/genhd.h | 22 ++++++++++++++++++++++
>   2 files changed, 57 insertions(+)
> 
Reviewed-by: Hannes Reinecke <hare@suse.de>

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

_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [PATCH 06/26] brd: convert to blk_alloc_disk/blk_cleanup_disk
       [not found] ` <20210521055116.1053587-7-hch@lst.de>
@ 2021-05-23  7:58   ` Hannes Reinecke
  2021-05-24  7:24     ` Christoph Hellwig
  0 siblings, 1 reply; 45+ messages in thread
From: Hannes Reinecke @ 2021-05-23  7:58 UTC (permalink / raw
  To: Christoph Hellwig, Jens Axboe, Geert Uytterhoeven, Chris Zankel,
	Max Filippov, Philipp Reisner, Lars Ellenberg, Jim Paris,
	Joshua Morris, Philip Kelleher, Minchan Kim, Nitin Gupta,
	Matias Bjorling, Coly Li, Mike Snitzer, Song Liu, Maxim Levitsky,
	Alex Dubov, Ulf Hansson, Dan Williams, Vishal Verma, Dave Jiang,
	Heiko Carstens, Vasily Gorbik, Christian Borntraeger
  Cc: linux-block, dm-devel, linux-m68k, linux-xtensa, drbd-dev,
	linuxppc-dev, linux-bcache, linux-raid, linux-mmc, nvdimm,
	linux-nvme, linux-s390

On 5/21/21 7:50 AM, Christoph Hellwig wrote:
> Convert the brd driver to use the blk_alloc_disk and blk_cleanup_disk
> helpers to simplify gendisk and request_queue allocation.  This also
> allows to remove the request_queue pointer in struct request_queue,
> and to simplify the initialization as blk_cleanup_disk can be called
> on any disk returned from blk_alloc_disk.
> 
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---
>   drivers/block/brd.c | 94 ++++++++++++++++-----------------------------
>   1 file changed, 33 insertions(+), 61 deletions(-)
> 
> diff --git a/drivers/block/brd.c b/drivers/block/brd.c
> index 7562cf30b14e..95694113e38e 100644
> --- a/drivers/block/brd.c
> +++ b/drivers/block/brd.c
> @@ -38,9 +38,7 @@
>    * device).
>    */
>   struct brd_device {
> -	int		brd_number;
> -
> -	struct request_queue	*brd_queue;
> +	int			brd_number;
>   	struct gendisk		*brd_disk;
>   	struct list_head	brd_list;
>   
> @@ -372,7 +370,7 @@ static LIST_HEAD(brd_devices);
>   static DEFINE_MUTEX(brd_devices_mutex);
>   static struct dentry *brd_debugfs_dir;
>   
> -static struct brd_device *brd_alloc(int i)
> +static int brd_alloc(int i)
>   {
>   	struct brd_device *brd;
>   	struct gendisk *disk;
> @@ -380,64 +378,55 @@ static struct brd_device *brd_alloc(int i)
>   
>   	brd = kzalloc(sizeof(*brd), GFP_KERNEL);
>   	if (!brd)
> -		goto out;
> +		return -ENOMEM;
>   	brd->brd_number		= i;
>   	spin_lock_init(&brd->brd_lock);
>   	INIT_RADIX_TREE(&brd->brd_pages, GFP_ATOMIC);
>   
> -	brd->brd_queue = blk_alloc_queue(NUMA_NO_NODE);
> -	if (!brd->brd_queue)
> -		goto out_free_dev;
> -
>   	snprintf(buf, DISK_NAME_LEN, "ram%d", i);
>   	if (!IS_ERR_OR_NULL(brd_debugfs_dir))
>   		debugfs_create_u64(buf, 0444, brd_debugfs_dir,
>   				&brd->brd_nr_pages);
>   
> -	/* This is so fdisk will align partitions on 4k, because of
> -	 * direct_access API needing 4k alignment, returning a PFN
> -	 * (This is only a problem on very small devices <= 4M,
> -	 *  otherwise fdisk will align on 1M. Regardless this call
> -	 *  is harmless)
> -	 */
> -	blk_queue_physical_block_size(brd->brd_queue, PAGE_SIZE);
> -	disk = brd->brd_disk = alloc_disk(max_part);
> +	disk = brd->brd_disk = blk_alloc_disk(NUMA_NO_NODE);
>   	if (!disk)
> -		goto out_free_queue;
> +		goto out_free_dev;
> +
>   	disk->major		= RAMDISK_MAJOR;
>   	disk->first_minor	= i * max_part;
> +	disk->minors		= max_part;
>   	disk->fops		= &brd_fops;
>   	disk->private_data	= brd;
>   	disk->flags		= GENHD_FL_EXT_DEVT;
>   	strlcpy(disk->disk_name, buf, DISK_NAME_LEN);
>   	set_capacity(disk, rd_size * 2);
> +	
> +	/*
> +	 * This is so fdisk will align partitions on 4k, because of
> +	 * direct_access API needing 4k alignment, returning a PFN
> +	 * (This is only a problem on very small devices <= 4M,
> +	 *  otherwise fdisk will align on 1M. Regardless this call
> +	 *  is harmless)
> +	 */
> +	blk_queue_physical_block_size(disk->queue, PAGE_SIZE);
>   

Maybe converting the comment to refer to 'PAGE_SIZE' instead of 4k while 
you're at it ...

>   	/* Tell the block layer that this is not a rotational device */
> -	blk_queue_flag_set(QUEUE_FLAG_NONROT, brd->brd_queue);
> -	blk_queue_flag_clear(QUEUE_FLAG_ADD_RANDOM, brd->brd_queue);
> +	blk_queue_flag_set(QUEUE_FLAG_NONROT, disk->queue);
> +	blk_queue_flag_clear(QUEUE_FLAG_ADD_RANDOM, disk->queue);
> +	add_disk(disk);
> +	list_add_tail(&brd->brd_list, &brd_devices);
>   
> -	return brd;
> +	return 0;
>   
> -out_free_queue:
> -	blk_cleanup_queue(brd->brd_queue);
>   out_free_dev:
>   	kfree(brd);
> -out:
> -	return NULL;
> -}
> -
> -static void brd_free(struct brd_device *brd)
> -{
> -	put_disk(brd->brd_disk);
> -	blk_cleanup_queue(brd->brd_queue);
> -	brd_free_pages(brd);
> -	kfree(brd);
> +	return -ENOMEM;
>   }
>   
>   static void brd_probe(dev_t dev)
>   {
> -	struct brd_device *brd;
>   	int i = MINOR(dev) / max_part;
> +	struct brd_device *brd;
>   
>   	mutex_lock(&brd_devices_mutex);
>   	list_for_each_entry(brd, &brd_devices, brd_list) {
> @@ -445,13 +434,7 @@ static void brd_probe(dev_t dev)
>   			goto out_unlock;
>   	}
>   
> -	brd = brd_alloc(i);
> -	if (brd) {
> -		brd->brd_disk->queue = brd->brd_queue;
> -		add_disk(brd->brd_disk);
> -		list_add_tail(&brd->brd_list, &brd_devices);
> -	}
> -
> +	brd_alloc(i);
>   out_unlock:
>   	mutex_unlock(&brd_devices_mutex);
>   }
> @@ -460,7 +443,9 @@ static void brd_del_one(struct brd_device *brd)
>   {
>   	list_del(&brd->brd_list);
>   	del_gendisk(brd->brd_disk);
> -	brd_free(brd);
> +	blk_cleanup_disk(brd->brd_disk);
> +	brd_free_pages(brd);
> +	kfree(brd);
>   }
>   
>   static inline void brd_check_and_reset_par(void)
> @@ -485,7 +470,7 @@ static inline void brd_check_and_reset_par(void)
>   static int __init brd_init(void)
>   {
>   	struct brd_device *brd, *next;
> -	int i;
> +	int err, i;
>   
>   	/*
>   	 * brd module now has a feature to instantiate underlying device
> @@ -511,22 +496,11 @@ static int __init brd_init(void)
>   
>   	mutex_lock(&brd_devices_mutex);
>   	for (i = 0; i < rd_nr; i++) {
> -		brd = brd_alloc(i);
> -		if (!brd)
> +		err = brd_alloc(i);
> +		if (err)
>   			goto out_free;
> -		list_add_tail(&brd->brd_list, &brd_devices);
>   	}
>   
> -	/* point of no return */
> -
> -	list_for_each_entry(brd, &brd_devices, brd_list) {
> -		/*
> -		 * associate with queue just before adding disk for
> -		 * avoiding to mess up failure path
> -		 */
> -		brd->brd_disk->queue = brd->brd_queue;
> -		add_disk(brd->brd_disk);
> -	}
>   	mutex_unlock(&brd_devices_mutex);
>   
>   	pr_info("brd: module loaded\n");
> @@ -535,15 +509,13 @@ static int __init brd_init(void)
>   out_free:
>   	debugfs_remove_recursive(brd_debugfs_dir);
>   
> -	list_for_each_entry_safe(brd, next, &brd_devices, brd_list) {
> -		list_del(&brd->brd_list);
> -		brd_free(brd);
> -	}
> +	list_for_each_entry_safe(brd, next, &brd_devices, brd_list)
> +		brd_del_one(brd);
>   	mutex_unlock(&brd_devices_mutex);
>   	unregister_blkdev(RAMDISK_MAJOR, "ramdisk");
>   
>   	pr_info("brd: module NOT loaded !!!\n");
> -	return -ENOMEM;
> +	return err;
>   }
>   
>   static void __exit brd_exit(void)
> 
Other than that:

Reviewed-by: Hannes Reinecke <hare@suse.de>

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

_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [PATCH 07/26] drbd: convert to blk_alloc_disk/blk_cleanup_disk
       [not found] ` <20210521055116.1053587-8-hch@lst.de>
@ 2021-05-23  7:59   ` Hannes Reinecke
  0 siblings, 0 replies; 45+ messages in thread
From: Hannes Reinecke @ 2021-05-23  7:59 UTC (permalink / raw
  To: Christoph Hellwig, Jens Axboe, Geert Uytterhoeven, Chris Zankel,
	Max Filippov, Philipp Reisner, Lars Ellenberg, Jim Paris,
	Philip Kelleher, Minchan Kim, Nitin Gupta, Matias Bjorling,
	Coly Li, Mike Snitzer, Song Liu, Maxim Levitsky, Alex Dubov,
	Ulf Hansson, Dan Williams, Vishal Verma, Dave Jiang,
	Heiko Carstens, Vasily Gorbik, Christian Borntraeger
  Cc: linux-block, dm-devel, linux-m68k, linux-xtensa, drbd-dev,
	linuxppc-dev, linux-bcache, linux-raid, linux-mmc, nvdimm,
	linux-nvme, linux-s390

On 5/21/21 7:50 AM, Christoph Hellwig wrote:
> Convert the drbd driver to use the blk_alloc_disk and blk_cleanup_disk
> helpers to simplify gendisk and request_queue allocation.
> 
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---
>   drivers/block/drbd/drbd_main.c | 23 ++++++++---------------
>   1 file changed, 8 insertions(+), 15 deletions(-)
> 
Reviewed-by: Hannes Reinecke <hare@suse.de>

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

_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [PATCH 08/26] pktcdvd: convert to blk_alloc_disk/blk_cleanup_disk
       [not found] ` <20210521055116.1053587-9-hch@lst.de>
@ 2021-05-23  8:00   ` Hannes Reinecke
  0 siblings, 0 replies; 45+ messages in thread
From: Hannes Reinecke @ 2021-05-23  8:00 UTC (permalink / raw
  To: Christoph Hellwig, Jens Axboe, Geert Uytterhoeven, Chris Zankel,
	Max Filippov, Philipp Reisner, Lars Ellenberg, Jim Paris,
	Philip Kelleher, Minchan Kim, Nitin Gupta, Matias Bjorling,
	Coly Li, Mike Snitzer, Song Liu, Maxim Levitsky, Alex Dubov,
	Ulf Hansson, Dan Williams, Vishal Verma, Dave Jiang,
	Heiko Carstens, Vasily Gorbik, Christian Borntraeger
  Cc: linux-block, dm-devel, linux-m68k, linux-xtensa, drbd-dev,
	linuxppc-dev, linux-bcache, linux-raid, linux-mmc, nvdimm,
	linux-nvme, linux-s390

On 5/21/21 7:50 AM, Christoph Hellwig wrote:
> Convert the pktcdvd driver to use the blk_alloc_disk and blk_cleanup_disk
> helpers to simplify gendisk and request_queue allocation.
> 
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---
>   drivers/block/pktcdvd.c | 11 ++++-------
>   1 file changed, 4 insertions(+), 7 deletions(-)
> 
Reviewed-by: Hannes Reinecke <hare@suse.de>

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

_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [PATCH 09/26] rsxx: convert to blk_alloc_disk/blk_cleanup_disk
       [not found] ` <20210521055116.1053587-10-hch@lst.de>
@ 2021-05-23  8:01   ` Hannes Reinecke
  0 siblings, 0 replies; 45+ messages in thread
From: Hannes Reinecke @ 2021-05-23  8:01 UTC (permalink / raw
  To: Christoph Hellwig, Jens Axboe, Geert Uytterhoeven, Chris Zankel,
	Max Filippov, Philipp Reisner, Lars Ellenberg, Jim Paris,
	Philip Kelleher, Minchan Kim, Nitin Gupta, Matias Bjorling,
	Coly Li, Mike Snitzer, Song Liu, Maxim Levitsky, Alex Dubov,
	Ulf Hansson, Dan Williams, Vishal Verma, Dave Jiang,
	Heiko Carstens, Vasily Gorbik, Christian Borntraeger
  Cc: linux-block, dm-devel, linux-m68k, linux-xtensa, drbd-dev,
	linuxppc-dev, linux-bcache, linux-raid, linux-mmc, nvdimm,
	linux-nvme, linux-s390

On 5/21/21 7:50 AM, Christoph Hellwig wrote:
> Convert the rsxx driver to use the blk_alloc_disk and blk_cleanup_disk
> helpers to simplify gendisk and request_queue allocation.
> 
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---
>   drivers/block/rsxx/dev.c       | 39 +++++++++++++---------------------
>   drivers/block/rsxx/rsxx_priv.h |  1 -
>   2 files changed, 15 insertions(+), 25 deletions(-)
> Reviewed-by: Hannes Reinecke <hare@suse.de>

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

_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [PATCH 10/26] zram: convert to blk_alloc_disk/blk_cleanup_disk
       [not found] ` <20210521055116.1053587-11-hch@lst.de>
@ 2021-05-23  8:01   ` Hannes Reinecke
  0 siblings, 0 replies; 45+ messages in thread
From: Hannes Reinecke @ 2021-05-23  8:01 UTC (permalink / raw
  To: Christoph Hellwig, Jens Axboe, Geert Uytterhoeven, Chris Zankel,
	Max Filippov, Philipp Reisner, Lars Ellenberg, Jim Paris,
	Joshua Morris, Philip Kelleher, Minchan Kim, Nitin Gupta,
	Matias Bjorling, Coly Li, Mike Snitzer, Song Liu, Maxim Levitsky,
	Alex Dubov, Ulf Hansson, Dan Williams, Vishal Verma, Dave Jiang,
	Heiko Carstens, Vasily Gorbik, Christian Borntraeger
  Cc: linux-block, dm-devel, linux-m68k, linux-xtensa, drbd-dev,
	linuxppc-dev, linux-bcache, linux-raid, linux-mmc, nvdimm,
	linux-nvme, linux-s390

On 5/21/21 7:51 AM, Christoph Hellwig wrote:
> Convert the zram driver to use the blk_alloc_disk and blk_cleanup_disk
> helpers to simplify gendisk and request_queue allocation.
> 
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---
>   drivers/block/zram/zram_drv.c | 19 ++++---------------
>   1 file changed, 4 insertions(+), 15 deletions(-)
> Reviewed-by: Hannes Reinecke <hare@suse.de>

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

_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [PATCH 11/26] lightnvm: convert to blk_alloc_disk/blk_cleanup_disk
       [not found] ` <20210521055116.1053587-12-hch@lst.de>
@ 2021-05-23  8:02   ` Hannes Reinecke
  0 siblings, 0 replies; 45+ messages in thread
From: Hannes Reinecke @ 2021-05-23  8:02 UTC (permalink / raw
  To: Christoph Hellwig, Jens Axboe, Geert Uytterhoeven, Chris Zankel,
	Max Filippov, Philipp Reisner, Lars Ellenberg, Jim Paris,
	Philip Kelleher, Minchan Kim, Nitin Gupta, Matias Bjorling,
	Coly Li, Mike Snitzer, Song Liu, Maxim Levitsky, Alex Dubov,
	Ulf Hansson, Dan Williams, Vishal Verma, Dave Jiang,
	Heiko Carstens, Vasily Gorbik, Christian Borntraeger
  Cc: linux-block, dm-devel, linux-m68k, linux-xtensa, drbd-dev,
	linuxppc-dev, linux-bcache, linux-raid, linux-mmc, nvdimm,
	linux-nvme, linux-s390

On 5/21/21 7:51 AM, Christoph Hellwig wrote:
> Convert the lightnvm driver to use the blk_alloc_disk and blk_cleanup_disk
> helpers to simplify gendisk and request_queue allocation.
> 
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---
>   drivers/lightnvm/core.c | 23 +++++------------------
>   1 file changed, 5 insertions(+), 18 deletions(-)
> Reviewed-by: Hannes Reinecke <hare@suse.de>

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

_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [PATCH 12/26] bcache: convert to blk_alloc_disk/blk_cleanup_disk
       [not found] ` <20210521055116.1053587-13-hch@lst.de>
@ 2021-05-23  8:04   ` Hannes Reinecke
  2021-05-23 16:20   ` Coly Li
  1 sibling, 0 replies; 45+ messages in thread
From: Hannes Reinecke @ 2021-05-23  8:04 UTC (permalink / raw
  To: Christoph Hellwig, Jens Axboe, Geert Uytterhoeven, Chris Zankel,
	Max Filippov, Philipp Reisner, Lars Ellenberg, Jim Paris,
	Philip Kelleher, Minchan Kim, Nitin Gupta, Matias Bjorling,
	Coly Li, Mike Snitzer, Song Liu, Maxim Levitsky, Alex Dubov,
	Ulf Hansson, Dan Williams, Vishal Verma, Dave Jiang,
	Heiko Carstens, Vasily Gorbik, Christian Borntraeger
  Cc: linux-block, dm-devel, linux-m68k, linux-xtensa, drbd-dev,
	linuxppc-dev, linux-bcache, linux-raid, linux-mmc, nvdimm,
	linux-nvme, linux-s390

On 5/21/21 7:51 AM, Christoph Hellwig wrote:
> Convert the bcache driver to use the blk_alloc_disk and blk_cleanup_disk
> helpers to simplify gendisk and request_queue allocation.
> 
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---
>   drivers/md/bcache/super.c | 15 ++++-----------
>   1 file changed, 4 insertions(+), 11 deletions(-)
> 
Reviewed-by: Hannes Reinecke <hare@suse.de>

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

_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [PATCH 13/26] dm: convert to blk_alloc_disk/blk_cleanup_disk
       [not found] ` <20210521055116.1053587-14-hch@lst.de>
@ 2021-05-23  8:10   ` Hannes Reinecke
  2021-05-24  7:25     ` Christoph Hellwig
  0 siblings, 1 reply; 45+ messages in thread
From: Hannes Reinecke @ 2021-05-23  8:10 UTC (permalink / raw
  To: Christoph Hellwig, Jens Axboe, Geert Uytterhoeven, Chris Zankel,
	Max Filippov, Philipp Reisner, Lars Ellenberg, Jim Paris,
	Philip Kelleher, Minchan Kim, Nitin Gupta, Matias Bjorling,
	Coly Li, Mike Snitzer, Song Liu, Maxim Levitsky, Alex Dubov,
	Ulf Hansson, Dan Williams, Vishal Verma, Dave Jiang,
	Heiko Carstens, Vasily Gorbik, Christian Borntraeger
  Cc: linux-block, dm-devel, linux-m68k, linux-xtensa, drbd-dev,
	linuxppc-dev, linux-bcache, linux-raid, linux-mmc, nvdimm,
	linux-nvme, linux-s390

On 5/21/21 7:51 AM, Christoph Hellwig wrote:
> Convert the dm driver to use the blk_alloc_disk and blk_cleanup_disk
> helpers to simplify gendisk and request_queue allocation.
> 
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---
>   drivers/md/dm.c | 16 +++++++---------
>   1 file changed, 7 insertions(+), 9 deletions(-)
> 
> diff --git a/drivers/md/dm.c b/drivers/md/dm.c
> index ca2aedd8ee7d..3c7c2d257018 100644
> --- a/drivers/md/dm.c
> +++ b/drivers/md/dm.c
> @@ -1801,13 +1801,13 @@ static void cleanup_mapped_device(struct mapped_device *md)
>   		md->disk->private_data = NULL;
>   		spin_unlock(&_minor_lock);
>   		del_gendisk(md->disk);
> -		put_disk(md->disk);
>   	}
>   
> -	if (md->queue) {
> +	if (md->queue)
>   		dm_queue_destroy_keyslot_manager(md->queue);
> -		blk_cleanup_queue(md->queue);
> -	}
> +
> +	if (md->disk)
> +		blk_cleanup_disk(md->disk);
>   
>   	cleanup_srcu_struct(&md->io_barrier);
>   

Can't these conditionals be merged into a single 'if (md->disk)'?
Eg like:

	if (md->disk) {
		spin_lock(&_minor_lock);
		md->disk->private_data = NULL;
		spin_unlock(&_minor_lock);
		del_gendisk(md->disk);
		dm_queue_destroy_keyslot_manager(md->queue);
		blk_cleanup_disk(md->queue);
	}

We're now always allocating 'md->disk' and 'md->queue' together,
so how can we end up in a situation where one is set without the other?

> @@ -1869,13 +1869,10 @@ static struct mapped_device *alloc_dev(int minor)
>   	 * established. If request-based table is loaded: blk-mq will
>   	 * override accordingly.
>   	 */
> -	md->queue = blk_alloc_queue(numa_node_id);
> -	if (!md->queue)
> -		goto bad;
> -
> -	md->disk = alloc_disk_node(1, md->numa_node_id);
> +	md->disk = blk_alloc_disk(md->numa_node_id);
>   	if (!md->disk)
>   		goto bad;
> +	md->queue = md->disk->queue;
>   
>   	init_waitqueue_head(&md->wait);
>   	INIT_WORK(&md->work, dm_wq_work);
> @@ -1888,6 +1885,7 @@ static struct mapped_device *alloc_dev(int minor)
>   
>   	md->disk->major = _major;
>   	md->disk->first_minor = minor;
> +	md->disk->minors = 1;
>   	md->disk->fops = &dm_blk_dops;
>   	md->disk->queue = md->queue;
>   	md->disk->private_data = md;
> 
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

_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [PATCH 14/26] md: convert to blk_alloc_disk/blk_cleanup_disk
       [not found] ` <20210521055116.1053587-15-hch@lst.de>
@ 2021-05-23  8:12   ` Hannes Reinecke
  2021-05-24  7:26     ` Christoph Hellwig
  0 siblings, 1 reply; 45+ messages in thread
From: Hannes Reinecke @ 2021-05-23  8:12 UTC (permalink / raw
  To: Christoph Hellwig, Jens Axboe, Geert Uytterhoeven, Chris Zankel,
	Max Filippov, Philipp Reisner, Lars Ellenberg, Jim Paris,
	Joshua Morris, Philip Kelleher, Minchan Kim, Nitin Gupta,
	Matias Bjorling, Coly Li, Mike Snitzer, Song Liu, Maxim Levitsky,
	Alex Dubov, Ulf Hansson, Dan Williams, Vishal Verma, Dave Jiang,
	Heiko Carstens, Vasily Gorbik, Christian Borntraeger
  Cc: linux-block, dm-devel, linux-m68k, linux-xtensa, drbd-dev,
	linuxppc-dev, linux-bcache, linux-raid, linux-mmc, nvdimm,
	linux-nvme, linux-s390

On 5/21/21 7:51 AM, Christoph Hellwig wrote:
> Convert the md driver to use the blk_alloc_disk and blk_cleanup_disk
> helpers to simplify gendisk and request_queue allocation.
> 
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---
>   drivers/md/md.c | 25 +++++++++----------------
>   1 file changed, 9 insertions(+), 16 deletions(-)
> 
> diff --git a/drivers/md/md.c b/drivers/md/md.c
> index 49f897fbb89b..d806be8cc210 100644
> --- a/drivers/md/md.c
> +++ b/drivers/md/md.c
> @@ -5598,12 +5598,10 @@ static void md_free(struct kobject *ko)
>   	if (mddev->sysfs_level)
>   		sysfs_put(mddev->sysfs_level);
>   
> -	if (mddev->gendisk)
> +	if (mddev->gendisk) {
>   		del_gendisk(mddev->gendisk);
> -	if (mddev->queue)
> -		blk_cleanup_queue(mddev->queue);
> -	if (mddev->gendisk)
> -		put_disk(mddev->gendisk);
> +		blk_cleanup_disk(mddev->gendisk);
> +	}
>   	percpu_ref_exit(&mddev->writes_pending);
>   
>   	bioset_exit(&mddev->bio_set);
> @@ -5711,20 +5709,13 @@ static int md_alloc(dev_t dev, char *name)
>   		goto abort;
>   
>   	error = -ENOMEM;
> -	mddev->queue = blk_alloc_queue(NUMA_NO_NODE);
> -	if (!mddev->queue)
> +	disk = blk_alloc_disk(NUMA_NO_NODE);
> +	if (!disk)
>   		goto abort;
>   
> -	blk_set_stacking_limits(&mddev->queue->limits);
> -
> -	disk = alloc_disk(1 << shift);
> -	if (!disk) {
> -		blk_cleanup_queue(mddev->queue);
> -		mddev->queue = NULL;
> -		goto abort;
> -	}
>   	disk->major = MAJOR(mddev->unit);
>   	disk->first_minor = unit << shift;
> +	disk->minors = 1 << shift;
>   	if (name)
>   		strcpy(disk->disk_name, name);
>   	else if (partitioned)
> @@ -5733,7 +5724,9 @@ static int md_alloc(dev_t dev, char *name)
>   		sprintf(disk->disk_name, "md%d", unit);
>   	disk->fops = &md_fops;
>   	disk->private_data = mddev;
> -	disk->queue = mddev->queue;
> +
> +	mddev->queue = disk->queue;
> +	blk_set_stacking_limits(&mddev->queue->limits);
>   	blk_queue_write_cache(mddev->queue, true, true);
>   	/* Allow extended partitions.  This makes the
>   	 * 'mdp' device redundant, but we can't really
> 
Wouldn't it make sense to introduce a helper 'blk_queue_from_disk()' or 
somesuch to avoid having to keep an explicit 'queue' pointer?


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

_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [PATCH 15/26] nvdimm-blk: convert to blk_alloc_disk/blk_cleanup_disk
       [not found] ` <20210521055116.1053587-16-hch@lst.de>
@ 2021-05-23  8:13   ` Hannes Reinecke
  0 siblings, 0 replies; 45+ messages in thread
From: Hannes Reinecke @ 2021-05-23  8:13 UTC (permalink / raw
  To: Christoph Hellwig, Jens Axboe, Geert Uytterhoeven, Chris Zankel,
	Max Filippov, Philipp Reisner, Lars Ellenberg, Jim Paris,
	Philip Kelleher, Minchan Kim, Nitin Gupta, Matias Bjorling,
	Coly Li, Mike Snitzer, Song Liu, Maxim Levitsky, Alex Dubov,
	Ulf Hansson, Dan Williams, Vishal Verma, Dave Jiang,
	Heiko Carstens, Vasily Gorbik, Christian Borntraeger
  Cc: linux-block, dm-devel, linux-m68k, linux-xtensa, drbd-dev,
	linuxppc-dev, linux-bcache, linux-raid, linux-mmc, nvdimm,
	linux-nvme, linux-s390

On 5/21/21 7:51 AM, Christoph Hellwig wrote:
> Convert the nvdimm-blk driver to use the blk_alloc_disk and
> blk_cleanup_disk helpers to simplify gendisk and request_queue
> allocation.
> 
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---
>   drivers/nvdimm/blk.c | 26 ++++++--------------------
>   1 file changed, 6 insertions(+), 20 deletions(-)
> Reviewed-by: Hannes Reinecke <hare@suse.de>

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

_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [PATCH 16/26] nvdimm-btt: convert to blk_alloc_disk/blk_cleanup_disk
       [not found] ` <20210521055116.1053587-17-hch@lst.de>
@ 2021-05-23  8:14   ` Hannes Reinecke
  0 siblings, 0 replies; 45+ messages in thread
From: Hannes Reinecke @ 2021-05-23  8:14 UTC (permalink / raw
  To: Christoph Hellwig, Jens Axboe, Geert Uytterhoeven, Chris Zankel,
	Max Filippov, Philipp Reisner, Lars Ellenberg, Jim Paris,
	Philip Kelleher, Minchan Kim, Nitin Gupta, Matias Bjorling,
	Coly Li, Mike Snitzer, Song Liu, Maxim Levitsky, Alex Dubov,
	Ulf Hansson, Dan Williams, Vishal Verma, Dave Jiang,
	Heiko Carstens, Vasily Gorbik, Christian Borntraeger
  Cc: linux-block, dm-devel, linux-m68k, linux-xtensa, drbd-dev,
	linuxppc-dev, linux-bcache, linux-raid, linux-mmc, nvdimm,
	linux-nvme, linux-s390

On 5/21/21 7:51 AM, Christoph Hellwig wrote:
> Convert the nvdimm-btt driver to use the blk_alloc_disk and
> blk_cleanup_disk helpers to simplify gendisk and request_queue
> allocation.
> 
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---
>   drivers/nvdimm/btt.c | 24 +++++++-----------------
>   drivers/nvdimm/btt.h |  2 --
>   2 files changed, 7 insertions(+), 19 deletions(-)
> 
Reviewed-by: Hannes Reinecke <hare@suse.de>

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

_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [PATCH 17/26] nvdimm-pmem: convert to blk_alloc_disk/blk_cleanup_disk
       [not found] ` <20210521055116.1053587-18-hch@lst.de>
@ 2021-05-23  8:14   ` Hannes Reinecke
  2021-06-07  4:43   ` Dan Williams
  1 sibling, 0 replies; 45+ messages in thread
From: Hannes Reinecke @ 2021-05-23  8:14 UTC (permalink / raw
  To: Christoph Hellwig, Jens Axboe, Geert Uytterhoeven, Chris Zankel,
	Max Filippov, Philipp Reisner, Lars Ellenberg, Jim Paris,
	Philip Kelleher, Minchan Kim, Nitin Gupta, Matias Bjorling,
	Coly Li, Mike Snitzer, Song Liu, Maxim Levitsky, Alex Dubov,
	Ulf Hansson, Dan Williams, Vishal Verma, Dave Jiang,
	Heiko Carstens, Vasily Gorbik, Christian Borntraeger
  Cc: linux-block, dm-devel, linux-m68k, linux-xtensa, drbd-dev,
	linuxppc-dev, linux-bcache, linux-raid, linux-mmc, nvdimm,
	linux-nvme, linux-s390

On 5/21/21 7:51 AM, Christoph Hellwig wrote:
> Convert the nvdimm-pmem driver to use the blk_alloc_disk and
> blk_cleanup_disk helpers to simplify gendisk and request_queue
> allocation.
> 
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---
>   drivers/nvdimm/pmem.c | 15 +++++----------
>   1 file changed, 5 insertions(+), 10 deletions(-)
> Reviewed-by: Hannes Reinecke <hare@suse.de>

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

_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [PATCH 18/26] nvme-multipath: convert to blk_alloc_disk/blk_cleanup_disk
       [not found] ` <20210521055116.1053587-19-hch@lst.de>
@ 2021-05-23  8:20   ` Hannes Reinecke
  2021-05-24  7:29     ` Christoph Hellwig
  0 siblings, 1 reply; 45+ messages in thread
From: Hannes Reinecke @ 2021-05-23  8:20 UTC (permalink / raw
  To: Christoph Hellwig, Jens Axboe, Geert Uytterhoeven, Chris Zankel,
	Max Filippov, Philipp Reisner, Lars Ellenberg, Jim Paris,
	Philip Kelleher, Minchan Kim, Nitin Gupta, Matias Bjorling,
	Coly Li, Mike Snitzer, Song Liu, Maxim Levitsky, Alex Dubov,
	Ulf Hansson, Dan Williams, Vishal Verma, Dave Jiang,
	Heiko Carstens, Vasily Gorbik, Christian Borntraeger
  Cc: linux-block, dm-devel, linux-m68k, linux-xtensa, drbd-dev,
	linuxppc-dev, linux-bcache, linux-raid, linux-mmc, nvdimm,
	linux-nvme, linux-s390

On 5/21/21 7:51 AM, Christoph Hellwig wrote:
> Convert the nvme-multipath driver to use the blk_alloc_disk and
> blk_cleanup_disk helpers to simplify gendisk and request_queue
> allocation.
> 
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---
>   drivers/nvdimm/pmem.c         |  1 -
>   drivers/nvme/host/multipath.c | 45 ++++++++++-------------------------
>   2 files changed, 13 insertions(+), 33 deletions(-)
> 
> diff --git a/drivers/nvdimm/pmem.c b/drivers/nvdimm/pmem.c
> index 9fcd05084564..31f3c4bd6f72 100644
> --- a/drivers/nvdimm/pmem.c
> +++ b/drivers/nvdimm/pmem.c
> @@ -472,7 +472,6 @@ static int pmem_attach_disk(struct device *dev,
>   		blk_queue_flag_set(QUEUE_FLAG_DAX, q);
>   
>   	disk->fops		= &pmem_fops;
> -	disk->queue		= q;
>   	disk->private_data	= pmem;
>   	nvdimm_namespace_disk_name(ndns, disk->disk_name);
>   	set_capacity(disk, (pmem->size - pmem->pfn_pad - pmem->data_offset)
> diff --git a/drivers/nvme/host/multipath.c b/drivers/nvme/host/multipath.c
> index a5d02f236cca..b5fbdb416022 100644
> --- a/drivers/nvme/host/multipath.c
> +++ b/drivers/nvme/host/multipath.c
> @@ -427,7 +427,6 @@ static void nvme_requeue_work(struct work_struct *work)
>   
>   int nvme_mpath_alloc_disk(struct nvme_ctrl *ctrl, struct nvme_ns_head *head)
>   {
> -	struct request_queue *q;
>   	bool vwc = false;
>   
>   	mutex_init(&head->lock);
> @@ -443,33 +442,24 @@ int nvme_mpath_alloc_disk(struct nvme_ctrl *ctrl, struct nvme_ns_head *head)
>   	if (!(ctrl->subsys->cmic & NVME_CTRL_CMIC_MULTI_CTRL) || !multipath)
>   		return 0;
>   
> -	q = blk_alloc_queue(ctrl->numa_node);
> -	if (!q)
> -		goto out;
> -	blk_queue_flag_set(QUEUE_FLAG_NONROT, q);
> -	/* set to a default value for 512 until disk is validated */
> -	blk_queue_logical_block_size(q, 512);
> -	blk_set_stacking_limits(&q->limits);
> -
> -	/* we need to propagate up the VMC settings */
> -	if (ctrl->vwc & NVME_CTRL_VWC_PRESENT)
> -		vwc = true;
> -	blk_queue_write_cache(q, vwc, vwc);
> -
> -	head->disk = alloc_disk(0);
> +	head->disk = blk_alloc_disk(ctrl->numa_node);
>   	if (!head->disk)
> -		goto out_cleanup_queue;
> +		return -ENOMEM;
>   	head->disk->fops = &nvme_ns_head_ops;
>   	head->disk->private_data = head;
> -	head->disk->queue = q;
>   	sprintf(head->disk->disk_name, "nvme%dn%d",
>   			ctrl->subsys->instance, head->instance);
> -	return 0;
>   
> -out_cleanup_queue:
> -	blk_cleanup_queue(q);
> -out:
> -	return -ENOMEM;
> +	blk_queue_flag_set(QUEUE_FLAG_NONROT, head->disk->queue);
> +	/* set to a default value of 512 until the disk is validated */
> +	blk_queue_logical_block_size(head->disk->queue, 512);
> +	blk_set_stacking_limits(&head->disk->queue->limits);
> +
> +	/* we need to propagate up the VMC settings */
> +	if (ctrl->vwc & NVME_CTRL_VWC_PRESENT)
> +		vwc = true;
> +	blk_queue_write_cache(head->disk->queue, vwc, vwc);
> +	return 0;
>   }
>   
>   static void nvme_mpath_set_live(struct nvme_ns *ns)
> @@ -768,16 +758,7 @@ void nvme_mpath_remove_disk(struct nvme_ns_head *head)
>   	/* make sure all pending bios are cleaned up */
>   	kblockd_schedule_work(&head->requeue_work);
>   	flush_work(&head->requeue_work);
> -	blk_cleanup_queue(head->disk->queue);
> -	if (!test_bit(NVME_NSHEAD_DISK_LIVE, &head->flags)) {
> -		/*
> -		 * if device_add_disk wasn't called, prevent
> -		 * disk release to put a bogus reference on the
> -		 * request queue
> -		 */
> -		head->disk->queue = NULL;
> -	}
> -	put_disk(head->disk);
> +	blk_cleanup_disk(head->disk);
>   }
>   
>   void nvme_mpath_init_ctrl(struct nvme_ctrl *ctrl)
> 
What about the check for GENHD_FL_UP a bit further up in line 766?
Can this still happen with the new allocation scheme, ie is there still 
a difference in lifetime between ->disk and ->disk->queue?

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

_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [PATCH 19/26] nfblock: convert to blk_alloc_disk/blk_cleanup_disk
       [not found] ` <20210521055116.1053587-20-hch@lst.de>
  2021-05-21  8:37   ` [PATCH 19/26] nfblock: convert to blk_alloc_disk/blk_cleanup_disk Geert Uytterhoeven
@ 2021-05-23  8:21   ` Hannes Reinecke
  1 sibling, 0 replies; 45+ messages in thread
From: Hannes Reinecke @ 2021-05-23  8:21 UTC (permalink / raw
  To: Christoph Hellwig, Jens Axboe, Geert Uytterhoeven, Chris Zankel,
	Max Filippov, Philipp Reisner, Lars Ellenberg, Jim Paris,
	Philip Kelleher, Minchan Kim, Nitin Gupta, Matias Bjorling,
	Coly Li, Mike Snitzer, Song Liu, Maxim Levitsky, Alex Dubov,
	Ulf Hansson, Dan Williams, Vishal Verma, Dave Jiang,
	Heiko Carstens, Vasily Gorbik, Christian Borntraeger
  Cc: linux-block, dm-devel, linux-m68k, linux-xtensa, drbd-dev,
	linuxppc-dev, linux-bcache, linux-raid, linux-mmc, nvdimm,
	linux-nvme, linux-s390

On 5/21/21 7:51 AM, Christoph Hellwig wrote:
> Convert the nfblock driver to use the blk_alloc_disk and blk_cleanup_disk
> helpers to simplify gendisk and request_queue allocation.
> 
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---
>   arch/m68k/emu/nfblock.c | 20 +++++---------------
>   1 file changed, 5 insertions(+), 15 deletions(-)
> 
Reviewed-by: Hannes Reinecke <hare@suse.de>

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

_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [PATCH 20/26] simdisk: convert to blk_alloc_disk/blk_cleanup_disk
       [not found] ` <20210521055116.1053587-21-hch@lst.de>
@ 2021-05-23  8:22   ` Hannes Reinecke
  0 siblings, 0 replies; 45+ messages in thread
From: Hannes Reinecke @ 2021-05-23  8:22 UTC (permalink / raw
  To: Christoph Hellwig, Jens Axboe, Geert Uytterhoeven, Chris Zankel,
	Max Filippov, Philipp Reisner, Lars Ellenberg, Jim Paris,
	Philip Kelleher, Minchan Kim, Nitin Gupta, Matias Bjorling,
	Coly Li, Mike Snitzer, Song Liu, Maxim Levitsky, Alex Dubov,
	Ulf Hansson, Dan Williams, Vishal Verma, Dave Jiang,
	Heiko Carstens, Vasily Gorbik, Christian Borntraeger
  Cc: linux-block, dm-devel, linux-m68k, linux-xtensa, drbd-dev,
	linuxppc-dev, linux-bcache, linux-raid, linux-mmc, nvdimm,
	linux-nvme, linux-s390

On 5/21/21 7:51 AM, Christoph Hellwig wrote:
> Convert the simdisk driver to use the blk_alloc_disk and blk_cleanup_disk
> helpers to simplify gendisk and request_queue allocation.
> 
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---
>   arch/xtensa/platforms/iss/simdisk.c | 29 +++++++----------------------
>   1 file changed, 7 insertions(+), 22 deletions(-)
> Reviewed-by: Hannes Reinecke <hare@suse.de>

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

_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [PATCH 21/26] n64cart: convert to blk_alloc_disk
       [not found] ` <20210521055116.1053587-22-hch@lst.de>
@ 2021-05-23  8:22   ` Hannes Reinecke
  0 siblings, 0 replies; 45+ messages in thread
From: Hannes Reinecke @ 2021-05-23  8:22 UTC (permalink / raw
  To: Christoph Hellwig, Jens Axboe, Geert Uytterhoeven, Chris Zankel,
	Max Filippov, Philipp Reisner, Lars Ellenberg, Jim Paris,
	Philip Kelleher, Minchan Kim, Nitin Gupta, Matias Bjorling,
	Coly Li, Mike Snitzer, Song Liu, Maxim Levitsky, Alex Dubov,
	Ulf Hansson, Dan Williams, Vishal Verma, Dave Jiang,
	Heiko Carstens, Vasily Gorbik, Christian Borntraeger
  Cc: linux-block, dm-devel, linux-m68k, linux-xtensa, drbd-dev,
	linuxppc-dev, linux-bcache, linux-raid, linux-mmc, nvdimm,
	linux-nvme, linux-s390

On 5/21/21 7:51 AM, Christoph Hellwig wrote:
> Convert the n64cart driver to use the blk_alloc_disk helper to simplify
> gendisk and request_queue allocation.
> 
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---
>   drivers/block/n64cart.c | 6 +-----
>   1 file changed, 1 insertion(+), 5 deletions(-)
> 
Reviewed-by: Hannes Reinecke <hare@suse.de>

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

_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [PATCH 22/26] ps3vram: convert to blk_alloc_disk/blk_cleanup_disk
       [not found] ` <20210521055116.1053587-23-hch@lst.de>
@ 2021-05-23  8:23   ` Hannes Reinecke
  0 siblings, 0 replies; 45+ messages in thread
From: Hannes Reinecke @ 2021-05-23  8:23 UTC (permalink / raw
  To: Christoph Hellwig, Jens Axboe, Geert Uytterhoeven, Chris Zankel,
	Max Filippov, Philipp Reisner, Lars Ellenberg, Jim Paris,
	Philip Kelleher, Minchan Kim, Nitin Gupta, Matias Bjorling,
	Coly Li, Mike Snitzer, Song Liu, Maxim Levitsky, Alex Dubov,
	Ulf Hansson, Dan Williams, Vishal Verma, Dave Jiang,
	Heiko Carstens, Vasily Gorbik, Christian Borntraeger
  Cc: linux-block, dm-devel, linux-m68k, linux-xtensa, drbd-dev,
	linuxppc-dev, linux-bcache, linux-raid, linux-mmc, nvdimm,
	linux-nvme, linux-s390

On 5/21/21 7:51 AM, Christoph Hellwig wrote:
> Convert the ps3vram driver to use the blk_alloc_disk and blk_cleanup_disk
> helpers to simplify gendisk and request_queue allocation.
> 
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---
>   drivers/block/ps3vram.c | 31 ++++++++-----------------------
>   1 file changed, 8 insertions(+), 23 deletions(-)
> Reviewed-by: Hannes Reinecke <hare@suse.de>

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

_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [PATCH 23/26] dcssblk: convert to blk_alloc_disk/blk_cleanup_disk
       [not found] ` <20210521055116.1053587-24-hch@lst.de>
@ 2021-05-23  8:23   ` Hannes Reinecke
  0 siblings, 0 replies; 45+ messages in thread
From: Hannes Reinecke @ 2021-05-23  8:23 UTC (permalink / raw
  To: Christoph Hellwig, Jens Axboe, Geert Uytterhoeven, Chris Zankel,
	Max Filippov, Philipp Reisner, Lars Ellenberg, Jim Paris,
	Philip Kelleher, Minchan Kim, Nitin Gupta, Matias Bjorling,
	Coly Li, Mike Snitzer, Song Liu, Maxim Levitsky, Alex Dubov,
	Ulf Hansson, Dan Williams, Vishal Verma, Dave Jiang,
	Heiko Carstens, Vasily Gorbik, Christian Borntraeger
  Cc: linux-block, dm-devel, linux-m68k, linux-xtensa, drbd-dev,
	linuxppc-dev, linux-bcache, linux-raid, linux-mmc, nvdimm,
	linux-nvme, linux-s390

On 5/21/21 7:51 AM, Christoph Hellwig wrote:
> Convert the dcssblk driver to use the blk_alloc_disk and blk_cleanup_disk
> helpers to simplify gendisk and request_queue allocation.
> 
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---
>   drivers/s390/block/dcssblk.c | 26 ++++++++------------------
>   1 file changed, 8 insertions(+), 18 deletions(-)
> 
Reviewed-by: Hannes Reinecke <hare@suse.de>

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

_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [PATCH 24/26] xpram: convert to blk_alloc_disk/blk_cleanup_disk
       [not found] ` <20210521055116.1053587-25-hch@lst.de>
@ 2021-05-23  8:24   ` Hannes Reinecke
  0 siblings, 0 replies; 45+ messages in thread
From: Hannes Reinecke @ 2021-05-23  8:24 UTC (permalink / raw
  To: Christoph Hellwig, Jens Axboe, Geert Uytterhoeven, Chris Zankel,
	Max Filippov, Philipp Reisner, Lars Ellenberg, Jim Paris,
	Philip Kelleher, Minchan Kim, Nitin Gupta, Matias Bjorling,
	Coly Li, Mike Snitzer, Song Liu, Maxim Levitsky, Alex Dubov,
	Ulf Hansson, Dan Williams, Vishal Verma, Dave Jiang,
	Heiko Carstens, Vasily Gorbik, Christian Borntraeger
  Cc: linux-block, dm-devel, linux-m68k, linux-xtensa, drbd-dev,
	linuxppc-dev, linux-bcache, linux-raid, linux-mmc, nvdimm,
	linux-nvme, linux-s390

On 5/21/21 7:51 AM, Christoph Hellwig wrote:
> Convert the xpram driver to use the blk_alloc_disk and blk_cleanup_disk
> helpers to simplify gendisk and request_queue allocation.
> 
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---
>   drivers/s390/block/xpram.c | 26 +++++++++-----------------
>   1 file changed, 9 insertions(+), 17 deletions(-)
> 
Reviewed-by: Hannes Reinecke <hare@suse.de>

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

_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [PATCH 25/26] null_blk: convert to blk_alloc_disk/blk_cleanup_disk
       [not found] ` <20210521055116.1053587-26-hch@lst.de>
@ 2021-05-23  8:25   ` Hannes Reinecke
  0 siblings, 0 replies; 45+ messages in thread
From: Hannes Reinecke @ 2021-05-23  8:25 UTC (permalink / raw
  To: Christoph Hellwig, Jens Axboe, Geert Uytterhoeven, Chris Zankel,
	Max Filippov, Philipp Reisner, Lars Ellenberg, Jim Paris,
	Philip Kelleher, Minchan Kim, Nitin Gupta, Matias Bjorling,
	Coly Li, Mike Snitzer, Song Liu, Maxim Levitsky, Alex Dubov,
	Ulf Hansson, Dan Williams, Vishal Verma, Dave Jiang,
	Heiko Carstens, Vasily Gorbik, Christian Borntraeger
  Cc: linux-block, dm-devel, linux-m68k, linux-xtensa, drbd-dev,
	linuxppc-dev, linux-bcache, linux-raid, linux-mmc, nvdimm,
	linux-nvme, linux-s390

On 5/21/21 7:51 AM, Christoph Hellwig wrote:
> Convert the null_blk driver to use the blk_alloc_disk and blk_cleanup_disk
> helpers to simplify gendisk and request_queue allocation.  Note that the
> blk-mq mode is left with its own allocations scheme, to be handled later.
> 
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---
>   drivers/block/null_blk/main.c | 38 +++++++++++++++++------------------
>   1 file changed, 19 insertions(+), 19 deletions(-)
> Reviewed-by: Hannes Reinecke <hare@suse.de>

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

_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [PATCH 26/26] block: unexport blk_alloc_queue
       [not found] ` <20210521055116.1053587-27-hch@lst.de>
@ 2021-05-23  8:26   ` Hannes Reinecke
  0 siblings, 0 replies; 45+ messages in thread
From: Hannes Reinecke @ 2021-05-23  8:26 UTC (permalink / raw
  To: Christoph Hellwig, Jens Axboe, Geert Uytterhoeven, Chris Zankel,
	Max Filippov, Philipp Reisner, Lars Ellenberg, Jim Paris,
	Philip Kelleher, Minchan Kim, Nitin Gupta, Matias Bjorling,
	Coly Li, Mike Snitzer, Song Liu, Maxim Levitsky, Alex Dubov,
	Ulf Hansson, Dan Williams, Vishal Verma, Dave Jiang,
	Heiko Carstens, Vasily Gorbik, Christian Borntraeger
  Cc: linux-block, dm-devel, linux-m68k, linux-xtensa, drbd-dev,
	linuxppc-dev, linux-bcache, linux-raid, linux-mmc, nvdimm,
	linux-nvme, linux-s390

On 5/21/21 7:51 AM, Christoph Hellwig wrote:
> blk_alloc_queue is just an internal helper now, unexport it and remove
> it from the public header.
> 
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---
>   block/blk-core.c       | 1 -
>   block/blk.h            | 2 ++
>   include/linux/blkdev.h | 1 -
>   3 files changed, 2 insertions(+), 2 deletions(-)
> Reviewed-by: Hannes Reinecke <hare@suse.de>

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

_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [PATCH 12/26] bcache: convert to blk_alloc_disk/blk_cleanup_disk
       [not found] ` <20210521055116.1053587-13-hch@lst.de>
  2021-05-23  8:04   ` [PATCH 12/26] bcache: " Hannes Reinecke
@ 2021-05-23 16:20   ` Coly Li
  1 sibling, 0 replies; 45+ messages in thread
From: Coly Li @ 2021-05-23 16:20 UTC (permalink / raw
  To: Christoph Hellwig, Jens Axboe, Geert Uytterhoeven, Chris Zankel,
	Max Filippov, Philipp Reisner, Lars Ellenberg, Jim Paris,
	Joshua Morris, Philip Kelleher, Minchan Kim, Nitin Gupta,
	Matias Bjorling, Mike Snitzer, Song Liu, Maxim Levitsky,
	Alex Dubov, Ulf Hansson, Dan Williams, Vishal Verma, Dave Jiang,
	Heiko Carstens, Vasily Gorbik, Christian Borntraeger
  Cc: linux-block, dm-devel, linux-m68k, linux-xtensa, drbd-dev,
	linuxppc-dev, linux-bcache, linux-raid, linux-mmc, nvdimm,
	linux-nvme, linux-s390

On 5/21/21 1:51 PM, Christoph Hellwig wrote:
> Convert the bcache driver to use the blk_alloc_disk and blk_cleanup_disk
> helpers to simplify gendisk and request_queue allocation.
> 
> Signed-off-by: Christoph Hellwig <hch@lst.de>

Acked-by: Coly Li <colyli@suse.de>

Thanks.


Coly Li

> ---
>  drivers/md/bcache/super.c | 15 ++++-----------
>  1 file changed, 4 insertions(+), 11 deletions(-)
> 
> diff --git a/drivers/md/bcache/super.c b/drivers/md/bcache/super.c
> index bea8c4429ae8..185246a0d855 100644
> --- a/drivers/md/bcache/super.c
> +++ b/drivers/md/bcache/super.c
> @@ -890,13 +890,9 @@ static void bcache_device_free(struct bcache_device *d)
>  		if (disk_added)
>  			del_gendisk(disk);
>  
> -		if (disk->queue)
> -			blk_cleanup_queue(disk->queue);
> -
> +		blk_cleanup_disk(disk);
>  		ida_simple_remove(&bcache_device_idx,
>  				  first_minor_to_idx(disk->first_minor));
> -		if (disk_added)
> -			put_disk(disk);
>  	}
>  
>  	bioset_exit(&d->bio_split);
> @@ -946,7 +942,7 @@ static int bcache_device_init(struct bcache_device *d, unsigned int block_size,
>  			BIOSET_NEED_BVECS|BIOSET_NEED_RESCUER))
>  		goto err;
>  
> -	d->disk = alloc_disk(BCACHE_MINORS);
> +	d->disk = blk_alloc_disk(NUMA_NO_NODE);
>  	if (!d->disk)
>  		goto err;
>  
> @@ -955,14 +951,11 @@ static int bcache_device_init(struct bcache_device *d, unsigned int block_size,
>  
>  	d->disk->major		= bcache_major;
>  	d->disk->first_minor	= idx_to_first_minor(idx);
> +	d->disk->minors		= BCACHE_MINORS;
>  	d->disk->fops		= ops;
>  	d->disk->private_data	= d;
>  
> -	q = blk_alloc_queue(NUMA_NO_NODE);
> -	if (!q)
> -		return -ENOMEM;
> -
> -	d->disk->queue			= q;
> +	q = d->disk->queue;
>  	q->limits.max_hw_sectors	= UINT_MAX;
>  	q->limits.max_sectors		= UINT_MAX;
>  	q->limits.max_segment_size	= UINT_MAX;
> 


_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [dm-devel] [PATCH 01/26] block: refactor device number setup in __device_add_disk
  2021-05-21 17:16   ` [dm-devel] [PATCH 01/26] block: refactor device number setup in __device_add_disk Luis Chamberlain
@ 2021-05-24  7:20     ` Christoph Hellwig
  0 siblings, 0 replies; 45+ messages in thread
From: Christoph Hellwig @ 2021-05-24  7:20 UTC (permalink / raw
  To: Luis Chamberlain
  Cc: Christoph Hellwig, Jens Axboe, Geert Uytterhoeven, Chris Zankel,
	Max Filippov, Philipp Reisner, Lars Ellenberg, Jim Paris,
	Joshua Morris, Philip Kelleher, Minchan Kim, Nitin Gupta,
	Matias Bjorling, Coly Li, Mike Snitzer, Song Liu, Maxim Levitsky,
	Alex Dubov, Ulf Hansson, Dan Williams, Vishal Verma, Dave Jiang,
	Heiko Carstens, Vasily Gorbik, Christian Borntraeger,
	linux-xtensa, linux-m68k, linux-raid, nvdimm, linux-s390,
	linux-mmc, linux-bcache, linux-nvme, linux-block, dm-devel,
	drbd-dev, linuxppc-dev

On Fri, May 21, 2021 at 05:16:46PM +0000, Luis Chamberlain wrote:
> > -	/* in consecutive minor range? */
> > -	if (bdev->bd_partno < disk->minors) {
> > -		*devt = MKDEV(disk->major, disk->first_minor + bdev->bd_partno);
> > -		return 0;
> > -	}
> > -
> 
> It is not obviously clear to me, why this was part of add_disk()
> path, and ...
> 
> > diff --git a/block/partitions/core.c b/block/partitions/core.c
> > index dc60ecf46fe6..504297bdc8bf 100644
> > --- a/block/partitions/core.c
> > +++ b/block/partitions/core.c
> > @@ -379,9 +380,15 @@ static struct block_device *add_partition(struct gendisk *disk, int partno,
> >  	pdev->type = &part_type;
> >  	pdev->parent = ddev;
> >  
> > -	err = blk_alloc_devt(bdev, &devt);
> > -	if (err)
> > -		goto out_put;
> > +	/* in consecutive minor range? */
> > +	if (bdev->bd_partno < disk->minors) {
> > +		devt = MKDEV(disk->major, disk->first_minor + bdev->bd_partno);
> > +	} else {
> > +		err = blk_alloc_ext_minor();
> > +		if (err < 0)
> > +			goto out_put;
> > +		devt = MKDEV(BLOCK_EXT_MAJOR, err);
> > +	}
> >  	pdev->devt = devt;
> >  
> >  	/* delay uevent until 'holders' subdir is created */
> 
> ... and why we only add this here now.

For the genhd minors == 0 (aka GENHD_FL_EXT_DEVT) implies having to
allocate a dynamic dev_t, so it can be folded into another conditional.

_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [PATCH 01/26] block: refactor device number setup in __device_add_disk
  2021-05-23  7:46   ` Hannes Reinecke
@ 2021-05-24  7:22     ` Christoph Hellwig
  0 siblings, 0 replies; 45+ messages in thread
From: Christoph Hellwig @ 2021-05-24  7:22 UTC (permalink / raw
  To: Hannes Reinecke
  Cc: Christoph Hellwig, Jens Axboe, Geert Uytterhoeven, Chris Zankel,
	Max Filippov, Philipp Reisner, Lars Ellenberg, Jim Paris,
	Joshua Morris, Philip Kelleher, Minchan Kim, Nitin Gupta,
	Matias Bjorling, Coly Li, Mike Snitzer, Song Liu, Maxim Levitsky,
	Alex Dubov, Ulf Hansson, Dan Williams, Vishal Verma, Dave Jiang,
	Heiko Carstens, Vasily Gorbik, Christian Borntraeger, linux-block,
	dm-devel, linux-m68k, linux-xtensa, drbd-dev, linuxppc-dev,
	linux-bcache, linux-raid, linux-mmc, nvdimm, linux-nvme,
	linux-s390

On Sun, May 23, 2021 at 09:46:01AM +0200, Hannes Reinecke wrote:
> ... and also fixes an issue with GENHD_FL_UP remained set in an error path 
> in __device_add_disk().

Well, the error path in __device_add_disk is a complete disaster right
now, but Luis is looking into it fortunately.

_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [dm-devel] [PATCH 05/26] block: add blk_alloc_disk and blk_cleanup_disk APIs
  2021-05-21 17:44   ` [dm-devel] [PATCH 05/26] block: add blk_alloc_disk and blk_cleanup_disk APIs Luis Chamberlain
@ 2021-05-24  7:24     ` Christoph Hellwig
  0 siblings, 0 replies; 45+ messages in thread
From: Christoph Hellwig @ 2021-05-24  7:24 UTC (permalink / raw
  To: Luis Chamberlain
  Cc: Christoph Hellwig, Jens Axboe, Geert Uytterhoeven, Chris Zankel,
	Max Filippov, Philipp Reisner, Lars Ellenberg, Jim Paris,
	Joshua Morris, Philip Kelleher, Minchan Kim, Nitin Gupta,
	Matias Bjorling, Coly Li, Mike Snitzer, Song Liu, Maxim Levitsky,
	Alex Dubov, Ulf Hansson, Dan Williams, Vishal Verma, Dave Jiang,
	Heiko Carstens, Vasily Gorbik, Christian Borntraeger,
	linux-xtensa, linux-m68k, linux-raid, nvdimm, linux-s390,
	linux-mmc, linux-bcache, linux-nvme, linux-block, dm-devel,
	drbd-dev, linuxppc-dev

On Fri, May 21, 2021 at 05:44:07PM +0000, Luis Chamberlain wrote:
> Its not obvious to me why using this new API requires you then to
> set minors explicitly to 1, and yet here underneath we see the minors
> argument passed is 0.
> 
> Nor is it clear from the documentation.

Basically for all new drivers no one should set minors at all, and the
dynamic dev_t mechanism does all the work.  For converted old drivers
minors is set manually instead of being passed an an argument that
should be 0 for all new drivers.

_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [PATCH 06/26] brd: convert to blk_alloc_disk/blk_cleanup_disk
  2021-05-23  7:58   ` [PATCH 06/26] brd: convert to blk_alloc_disk/blk_cleanup_disk Hannes Reinecke
@ 2021-05-24  7:24     ` Christoph Hellwig
  0 siblings, 0 replies; 45+ messages in thread
From: Christoph Hellwig @ 2021-05-24  7:24 UTC (permalink / raw
  To: Hannes Reinecke
  Cc: Christoph Hellwig, Jens Axboe, Geert Uytterhoeven, Chris Zankel,
	Max Filippov, Philipp Reisner, Lars Ellenberg, Jim Paris,
	Joshua Morris, Philip Kelleher, Minchan Kim, Nitin Gupta,
	Matias Bjorling, Coly Li, Mike Snitzer, Song Liu, Maxim Levitsky,
	Alex Dubov, Ulf Hansson, Dan Williams, Vishal Verma, Dave Jiang,
	Heiko Carstens, Vasily Gorbik, Christian Borntraeger, linux-block,
	dm-devel, linux-m68k, linux-xtensa, drbd-dev, linuxppc-dev,
	linux-bcache, linux-raid, linux-mmc, nvdimm, linux-nvme,
	linux-s390

On Sun, May 23, 2021 at 09:58:48AM +0200, Hannes Reinecke wrote:
>> +	/*
>> +	 * This is so fdisk will align partitions on 4k, because of
>> +	 * direct_access API needing 4k alignment, returning a PFN
>> +	 * (This is only a problem on very small devices <= 4M,
>> +	 *  otherwise fdisk will align on 1M. Regardless this call
>> +	 *  is harmless)
>> +	 */
>> +	blk_queue_physical_block_size(disk->queue, PAGE_SIZE);
>>   
>
> Maybe converting the comment to refer to 'PAGE_SIZE' instead of 4k while 
> you're at it ...

I really do not want to touch these kinds of unrelated things here.

_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [PATCH 13/26] dm: convert to blk_alloc_disk/blk_cleanup_disk
  2021-05-23  8:10   ` [PATCH 13/26] dm: " Hannes Reinecke
@ 2021-05-24  7:25     ` Christoph Hellwig
  0 siblings, 0 replies; 45+ messages in thread
From: Christoph Hellwig @ 2021-05-24  7:25 UTC (permalink / raw
  To: Hannes Reinecke
  Cc: Christoph Hellwig, Jens Axboe, Geert Uytterhoeven, Chris Zankel,
	Max Filippov, Philipp Reisner, Lars Ellenberg, Jim Paris,
	Philip Kelleher, Minchan Kim, Nitin Gupta, Matias Bjorling,
	Coly Li, Mike Snitzer, Song Liu, Maxim Levitsky, Alex Dubov,
	Ulf Hansson, Dan Williams, Vishal Verma, Dave Jiang,
	Heiko Carstens, Vasily Gorbik, Christian Borntraeger, linux-block,
	dm-devel, linux-m68k, linux-xtensa, drbd-dev, linuxppc-dev,
	linux-bcache, linux-raid, linux-mmc, nvdimm, linux-nvme,
	linux-s390

On Sun, May 23, 2021 at 10:10:34AM +0200, Hannes Reinecke wrote:
> Can't these conditionals be merged into a single 'if (md->disk)'?
> Eg like:
>
> 	if (md->disk) {
> 		spin_lock(&_minor_lock);
> 		md->disk->private_data = NULL;
> 		spin_unlock(&_minor_lock);
> 		del_gendisk(md->disk);
> 		dm_queue_destroy_keyslot_manager(md->queue);
> 		blk_cleanup_disk(md->queue);
> 	}
>
> We're now always allocating 'md->disk' and 'md->queue' together,
> so how can we end up in a situation where one is set without the other?

I guess we could do that, not sure it is worth the churn, though.

_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [PATCH 14/26] md: convert to blk_alloc_disk/blk_cleanup_disk
  2021-05-23  8:12   ` [PATCH 14/26] md: " Hannes Reinecke
@ 2021-05-24  7:26     ` Christoph Hellwig
  2021-05-24  8:27       ` Hannes Reinecke
  0 siblings, 1 reply; 45+ messages in thread
From: Christoph Hellwig @ 2021-05-24  7:26 UTC (permalink / raw
  To: Hannes Reinecke
  Cc: Christoph Hellwig, Jens Axboe, Geert Uytterhoeven, Chris Zankel,
	Max Filippov, Philipp Reisner, Lars Ellenberg, Jim Paris,
	Joshua Morris, Philip Kelleher, Minchan Kim, Nitin Gupta,
	Matias Bjorling, Coly Li, Mike Snitzer, Song Liu, Maxim Levitsky,
	Alex Dubov, Ulf Hansson, Dan Williams, Vishal Verma, Dave Jiang,
	Heiko Carstens, Vasily Gorbik, Christian Borntraeger, linux-block,
	dm-devel, linux-m68k, linux-xtensa, drbd-dev, linuxppc-dev,
	linux-bcache, linux-raid, linux-mmc, nvdimm, linux-nvme,
	linux-s390

On Sun, May 23, 2021 at 10:12:49AM +0200, Hannes Reinecke wrote:
>> +	blk_set_stacking_limits(&mddev->queue->limits);
>>   	blk_queue_write_cache(mddev->queue, true, true);
>>   	/* Allow extended partitions.  This makes the
>>   	 * 'mdp' device redundant, but we can't really
>>
> Wouldn't it make sense to introduce a helper 'blk_queue_from_disk()' or 
> somesuch to avoid having to keep an explicit 'queue' pointer?

My rought plan is that a few series from now bio based drivers will
never directly deal with the request_queue at all.

_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [PATCH 18/26] nvme-multipath: convert to blk_alloc_disk/blk_cleanup_disk
  2021-05-23  8:20   ` [PATCH 18/26] nvme-multipath: " Hannes Reinecke
@ 2021-05-24  7:29     ` Christoph Hellwig
  0 siblings, 0 replies; 45+ messages in thread
From: Christoph Hellwig @ 2021-05-24  7:29 UTC (permalink / raw
  To: Hannes Reinecke
  Cc: Christoph Hellwig, Jens Axboe, Geert Uytterhoeven, Chris Zankel,
	Max Filippov, Philipp Reisner, Lars Ellenberg, Jim Paris,
	Philip Kelleher, Minchan Kim, Nitin Gupta, Matias Bjorling,
	Coly Li, Mike Snitzer, Song Liu, Maxim Levitsky, Alex Dubov,
	Ulf Hansson, Dan Williams, Vishal Verma, Dave Jiang,
	Heiko Carstens, Vasily Gorbik, Christian Borntraeger, linux-block,
	dm-devel, linux-m68k, linux-xtensa, drbd-dev, linuxppc-dev,
	linux-bcache, linux-raid, linux-mmc, nvdimm, linux-nvme,
	linux-s390

On Sun, May 23, 2021 at 10:20:27AM +0200, Hannes Reinecke wrote:
> What about the check for GENHD_FL_UP a bit further up in line 766?
> Can this still happen with the new allocation scheme, ie is there still a 
> difference in lifetime between ->disk and ->disk->queue?

Yes, nvme_free_ns_head can still be called before device_add_disk was
called for an allocated nshead gendisk during error handling of the
setup path.  There is still a difference in the lifetime in that they
are separately refcounted, but it does not matter to the driver.

_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [PATCH 14/26] md: convert to blk_alloc_disk/blk_cleanup_disk
  2021-05-24  7:26     ` Christoph Hellwig
@ 2021-05-24  8:27       ` Hannes Reinecke
  0 siblings, 0 replies; 45+ messages in thread
From: Hannes Reinecke @ 2021-05-24  8:27 UTC (permalink / raw
  To: Christoph Hellwig
  Cc: Jens Axboe, Geert Uytterhoeven, Chris Zankel, Max Filippov,
	Philipp Reisner, Lars Ellenberg, Jim Paris, Joshua Morris,
	Philip Kelleher, Minchan Kim, Nitin Gupta, Matias Bjorling,
	Coly Li, Mike Snitzer, Song Liu, Maxim Levitsky, Alex Dubov,
	Ulf Hansson, Dan Williams, Vishal Verma, Dave Jiang,
	Heiko Carstens, Vasily Gorbik, Christian Borntraeger, linux-block,
	dm-devel, linux-m68k, linux-xtensa, drbd-dev, linuxppc-dev,
	linux-bcache, linux-raid, linux-mmc, nvdimm, linux-nvme,
	linux-s390

On 5/24/21 9:26 AM, Christoph Hellwig wrote:
> On Sun, May 23, 2021 at 10:12:49AM +0200, Hannes Reinecke wrote:
>>> +	blk_set_stacking_limits(&mddev->queue->limits);
>>>    	blk_queue_write_cache(mddev->queue, true, true);
>>>    	/* Allow extended partitions.  This makes the
>>>    	 * 'mdp' device redundant, but we can't really
>>>
>> Wouldn't it make sense to introduce a helper 'blk_queue_from_disk()' or
>> somesuch to avoid having to keep an explicit 'queue' pointer?
> 
> My rought plan is that a few series from now bio based drivers will
> never directly deal with the request_queue at all.
> 
Go for it.

Reviewed-by: Hannes Reinecke <hare@suse.de>

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

_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: simplify gendisk and request_queue allocation for bio based drivers
       [not found] <20210521055116.1053587-1-hch@lst.de>
                   ` (24 preceding siblings ...)
       [not found] ` <20210521055116.1053587-27-hch@lst.de>
@ 2021-05-25 22:41 ` Ulf Hansson
  2021-05-26  4:49   ` Christoph Hellwig
       [not found] ` <20210521055116.1053587-18-hch@lst.de>
  26 siblings, 1 reply; 45+ messages in thread
From: Ulf Hansson @ 2021-05-25 22:41 UTC (permalink / raw
  To: Christoph Hellwig
  Cc: Jens Axboe, Geert Uytterhoeven, Chris Zankel, Max Filippov,
	Philipp Reisner, Lars Ellenberg, Jim Paris, Joshua Morris,
	Philip Kelleher, Minchan Kim, Nitin Gupta, Matias Bjorling,
	Coly Li, Mike Snitzer, Song Liu, Maxim Levitsky, Alex Dubov,
	Dan Williams, Vishal Verma, Dave Jiang, Heiko Carstens,
	Vasily Gorbik, Christian Borntraeger, linux-block, dm-devel,
	linux-m68k, linux-xtensa, drbd-dev, linuxppc-dev, linux-bcache,
	linux-raid, linux-mmc, nvdimm, linux-nvme, linux-s390

On Fri, 21 May 2021 at 07:51, Christoph Hellwig <hch@lst.de> wrote:
>
> Hi all,
>
> this series is the first part of cleaning up lifetimes and allocation of
> the gendisk and request_queue structure.  It adds a new interface to
> allocate the disk and queue together for bio based drivers, and a helper
> for cleanup/free them when a driver is unloaded or a device is removed.

May I ask what else you have in the pipe for the next steps?

The reason why I ask is that I am looking into some issues related to
lifecycle problems of gendisk/mmc, typically triggered at SD/MMC card
removal.

>
> Together this removes the need to treat the gendisk and request_queue
> as separate entities for bio based drivers.
>
> Diffstat:
>  arch/m68k/emu/nfblock.c             |   20 +---
>  arch/xtensa/platforms/iss/simdisk.c |   29 +------
>  block/blk-core.c                    |    1
>  block/blk.h                         |    6 -
>  block/genhd.c                       |  149 +++++++++++++++++++-----------------
>  block/partitions/core.c             |   19 ++--
>  drivers/block/brd.c                 |   94 +++++++---------------
>  drivers/block/drbd/drbd_main.c      |   23 +----
>  drivers/block/n64cart.c             |    8 -
>  drivers/block/null_blk/main.c       |   38 ++++-----
>  drivers/block/pktcdvd.c             |   11 --
>  drivers/block/ps3vram.c             |   31 +------
>  drivers/block/rsxx/dev.c            |   39 +++------
>  drivers/block/rsxx/rsxx_priv.h      |    1
>  drivers/block/zram/zram_drv.c       |   19 ----
>  drivers/lightnvm/core.c             |   24 +----
>  drivers/md/bcache/super.c           |   15 ---
>  drivers/md/dm.c                     |   16 +--
>  drivers/md/md.c                     |   25 ++----
>  drivers/memstick/core/ms_block.c    |    1
>  drivers/nvdimm/blk.c                |   27 +-----
>  drivers/nvdimm/btt.c                |   25 +-----
>  drivers/nvdimm/btt.h                |    2
>  drivers/nvdimm/pmem.c               |   17 +---
>  drivers/nvme/host/core.c            |    1
>  drivers/nvme/host/multipath.c       |   46 +++--------
>  drivers/s390/block/dcssblk.c        |   26 +-----
>  drivers/s390/block/xpram.c          |   26 ++----
>  include/linux/blkdev.h              |    1
>  include/linux/genhd.h               |   23 +++++
>  30 files changed, 297 insertions(+), 466 deletions(-)

This looks like a nice cleanup to me.  Feel free to add, for the series:

Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org>

Kind regards
Uffe

_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: simplify gendisk and request_queue allocation for bio based drivers
  2021-05-25 22:41 ` simplify gendisk and request_queue allocation for bio based drivers Ulf Hansson
@ 2021-05-26  4:49   ` Christoph Hellwig
  2021-05-26  8:07     ` Ulf Hansson
  0 siblings, 1 reply; 45+ messages in thread
From: Christoph Hellwig @ 2021-05-26  4:49 UTC (permalink / raw
  To: Ulf Hansson
  Cc: Christoph Hellwig, Jens Axboe, Geert Uytterhoeven, Chris Zankel,
	Max Filippov, Philipp Reisner, Lars Ellenberg, Jim Paris,
	Joshua Morris, Philip Kelleher, Minchan Kim, Nitin Gupta,
	Matias Bjorling, Coly Li, Mike Snitzer, Song Liu, Maxim Levitsky,
	Alex Dubov, Dan Williams, Vishal Verma, Dave Jiang,
	Heiko Carstens, Vasily Gorbik, Christian Borntraeger, linux-block,
	dm-devel, linux-m68k, linux-xtensa, drbd-dev, linuxppc-dev,
	linux-bcache, linux-raid, linux-mmc, nvdimm, linux-nvme,
	linux-s390

On Wed, May 26, 2021 at 12:41:37AM +0200, Ulf Hansson wrote:
> On Fri, 21 May 2021 at 07:51, Christoph Hellwig <hch@lst.de> wrote:
> >
> > Hi all,
> >
> > this series is the first part of cleaning up lifetimes and allocation of
> > the gendisk and request_queue structure.  It adds a new interface to
> > allocate the disk and queue together for bio based drivers, and a helper
> > for cleanup/free them when a driver is unloaded or a device is removed.
> 
> May I ask what else you have in the pipe for the next steps?
> 
> The reason why I ask is that I am looking into some issues related to
> lifecycle problems of gendisk/mmc, typically triggered at SD/MMC card
> removal.

In the short run not much more than superficial cleanups.  Eventually
I want bio based drivers to not require a separate request_queue, leaving
that purely as a data structure for blk-mq based drivers.  But it will
take a while until we get there, so it should not block any fixes.

For hot unplug handling it might be worth to take a look at nvme, as it
is tested a lot for that case.

_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: simplify gendisk and request_queue allocation for bio based drivers
  2021-05-26  4:49   ` Christoph Hellwig
@ 2021-05-26  8:07     ` Ulf Hansson
  0 siblings, 0 replies; 45+ messages in thread
From: Ulf Hansson @ 2021-05-26  8:07 UTC (permalink / raw
  To: Christoph Hellwig
  Cc: Jens Axboe, Geert Uytterhoeven, Chris Zankel, Max Filippov,
	Philipp Reisner, Lars Ellenberg, Jim Paris, Joshua Morris,
	Philip Kelleher, Minchan Kim, Nitin Gupta, Matias Bjorling,
	Coly Li, Mike Snitzer, Song Liu, Maxim Levitsky, Alex Dubov,
	Dan Williams, Vishal Verma, Dave Jiang, Heiko Carstens,
	Vasily Gorbik, Christian Borntraeger, linux-block, dm-devel,
	linux-m68k, linux-xtensa, drbd-dev, linuxppc-dev, linux-bcache,
	linux-raid, linux-mmc, nvdimm, linux-nvme, linux-s390

On Wed, 26 May 2021 at 06:49, Christoph Hellwig <hch@lst.de> wrote:
>
> On Wed, May 26, 2021 at 12:41:37AM +0200, Ulf Hansson wrote:
> > On Fri, 21 May 2021 at 07:51, Christoph Hellwig <hch@lst.de> wrote:
> > >
> > > Hi all,
> > >
> > > this series is the first part of cleaning up lifetimes and allocation of
> > > the gendisk and request_queue structure.  It adds a new interface to
> > > allocate the disk and queue together for bio based drivers, and a helper
> > > for cleanup/free them when a driver is unloaded or a device is removed.
> >
> > May I ask what else you have in the pipe for the next steps?
> >
> > The reason why I ask is that I am looking into some issues related to
> > lifecycle problems of gendisk/mmc, typically triggered at SD/MMC card
> > removal.
>
> In the short run not much more than superficial cleanups.  Eventually
> I want bio based drivers to not require a separate request_queue, leaving
> that purely as a data structure for blk-mq based drivers.  But it will
> take a while until we get there, so it should not block any fixes.

Alright, thanks for clarifying.

>
> For hot unplug handling it might be worth to take a look at nvme, as it
> is tested a lot for that case.

Okay, thanks for the hint.

Kind regards
Uffe

_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [PATCH 17/26] nvdimm-pmem: convert to blk_alloc_disk/blk_cleanup_disk
       [not found] ` <20210521055116.1053587-18-hch@lst.de>
  2021-05-23  8:14   ` [PATCH 17/26] nvdimm-pmem: convert to blk_alloc_disk/blk_cleanup_disk Hannes Reinecke
@ 2021-06-07  4:43   ` Dan Williams
  1 sibling, 0 replies; 45+ messages in thread
From: Dan Williams @ 2021-06-07  4:43 UTC (permalink / raw
  To: Christoph Hellwig
  Cc: Jens Axboe, Geert Uytterhoeven, Chris Zankel, Max Filippov,
	Philipp Reisner, Lars Ellenberg, Jim Paris, Joshua Morris,
	Philip Kelleher, Minchan Kim, Nitin Gupta, Matias Bjorling,
	Coly Li, Mike Snitzer, Song Liu, Maxim Levitsky, Alex Dubov,
	Ulf Hansson, Vishal Verma, Dave Jiang, Heiko Carstens,
	Vasily Gorbik, Christian Borntraeger, linux-block,
	device-mapper development, linux-m68k, linux-xtensa, drbd-dev,
	linuxppc-dev, linux-bcache, linux-raid, linux-mmc, nvdimm,
	linux-nvme, linux-s390, Sachin Sant

[ add Sachin who reported this commit in -next ]

On Thu, May 20, 2021 at 10:52 PM Christoph Hellwig <hch@lst.de> wrote:
>
> Convert the nvdimm-pmem driver to use the blk_alloc_disk and
> blk_cleanup_disk helpers to simplify gendisk and request_queue
> allocation.
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---
>  drivers/nvdimm/pmem.c | 15 +++++----------
>  1 file changed, 5 insertions(+), 10 deletions(-)
>
> diff --git a/drivers/nvdimm/pmem.c b/drivers/nvdimm/pmem.c
> index 968b8483c763..9fcd05084564 100644
> --- a/drivers/nvdimm/pmem.c
> +++ b/drivers/nvdimm/pmem.c
> @@ -338,7 +338,7 @@ static void pmem_pagemap_cleanup(struct dev_pagemap *pgmap)
>         struct request_queue *q =
>                 container_of(pgmap->ref, struct request_queue, q_usage_counter);
>
> -       blk_cleanup_queue(q);
> +       blk_cleanup_disk(queue_to_disk(q));

This is broken. This comes after del_gendisk() which means the queue
device is no longer associated with its disk parent. Perhaps @pmem
could be stashed in pgmap->owner and then this can use pmem->disk? Not
see any other readily available ways to get back to the disk from here
after del_gendisk().

_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

^ permalink raw reply	[flat|nested] 45+ messages in thread

end of thread, other threads:[~2021-10-13  6:15 UTC | newest]

Thread overview: 45+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20210521055116.1053587-1-hch@lst.de>
     [not found] ` <20210521055116.1053587-20-hch@lst.de>
2021-05-21  8:37   ` [PATCH 19/26] nfblock: convert to blk_alloc_disk/blk_cleanup_disk Geert Uytterhoeven
2021-05-23  8:21   ` Hannes Reinecke
     [not found] ` <20210521055116.1053587-2-hch@lst.de>
2021-05-21 17:16   ` [dm-devel] [PATCH 01/26] block: refactor device number setup in __device_add_disk Luis Chamberlain
2021-05-24  7:20     ` Christoph Hellwig
2021-05-23  7:46   ` Hannes Reinecke
2021-05-24  7:22     ` Christoph Hellwig
     [not found] ` <20210521055116.1053587-4-hch@lst.de>
2021-05-21 17:22   ` [dm-devel] [PATCH 03/26] block: automatically enable GENHD_FL_EXT_DEVT Luis Chamberlain
2021-05-23  7:50   ` Hannes Reinecke
     [not found] ` <20210521055116.1053587-3-hch@lst.de>
2021-05-21 17:18   ` [dm-devel] [PATCH 02/26] block: move the DISK_MAX_PARTS sanity check into __device_add_disk Luis Chamberlain
2021-05-23  7:48   ` Hannes Reinecke
     [not found] ` <20210521055116.1053587-5-hch@lst.de>
2021-05-21 17:28   ` [dm-devel] [PATCH 04/26] block: add a flag to make put_disk on partially initalized disks safer Luis Chamberlain
2021-05-23  7:54   ` Hannes Reinecke
     [not found] ` <20210521055116.1053587-6-hch@lst.de>
2021-05-21 17:44   ` [dm-devel] [PATCH 05/26] block: add blk_alloc_disk and blk_cleanup_disk APIs Luis Chamberlain
2021-05-24  7:24     ` Christoph Hellwig
2021-05-23  7:55   ` Hannes Reinecke
     [not found] ` <20210521055116.1053587-7-hch@lst.de>
2021-05-23  7:58   ` [PATCH 06/26] brd: convert to blk_alloc_disk/blk_cleanup_disk Hannes Reinecke
2021-05-24  7:24     ` Christoph Hellwig
     [not found] ` <20210521055116.1053587-8-hch@lst.de>
2021-05-23  7:59   ` [PATCH 07/26] drbd: " Hannes Reinecke
     [not found] ` <20210521055116.1053587-9-hch@lst.de>
2021-05-23  8:00   ` [PATCH 08/26] pktcdvd: " Hannes Reinecke
     [not found] ` <20210521055116.1053587-10-hch@lst.de>
2021-05-23  8:01   ` [PATCH 09/26] rsxx: " Hannes Reinecke
     [not found] ` <20210521055116.1053587-11-hch@lst.de>
2021-05-23  8:01   ` [PATCH 10/26] zram: " Hannes Reinecke
     [not found] ` <20210521055116.1053587-12-hch@lst.de>
2021-05-23  8:02   ` [PATCH 11/26] lightnvm: " Hannes Reinecke
     [not found] ` <20210521055116.1053587-13-hch@lst.de>
2021-05-23  8:04   ` [PATCH 12/26] bcache: " Hannes Reinecke
2021-05-23 16:20   ` Coly Li
     [not found] ` <20210521055116.1053587-14-hch@lst.de>
2021-05-23  8:10   ` [PATCH 13/26] dm: " Hannes Reinecke
2021-05-24  7:25     ` Christoph Hellwig
     [not found] ` <20210521055116.1053587-15-hch@lst.de>
2021-05-23  8:12   ` [PATCH 14/26] md: " Hannes Reinecke
2021-05-24  7:26     ` Christoph Hellwig
2021-05-24  8:27       ` Hannes Reinecke
     [not found] ` <20210521055116.1053587-16-hch@lst.de>
2021-05-23  8:13   ` [PATCH 15/26] nvdimm-blk: " Hannes Reinecke
     [not found] ` <20210521055116.1053587-17-hch@lst.de>
2021-05-23  8:14   ` [PATCH 16/26] nvdimm-btt: " Hannes Reinecke
     [not found] ` <20210521055116.1053587-19-hch@lst.de>
2021-05-23  8:20   ` [PATCH 18/26] nvme-multipath: " Hannes Reinecke
2021-05-24  7:29     ` Christoph Hellwig
     [not found] ` <20210521055116.1053587-21-hch@lst.de>
2021-05-23  8:22   ` [PATCH 20/26] simdisk: " Hannes Reinecke
     [not found] ` <20210521055116.1053587-22-hch@lst.de>
2021-05-23  8:22   ` [PATCH 21/26] n64cart: convert to blk_alloc_disk Hannes Reinecke
     [not found] ` <20210521055116.1053587-23-hch@lst.de>
2021-05-23  8:23   ` [PATCH 22/26] ps3vram: convert to blk_alloc_disk/blk_cleanup_disk Hannes Reinecke
     [not found] ` <20210521055116.1053587-24-hch@lst.de>
2021-05-23  8:23   ` [PATCH 23/26] dcssblk: " Hannes Reinecke
     [not found] ` <20210521055116.1053587-25-hch@lst.de>
2021-05-23  8:24   ` [PATCH 24/26] xpram: " Hannes Reinecke
     [not found] ` <20210521055116.1053587-26-hch@lst.de>
2021-05-23  8:25   ` [PATCH 25/26] null_blk: " Hannes Reinecke
     [not found] ` <20210521055116.1053587-27-hch@lst.de>
2021-05-23  8:26   ` [PATCH 26/26] block: unexport blk_alloc_queue Hannes Reinecke
2021-05-25 22:41 ` simplify gendisk and request_queue allocation for bio based drivers Ulf Hansson
2021-05-26  4:49   ` Christoph Hellwig
2021-05-26  8:07     ` Ulf Hansson
     [not found] ` <20210521055116.1053587-18-hch@lst.de>
2021-05-23  8:14   ` [PATCH 17/26] nvdimm-pmem: convert to blk_alloc_disk/blk_cleanup_disk Hannes Reinecke
2021-06-07  4:43   ` Dan Williams

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).