Re: [dm-devel] [PATCH 01/26] block: refactor device number setup in __device_add_disk

2021-05-24 Thread Luis Chamberlain
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 */ ... an

Re: [dm-devel] [PATCH 05/26] block: add blk_alloc_disk and blk_cleanup_disk APIs

2021-05-24 Thread Luis Chamberlain
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 > --- > block/genhd.c

Re: [dm-devel] [PATCH 02/26] block: move the DISK_MAX_PARTS sanity check into __device_add_disk

2021-05-24 Thread Luis Chamberlain
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 Reviewed-by: Luis Chamberlain

Re: [dm-devel] [PATCH 03/26] block: automatically enable GENHD_FL_EXT_DEVT

2021-05-24 Thread Luis Chamberlain
> > Signed-off-by: Christoph Hellwig Reviewed-by: Luis Chamberlain Luis -- dm-devel mailing list dm-devel@redhat.com https://listman.redhat.com/mailman/listinfo/dm-devel

Re: [dm-devel] [PATCH 04/26] block: add a flag to make put_disk on partially initalized disks safer

2021-05-24 Thread Luis Chamberlain
t > a lot of drivers did get wrong or still do. > > Signed-off-by: Christoph Hellwig Reviewed-by: Luis Chamberlain Luis -- dm-devel mailing list dm-devel@redhat.com https://listman.redhat.com/mailman/listinfo/dm-devel

Re: [dm-devel] [PATCH 01/10] scsi/sd: use blk_cleanup_queue() insted of put_disk()

2021-08-27 Thread Luis Chamberlain
On Tue, Aug 24, 2021 at 06:52:53AM +0100, Christoph Hellwig wrote: > On Mon, Aug 23, 2021 at 01:29:21PM -0700, Luis Chamberlain wrote: > > The single put_disk() is useful if you know you're not doing > > a cleanup after add_disk(), but since we want to add support > > for that

Re: [dm-devel] [PATCH 03/10] scsi/sr: use blk_cleanup_disk() instead of put_disk()

2021-08-27 Thread Luis Chamberlain
On Tue, Aug 24, 2021 at 07:00:27AM +0100, Christoph Hellwig wrote: > On Mon, Aug 23, 2021 at 01:29:23PM -0700, Luis Chamberlain wrote: > > The single put_disk() is useful if you know you're not doing > > a cleanup after add_disk(), but since we want to add support > > for that

Re: [dm-devel] [PATCH 06/10] mmc/core/block: add error handling support for add_disk()

2021-08-27 Thread Luis Chamberlain
On Tue, Aug 24, 2021 at 07:13:13AM +0100, Christoph Hellwig wrote: > On Mon, Aug 23, 2021 at 01:29:26PM -0700, Luis Chamberlain wrote: > > We never checked for errors on add_disk() as this function > > returned void. Now that this is fixed, use the shiny new > > error handling

[dm-devel] [PATCH v2 1/6] scsi/sd: add error handling support for add_disk()

2021-08-27 Thread Luis Chamberlain
We never checked for errors on add_disk() as this function returned void. Now that this is fixed, use the shiny new error handling. Reviewed-by: Christoph Hellwig Signed-off-by: Luis Chamberlain --- drivers/scsi/sd.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git

[dm-devel] [PATCH v2 0/6] block: first batch of add_disk() error handling conversions

2021-08-27 Thread Luis Chamberlain
]. [0] https://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux-next.git/log/?h=20210827-for-axboe-add-disk-error-handling-next Luis Chamberlain (6): scsi/sd: add error handling support for add_disk() scsi/sr: add error handling support for add_disk() nvme: add error handling support

[dm-devel] [PATCH v2 6/6] nbd: add error handling support for add_disk()

2021-08-27 Thread Luis Chamberlain
We never checked for errors on add_disk() as this function returned void. Now that this is fixed, use the shiny new error handling. Reviewed-by: Christoph Hellwig Signed-off-by: Luis Chamberlain --- drivers/block/nbd.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git

[dm-devel] [PATCH v2 2/6] scsi/sr: add error handling support for add_disk()

2021-08-27 Thread Luis Chamberlain
We never checked for errors on add_disk() as this function returned void. Now that this is fixed, use the shiny new error handling. Reviewed-by: Christoph Hellwig Signed-off-by: Luis Chamberlain --- drivers/scsi/sr.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git

[dm-devel] [PATCH v2 3/6] nvme: add error handling support for add_disk()

2021-08-27 Thread Luis Chamberlain
We never checked for errors on add_disk() as this function returned void. Now that this is fixed, use the shiny new error handling. Signed-off-by: Luis Chamberlain --- drivers/nvme/host/core.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/nvme/host/core.c b

[dm-devel] [PATCH v2 4/6] md: add error handling support for add_disk()

2021-08-27 Thread Luis Chamberlain
We never checked for errors on add_disk() as this function returned void. Now that this is fixed, use the shiny new error handling. We just do the unwinding of what was not done before, and are sure to unlock prior to bailing. Reviewed-by: Christoph Hellwig Signed-off-by: Luis Chamberlain

[dm-devel] [PATCH v2 5/6] loop: add error handling support for add_disk()

2021-08-27 Thread Luis Chamberlain
We never checked for errors on add_disk() as this function returned void. Now that this is fixed, use the shiny new error handling. Reviewed-by: Christoph Hellwig Signed-off-by: Luis Chamberlain --- drivers/block/loop.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git

Re: [dm-devel] [PATCH 05/10] nvme: add error handling support for add_disk()

2021-08-27 Thread Luis Chamberlain
On Tue, Aug 24, 2021 at 07:09:37AM +0100, Christoph Hellwig wrote: > On Mon, Aug 23, 2021 at 01:29:25PM -0700, Luis Chamberlain wrote: > > + rc = device_add_disk(ctrl->device, ns->disk, nvme_ns_id_attr_groups); > > + if (rc) > > + goto out_cleanup_n

Re: [dm-devel] [PATCH 08/10] dm: add add_disk() error handling

2021-08-27 Thread Luis Chamberlain
On Tue, Aug 24, 2021 at 07:21:30AM +0100, Christoph Hellwig wrote: > On Mon, Aug 23, 2021 at 01:29:28PM -0700, Luis Chamberlain wrote: > > - add_disk(md->disk); > > + r = add_disk(md->disk); > > + if (r) > > + goto out_cleanup_disk; &

[dm-devel] [PATCH v3 6/8] dm: add add_disk() error handling

2021-08-30 Thread Luis Chamberlain
in the error path. The other use case is on the ioctl table_load case. If that fails userspace needs to call the DM_DEV_REMOVE_CMD to cleanup the state - similar to any other failure. Signed-off-by: Luis Chamberlain --- drivers/md/dm.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git

[dm-devel] [PATCH v3 4/8] mmc/core/block: add error handling support for add_disk()

2021-08-30 Thread Luis Chamberlain
-off-by: Luis Chamberlain --- drivers/mmc/core/block.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/mmc/core/block.c b/drivers/mmc/core/block.c index 6a15fdf6e5f2..9b2856aa6231 100644 --- a/drivers/mmc/core/block.c +++ b/drivers/mmc/core/block.c @@ -2453,9

[dm-devel] [PATCH v3 2/8] scsi/sr: add error handling support for add_disk()

2021-08-30 Thread Luis Chamberlain
We never checked for errors on add_disk() as this function returned void. Now that this is fixed, use the shiny new error handling. Reviewed-by: Christoph Hellwig Signed-off-by: Luis Chamberlain --- drivers/scsi/sr.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git

[dm-devel] [PATCH v3 7/8] loop: add error handling support for add_disk()

2021-08-30 Thread Luis Chamberlain
We never checked for errors on add_disk() as this function returned void. Now that this is fixed, use the shiny new error handling. Reviewed-by: Christoph Hellwig Signed-off-by: Luis Chamberlain --- drivers/block/loop.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git

Re: [dm-devel] [PATCH 06/10] mmc/core/block: add error handling support for add_disk()

2021-08-30 Thread Luis Chamberlain
On Sat, Aug 28, 2021 at 08:32:11AM +0100, Christoph Hellwig wrote: > On Fri, Aug 27, 2021 at 11:42:36AM -0700, Luis Chamberlain wrote: > > > > if (area_type == MMC_BLK_DATA_AREA_MAIN) > > > > dev_set_drvdata(>dev, md); > > > > -

[dm-devel] [PATCH v3 8/8] nbd: add error handling support for add_disk()

2021-08-30 Thread Luis Chamberlain
We never checked for errors on add_disk() as this function returned void. Now that this is fixed, use the shiny new error handling. Reviewed-by: Christoph Hellwig Signed-off-by: Luis Chamberlain --- drivers/block/nbd.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git

[dm-devel] [PATCH v3 1/8] scsi/sd: add error handling support for add_disk()

2021-08-30 Thread Luis Chamberlain
We never checked for errors on add_disk() as this function returned void. Now that this is fixed, use the shiny new error handling. Reviewed-by: Christoph Hellwig Signed-off-by: Luis Chamberlain --- drivers/scsi/sd.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git

[dm-devel] [PATCH v3 3/8] nvme: add error handling support for add_disk()

2021-08-30 Thread Luis Chamberlain
We never checked for errors on add_disk() as this function returned void. Now that this is fixed, use the shiny new error handling. Reviewed-by: Christoph Hellwig Signed-off-by: Luis Chamberlain --- drivers/nvme/host/core.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff

[dm-devel] [PATCH v3 0/8] block: first batch of add_disk() error handling conversions

2021-08-30 Thread Luis Chamberlain
-handling-next Luis Chamberlain (8): scsi/sd: add error handling support for add_disk() scsi/sr: add error handling support for add_disk() nvme: add error handling support for add_disk() mmc/core/block: add error handling support for add_disk() md: add error handling support for add_disk

[dm-devel] [PATCH v3 5/8] md: add error handling support for add_disk()

2021-08-30 Thread Luis Chamberlain
We never checked for errors on add_disk() as this function returned void. Now that this is fixed, use the shiny new error handling. We just do the unwinding of what was not done before, and are sure to unlock prior to bailing. Reviewed-by: Christoph Hellwig Signed-off-by: Luis Chamberlain

Re: [dm-devel] [PATCH 08/10] dm: add add_disk() error handling

2021-08-30 Thread Luis Chamberlain
On Sat, Aug 28, 2021 at 08:35:57AM +0100, Christoph Hellwig wrote: > On Fri, Aug 27, 2021 at 11:55:14AM -0700, Luis Chamberlain wrote: > > > I think the add_disk should just return r. If you look at the > > > callers they eventualy end up in dm_table_destroy, which do

[dm-devel] [PATCH 03/10] scsi/sr: use blk_cleanup_disk() instead of put_disk()

2021-08-23 Thread Luis Chamberlain
The single put_disk() is useful if you know you're not doing a cleanup after add_disk(), but since we want to add support for that, just use the normal form of blk_cleanup_disk() to cleanup the queue and put the disk. Signed-off-by: Luis Chamberlain --- drivers/scsi/sr.c | 2 +- 1 file changed

[dm-devel] [PATCH 10/10] nbd: add error handling support for add_disk()

2021-08-23 Thread Luis Chamberlain
We never checked for errors on add_disk() as this function returned void. Now that this is fixed, use the shiny new error handling. Signed-off-by: Luis Chamberlain Signed-off-by: Christoph Hellwig --- drivers/block/nbd.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git

[dm-devel] [PATCH 07/10] md: add error handling support for add_disk()

2021-08-23 Thread Luis Chamberlain
We never checked for errors on add_disk() as this function returned void. Now that this is fixed, use the shiny new error handling. We just do the unwinding of what was not done before, and are sure to unlock prior to bailing. Signed-off-by: Luis Chamberlain --- drivers/md/md.c | 7 ++- 1

[dm-devel] [PATCH 02/10] scsi/sd: add error handling support for add_disk()

2021-08-23 Thread Luis Chamberlain
We never checked for errors on add_disk() as this function returned void. Now that this is fixed, use the shiny new error handling. Signed-off-by: Luis Chamberlain --- drivers/scsi/sd.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/scsi/sd.c b/drivers/scsi

[dm-devel] [PATCH 00/10] block: first batch of add_disk() error handling conversions

2021-08-23 Thread Luis Chamberlain
based on Jen's for-5.15/block branch which holds all of my pending changes, in case anyone wants to take a peak. [0] https://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux-next.git/log/?h=20210823-for-axboe-add-disk-error-handling-next Luis Chamberlain (10): scsi/sd: use

[dm-devel] [PATCH 08/10] dm: add add_disk() error handling

2021-08-23 Thread Luis Chamberlain
We never checked for errors on add_disk() as this function returned void. Now that this is fixed, use the shiny new error handling. Signed-off-by: Luis Chamberlain --- drivers/md/dm.c | 16 +++- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/drivers/md/dm.c b/drivers

[dm-devel] [PATCH 06/10] mmc/core/block: add error handling support for add_disk()

2021-08-23 Thread Luis Chamberlain
We never checked for errors on add_disk() as this function returned void. Now that this is fixed, use the shiny new error handling. The caller cleanups the disk already so all we need to do is just pass along the return value. Signed-off-by: Luis Chamberlain --- drivers/mmc/core/block.c | 4

[dm-devel] [PATCH 09/10] loop: add error handling support for add_disk()

2021-08-23 Thread Luis Chamberlain
We never checked for errors on add_disk() as this function returned void. Now that this is fixed, use the shiny new error handling. Signed-off-by: Luis Chamberlain Signed-off-by: Christoph Hellwig --- drivers/block/loop.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff

[dm-devel] [PATCH 05/10] nvme: add error handling support for add_disk()

2021-08-23 Thread Luis Chamberlain
We never checked for errors on add_disk() as this function returned void. Now that this is fixed, use the shiny new error handling. Signed-off-by: Luis Chamberlain --- drivers/nvme/host/core.c | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/drivers/nvme/host/core.c

[dm-devel] [PATCH 04/10] scsi/sr: add error handling support for add_disk()

2021-08-23 Thread Luis Chamberlain
We never checked for errors on add_disk() as this function returned void. Now that this is fixed, use the shiny new error handling. Signed-off-by: Luis Chamberlain --- drivers/scsi/sr.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/scsi/sr.c b/drivers/scsi/sr.c

[dm-devel] [PATCH 01/10] scsi/sd: use blk_cleanup_queue() insted of put_disk()

2021-08-23 Thread Luis Chamberlain
The single put_disk() is useful if you know you're not doing a cleanup after add_disk(), but since we want to add support for that, just use the normal form of blk_cleanup_disk() to cleanup the queue and put the disk. Signed-off-by: Luis Chamberlain --- drivers/scsi/sd.c | 2 +- 1 file changed

Re: [dm-devel] [PATCH v3 2/8] scsi/sr: add error handling support for add_disk()

2021-09-13 Thread Luis Chamberlain
On Tue, Sep 07, 2021 at 09:37:05AM +0800, Ming Lei wrote: > On Mon, Aug 30, 2021 at 02:25:32PM -0700, Luis Chamberlain wrote: > > We never checked for errors on add_disk() as this function > > returned void. Now that this is fixed, use the shiny new > > error handli

Re: [dm-devel] [PATCH v3 1/8] scsi/sd: add error handling support for add_disk()

2021-09-13 Thread Luis Chamberlain
On Tue, Sep 07, 2021 at 09:29:07AM +0800, Ming Lei wrote: > On Mon, Aug 30, 2021 at 02:25:31PM -0700, Luis Chamberlain wrote: > > We never checked for errors on add_disk() as this function > > returned void. Now that this is fixed, use the shiny new > > error handli

Re: [dm-devel] [PATCH 1/9] scsi/sd: add error handling support for add_disk()

2021-10-18 Thread Luis Chamberlain
On Sat, Oct 16, 2021 at 10:51:48PM -0400, Martin K. Petersen wrote: > > Luis, > > > We never checked for errors on add_disk() as this function returned > > void. Now that this is fixed, use the shiny new error handling. > > > > As with the error handling for device_add() we follow the same logic

[dm-devel] [PATCH 0/9] block: reviewed add_disk() error handling set

2021-10-15 Thread Luis Chamberlain
up yourself. Luis Chamberlain (9): scsi/sd: add error handling support for add_disk() scsi/sr: add error handling support for add_disk() dm: add add_disk() error handling bcache: add error handling support for add_disk() xen-blkfront: add error handling support for add_disk() m68k/emu

[dm-devel] [PATCH 5/9] xen-blkfront: add error handling support for add_disk()

2021-10-15 Thread Luis Chamberlain
was stuffed inside xlvbd_alloc_gendisk() we must repeat the tag free'ing as well. We set the info->rq to NULL to ensure blkif_free() doesn't crash on blk_mq_stop_hw_queues() on device_add_disk() error as the queue will be long gone by then. Reviewed-by: Juergen Gross Signed-off-by: Luis Chamberl

[dm-devel] [PATCH 2/9] scsi/sr: add error handling support for add_disk()

2021-10-15 Thread Luis Chamberlain
We never checked for errors on add_disk() as this function returned void. Now that this is fixed, use the shiny new error handling. Just put the cdrom kref and have the unwinding be done by sr_kref_release(). Reviewed-by: Christoph Hellwig Signed-off-by: Luis Chamberlain --- drivers/scsi/sr.c

[dm-devel] [PATCH 3/9] dm: add add_disk() error handling

2021-10-15 Thread Luis Chamberlain
in the error path. The other use case is on the ioctl table_load case. If that fails userspace needs to call the DM_DEV_REMOVE_CMD to cleanup the state - similar to any other failure. Reviewed-by: Hannes Reinecke Signed-off-by: Luis Chamberlain --- drivers/md/dm.c | 4 +++- 1 file changed, 3 insertions

[dm-devel] [PATCH 6/9] m68k/emu/nfblock: add error handling support for add_disk()

2021-10-15 Thread Luis Chamberlain
We never checked for errors on add_disk() as this function returned void. Now that this is fixed, use the shiny new error handling. Reviewed-by: Geert Uytterhoeven Acked-by: Geert Uytterhoeven Signed-off-by: Luis Chamberlain --- arch/m68k/emu/nfblock.c | 9 +++-- 1 file changed, 7

[dm-devel] [PATCH 8/9] rnbd: add error handling support for add_disk()

2021-10-15 Thread Luis Chamberlain
We never checked for errors on add_disk() as this function returned void. Now that this is fixed, use the shiny new error handling. Acked-by: Jack Wang Signed-off-by: Luis Chamberlain --- drivers/block/rnbd/rnbd-clt.c | 13 + 1 file changed, 9 insertions(+), 4 deletions(-) diff

[dm-devel] [PATCH 4/9] bcache: add error handling support for add_disk()

2021-10-15 Thread Luis Chamberlain
We never checked for errors on add_disk() as this function returned void. Now that this is fixed, use the shiny new error handling. This driver doesn't do any unwinding with blk_cleanup_disk() even on errors after add_disk() and so we follow that tradition. Acked-by: Coly Li Signed-off-by: Luis

[dm-devel] [PATCH 1/9] scsi/sd: add error handling support for add_disk()

2021-10-15 Thread Luis Chamberlain
-by: Christoph Hellwig Signed-off-by: Luis Chamberlain --- drivers/scsi/sd.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c index a646d27df681..d69f2e626e76 100644 --- a/drivers/scsi/sd.c +++ b/drivers/scsi/sd.c @@ -3457,7 +3457,13 @@ static

[dm-devel] [PATCH 7/9] um/drivers/ubd_kern: add error handling support for add_disk()

2021-10-15 Thread Luis Chamberlain
-by: Luis Chamberlain --- arch/um/drivers/ubd_kern.c | 13 + 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/arch/um/drivers/ubd_kern.c b/arch/um/drivers/ubd_kern.c index fefd343412c7..69d2d0049a61 100644 --- a/arch/um/drivers/ubd_kern.c +++ b/arch/um/drivers/ubd_kern.c

[dm-devel] [PATCH v4 5/6] loop: add error handling support for add_disk()

2021-09-27 Thread Luis Chamberlain
We never checked for errors on add_disk() as this function returned void. Now that this is fixed, use the shiny new error handling. Reviewed-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Signed-off-by: Luis Chamberlain --- drivers/block/loop.c | 8 +++- 1 file changed, 7 insertions

[dm-devel] [PATCH v4 2/6] scsi/sr: add error handling support for add_disk()

2021-09-27 Thread Luis Chamberlain
We never checked for errors on add_disk() as this function returned void. Now that this is fixed, use the shiny new error handling. Just put the cdrom kref and have the unwinding be done by sr_kref_release(). Reviewed-by: Christoph Hellwig Signed-off-by: Luis Chamberlain --- drivers/scsi/sr.c

[dm-devel] [PATCH v4 0/6] block: first batch of add_disk() error handling conversions

2021-09-27 Thread Luis Chamberlain
es are now slightly fixed [0] https://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux-next.git/log/?h=20210927-for-axboe-add-disk-error-handling Luis Chamberlain (6): scsi/sd: add error handling support for add_disk() scsi/sr: add error handling support for add_disk() md: add erro

[dm-devel] [PATCH v4 3/6] md: add error handling support for add_disk()

2021-09-27 Thread Luis Chamberlain
We never checked for errors on add_disk() as this function returned void. Now that this is fixed, use the shiny new error handling. We just do the unwinding of what was not done before, and are sure to unlock prior to bailing. Reviewed-by: Christoph Hellwig Signed-off-by: Luis Chamberlain

[dm-devel] [PATCH v4 6/6] nbd: add error handling support for add_disk()

2021-09-27 Thread Luis Chamberlain
We never checked for errors on add_disk() as this function returned void. Now that this is fixed, use the shiny new error handling. Reviewed-by: Christoph Hellwig Reviewed-by: Hannes Reinecke Signed-off-by: Luis Chamberlain --- drivers/block/nbd.c | 6 +- 1 file changed, 5 insertions

[dm-devel] [PATCH v4 1/6] scsi/sd: add error handling support for add_disk()

2021-09-27 Thread Luis Chamberlain
-by: Christoph Hellwig Signed-off-by: Luis Chamberlain --- drivers/scsi/sd.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c index 523bf2fdc253..3a101ad4d16e 100644 --- a/drivers/scsi/sd.c +++ b/drivers/scsi/sd.c @@ -3449,7 +3449,13 @@ static

[dm-devel] [PATCH v4 4/6] dm: add add_disk() error handling

2021-09-27 Thread Luis Chamberlain
in the error path. The other use case is on the ioctl table_load case. If that fails userspace needs to call the DM_DEV_REMOVE_CMD to cleanup the state - similar to any other failure. Reviewed-by: Hannes Reinecke Signed-off-by: Luis Chamberlain --- drivers/md/dm.c | 4 +++- 1 file changed, 3 insertions

Re: [dm-devel] [PATCH v3 02/10] block: Introduce queue limits for copy-offload support

2022-02-22 Thread Luis Chamberlain
On Thu, Feb 17, 2022 at 06:29:01PM +0530, Nitesh Shetty wrote: > Thu, Feb 17, 2022 at 01:07:00AM -0800, Luis Chamberlain wrote: > > The subject says limits for copy-offload... > > > > On Mon, Feb 14, 2022 at 01:29:52PM +0530, Nitesh Shetty wrote: > > > Add

Re: [dm-devel] [PATCH v3 01/10] block: make bio_map_kern() non static

2022-02-17 Thread Luis Chamberlain
On Mon, Feb 14, 2022 at 01:29:51PM +0530, Nitesh Shetty wrote: > From: SelvaKumar S > > Make bio_map_kern() non static > > Signed-off-by: SelvaKumar S > Signed-off-by: Nitesh Shetty This patch makes no sense on its own. I'd just merge it with its first user. Luis -- dm-devel mailing list

Re: [dm-devel] [PATCH v3 02/10] block: Introduce queue limits for copy-offload support

2022-02-17 Thread Luis Chamberlain
The subject says limits for copy-offload... On Mon, Feb 14, 2022 at 01:29:52PM +0530, Nitesh Shetty wrote: > Add device limits as sysfs entries, > - copy_offload (RW) > - copy_max_bytes (RW) > - copy_max_hw_bytes (RO) > - copy_max_range_bytes (RW) > -

Re: [dm-devel] [RFC PATCH 3/3] nvme: add the "debug" host driver

2022-02-03 Thread Luis Chamberlain
On Wed, Feb 02, 2022 at 08:00:12AM +, Chaitanya Kulkarni wrote: > Mikulas, > > On 2/1/22 10:33 AM, Mikulas Patocka wrote: > > External email: Use caution opening links or attachments > > > > > > This patch adds a new driver "nvme-debug". It uses memory as a backing > > store and it is used

Re: [dm-devel] [RFC PATCH 3/3] nvme: add the "debug" host driver

2022-02-03 Thread Luis Chamberlain
On Wed, Feb 02, 2022 at 06:01:13AM +, Adam Manzanares wrote: > BTW I think having the target code be able to implement simple copy without > moving data over the fabric would be a great way of showing off the command. Do you mean this should be implemented instead as a fabrics backend

Re: [dm-devel] [RFC PATCH 3/3] nvme: add the "debug" host driver

2022-02-03 Thread Luis Chamberlain
On Thu, Feb 03, 2022 at 05:15:34PM +0100, Christoph Hellwig wrote: > On Thu, Feb 03, 2022 at 08:06:33AM -0800, Luis Chamberlain wrote: > > On Wed, Feb 02, 2022 at 06:01:13AM +, Adam Manzanares wrote: > > > BTW I think having the target code be able to implement simple c

Re: [dm-devel] [LSF/MM/BFP ATTEND] [LSF/MM/BFP TOPIC] Storage: Copy Offload

2022-01-31 Thread Luis Chamberlain
> * What we will discuss in the proposed session ? > --- > > I'd like to propose a session to go over this topic to understand :- > > 1. What are the blockers for Copy Offload implementation ? > 2. Discussion about having a file

[dm-devel] [PATCH v3 4/4] zram: use generic PAGE_SECTORS and PAGE_SECTORS_SHIFT

2023-09-15 Thread Luis Chamberlain
Signed-off-by: Luis Chamberlain --- drivers/block/zram/zram_drv.c | 15 ++- drivers/block/zram/zram_drv.h | 2 -- 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/drivers/block/zram/zram_drv.c b/drivers/block/zram/zram_drv.c index 06673c6ca255..58d36c8574d4 100644

[dm-devel] [PATCH v3 3/4] dm bufio: simplify by using PAGE_SECTORS_SHIFT

2023-09-15 Thread Luis Chamberlain
The PAGE_SHIFT - SECTOR_SHIFT constant be replaced with PAGE_SECTORS_SHIFT defined in linux/blt_types.h, which is included by linux/blkdev.h. This produces no functional changes. Signed-off-by: Luis Chamberlain --- drivers/md/dm-bufio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions

[dm-devel] [PATCH v3 2/4] iomap: simplify iomap_init() with PAGE_SECTORS

2023-09-15 Thread Luis Chamberlain
Replace common constants with generic versions. This produces no functional changes. Reviewed-by: Christoph Hellwig Signed-off-by: Luis Chamberlain --- fs/iomap/buffered-io.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/iomap/buffered-io.c b/fs/iomap/buffered-io.c

[dm-devel] [PATCH v3 1/4] drbd: use PAGE_SECTORS_SHIFT and PAGE_SECTORS

2023-09-15 Thread Luis Chamberlain
Replace common constants with generic versions. This produces no functional changes. Acked-by: Christoph Böhmwalder Reviewed-by: Johannes Thumshirn Signed-off-by: Luis Chamberlain --- drivers/block/drbd/drbd_bitmap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

[dm-devel] [PATCH v3 0/4] block: simplify with PAGE_SECTORS_SHIFT

2023-09-15 Thread Luis Chamberlain
o rebase onto next-20230525 Luis Chamberlain (4): drbd: use PAGE_SECTORS_SHIFT and PAGE_SECTORS iomap: simplify iomap_init() with PAGE_SECTORS dm bufio: simplify by using PAGE_SECTORS_SHIFT zram: use generic PAGE_SECTORS

Re: [dm-devel] [PATCH v15 01/12] block: Introduce queue limits and sysfs for copy-offload support

2023-09-07 Thread Luis Chamberlain
in single payload. > copy_max_hw_bytes: Reflects the device supported maximum limit. > > Reviewed-by: Hannes Reinecke > Signed-off-by: Nitesh Shetty > Signed-off-by: Kanchan Joshi > Signed-off-by: Anuj Gupta Reviewed-by: Luis Chamberlain Luis -- dm-devel ma

Re: [dm-devel] [PATCH v4 00/13] support non power of 2 zoned devices

2022-05-18 Thread Luis Chamberlain
On Tue, May 17, 2022 at 11:34:54AM -0400, Theodore Ts'o wrote: > On Tue, May 17, 2022 at 10:10:48AM +0200, Christoph Hellwig wrote: > > I'm a little surprised about all this activity. > > > > I though the conclusion at LSF/MM was that for Linux itself there > > is very little benefit in

Re: [dm-devel] [PATCH v4 00/13] support non power of 2 zoned devices

2022-05-18 Thread Luis Chamberlain
On Thu, May 19, 2022 at 12:08:26PM +0900, Damien Le Moal wrote: > On 5/18/22 00:34, Theodore Ts'o wrote: > > On Tue, May 17, 2022 at 10:10:48AM +0200, Christoph Hellwig wrote: > >> I'm a little surprised about all this activity. > >> > >> I though the conclusion at LSF/MM was that for Linux itself

Re: [dm-devel] [PATCH v5 6/7] null_blk: use zone_size_sects_shift for power of 2 zoned devices

2022-05-23 Thread Luis Chamberlain
2 zoned devices. > > Suggested-by: Damien Le Moal > Signed-off-by: Pankaj Raghav Reviewed-by: Luis Chamberlain Luis -- dm-devel mailing list dm-devel@redhat.com https://listman.redhat.com/mailman/listinfo/dm-devel

Re: [dm-devel] [PATCH v7 02/13] block: allow blk-zoned devices to have non-power-of-2 zone size

2022-06-16 Thread Luis Chamberlain
On Thu, Jun 16, 2022 at 12:09:35PM +0200, Pankaj Raghav wrote: > On 2022-06-15 22:28, Bart Van Assche wrote: > >> +    if (!is_power_of_2(zone->len) && zone->capacity < zone->len) { > >> +    pr_warn("%s: Invalid zone capacity for non power of 2 > >> zone size", > >> +   

Re: [dm-devel] [PATCH 16/16] dm-zoned: ensure only power of 2 zone sizes are allowed

2022-04-28 Thread Luis Chamberlain
On Thu, Apr 28, 2022 at 08:42:41AM +0900, Damien Le Moal wrote: > On 4/28/22 01:02, Pankaj Raghav wrote: > > From: Luis Chamberlain > > > > Today dm-zoned relies on the assumption that you have a zone size > > with a power of 2. Even though the block layer today en

Re: [dm-devel] [PATCH 04/16] block: allow blk-zoned devices to have non-power-of-2 zone size

2022-04-28 Thread Luis Chamberlain
On Thu, Apr 28, 2022 at 08:37:27AM +0900, Damien Le Moal wrote: > Also, the entire premise of this patch series is that it is hard for > people to support the unusable sectors between zone capacity and zone end > for drives with a zone capacity smaller than the zone size. > > Yet, here you do not

Re: [dm-devel] [PATCH 16/16] dm-zoned: ensure only power of 2 zone sizes are allowed

2022-04-28 Thread Luis Chamberlain
On Fri, Apr 29, 2022 at 06:43:58AM +0900, Damien Le Moal wrote: > On 4/29/22 02:34, Luis Chamberlain wrote: > > One step at a time. > > Yes, in general, I agree. But in this case, that will create kernel > versions that end up having partial support for zoned drives. Not ideal

Re: [dm-devel] [PATCH 3/5] iomap: simplify iomap_init() with PAGE_SECTORS

2023-04-21 Thread Luis Chamberlain
On Fri, Apr 21, 2023 at 09:14:00PM +0100, Matthew Wilcox wrote: > On Fri, Apr 21, 2023 at 12:58:05PM -0700, Luis Chamberlain wrote: > > Just use the PAGE_SECTORS generic define. This produces no functional > > changes. While at it use left shift to simplify this even further. >

Re: [dm-devel] [PATCH 3/5] iomap: simplify iomap_init() with PAGE_SECTORS

2023-04-21 Thread Luis Chamberlain
On Fri, Apr 21, 2023 at 04:24:57PM -0600, Jens Axboe wrote: > On 4/21/23 4:02 PM, Luis Chamberlain wrote: > > On Fri, Apr 21, 2023 at 09:14:00PM +0100, Matthew Wilcox wrote: > >> On Fri, Apr 21, 2023 at 12:58:05PM -0700, Luis Chamberlain wrote: > >>> Just use t

[dm-devel] [PATCH 1/5] dm integrity: simplify by using PAGE_SECTORS_SHIFT

2023-04-21 Thread Luis Chamberlain
The PAGE_SHIFT - SECTOR_SHIFT constant be replaced with PAGE_SECTORS_SHIFT defined in linux/blt_types.h, which is included by linux/blkdev.h. This produces no functional changes. Signed-off-by: Luis Chamberlain --- drivers/md/dm-integrity.c | 10 +- 1 file changed, 5 insertions(+), 5

[dm-devel] [PATCH 4/5] dm bufio: simplify by using PAGE_SECTORS_SHIFT

2023-04-21 Thread Luis Chamberlain
The PAGE_SHIFT - SECTOR_SHIFT constant be replaced with PAGE_SECTORS_SHIFT defined in linux/blt_types.h, which is included by linux/blkdev.h. This produces no functional changes. Signed-off-by: Luis Chamberlain --- drivers/md/dm-bufio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions

[dm-devel] [PATCH 5/5] zram: use generic PAGE_SECTORS and PAGE_SECTORS_SHIFT

2023-04-21 Thread Luis Chamberlain
Instead of re-defining the already existing constants use the provided ones: So replace: o SECTORS_PER_PAGE_SHIFT with PAGE_SECTORS_SHIFT o SECTORS_PER_PAGE with PAGE_SECTORS This produces no functional changes. Signed-off-by: Luis Chamberlain --- drivers/block/zram/zram_drv.c | 12

[dm-devel] [PATCH 3/5] iomap: simplify iomap_init() with PAGE_SECTORS

2023-04-21 Thread Luis Chamberlain
Just use the PAGE_SECTORS generic define. This produces no functional changes. While at it use left shift to simplify this even further. Signed-off-by: Luis Chamberlain --- fs/iomap/buffered-io.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/iomap/buffered-io.c b/fs

[dm-devel] [PATCH 0/5] block: simplify with PAGE_SECTORS_SHIFT

2023-04-21 Thread Luis Chamberlain
A bit of block drivers have their own incantations with PAGE_SHIFT - SECTOR_SHIFT. Just simplfy and use PAGE_SECTORS_SHIFT all over. Based on linux-next next-20230421. Luis Chamberlain (5): dm integrity: simplify by using PAGE_SECTORS_SHIFT drbd: use PAGE_SECTORS_SHIFT and PAGE_SECTORS

[dm-devel] [PATCH 2/5] drbd: use PAGE_SECTORS_SHIFT and PAGE_SECTORS

2023-04-21 Thread Luis Chamberlain
Replace common constants with generic versions. This produces no functional changes. Signed-off-by: Luis Chamberlain --- drivers/block/drbd/drbd_bitmap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/block/drbd/drbd_bitmap.c b/drivers/block/drbd/drbd_bitmap.c

[dm-devel] [PATCH v2 2/5] drbd: use PAGE_SECTORS_SHIFT and PAGE_SECTORS

2023-05-26 Thread Luis Chamberlain
Replace common constants with generic versions. This produces no functional changes. Acked-by: Christoph Böhmwalder Signed-off-by: Luis Chamberlain --- drivers/block/drbd/drbd_bitmap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/block/drbd/drbd_bitmap.c b

[dm-devel] [PATCH v2 3/5] iomap: simplify iomap_init() with PAGE_SECTORS

2023-05-26 Thread Luis Chamberlain
Replace common constants with generic versions. This produces no functional changes. Signed-off-by: Luis Chamberlain --- fs/iomap/buffered-io.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/iomap/buffered-io.c b/fs/iomap/buffered-io.c index 915b448b8554..5641e696fb3f

[dm-devel] [PATCH v2 5/5] zram: use generic PAGE_SECTORS and PAGE_SECTORS_SHIFT

2023-05-26 Thread Luis Chamberlain
Instead of re-defining the already existing constants use the provided ones: So replace: o SECTORS_PER_PAGE_SHIFT with PAGE_SECTORS_SHIFT o SECTORS_PER_PAGE with PAGE_SECTORS This produces no functional changes. Reviewed-by: Sergey Senozhatsky Signed-off-by: Luis Chamberlain

[dm-devel] [PATCH v2 4/5] dm bufio: simplify by using PAGE_SECTORS_SHIFT

2023-05-26 Thread Luis Chamberlain
The PAGE_SHIFT - SECTOR_SHIFT constant be replaced with PAGE_SECTORS_SHIFT defined in linux/blt_types.h, which is included by linux/blkdev.h. This produces no functional changes. Signed-off-by: Luis Chamberlain --- drivers/md/dm-bufio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions

[dm-devel] [PATCH v2 1/5] block: annotate bdev_disk_changed() deprecation with a symbol namespace

2023-05-26 Thread Luis Chamberlain
This ensures no other users pop up by mistake easily and provides us a with an easy vehicle to do the same with other routines should we need it later. Signed-off-by: Luis Chamberlain --- block/partitions/core.c | 6 +- drivers/block/loop.c| 2 ++ drivers/s390/block

[dm-devel] [PATCH v2 0/5] block: simplify with PAGE_SECTORS_SHIFT

2023-05-26 Thread Luis Chamberlain
. Based on linux-next next-20230525. Changes since v1: o keep iomap math visibly simple o Add tags for Reviews/acks o rebase onto next-20230525 Luis Chamberlain (5): block: annotate bdev_disk_changed() deprecation with a symbol namespace drbd: use

Re: [dm-devel] [PATCH v2 1/5] block: annotate bdev_disk_changed() deprecation with a symbol namespace

2023-05-26 Thread Luis Chamberlain
On Fri, May 26, 2023 at 01:13:14AM -0700, Christoph Hellwig wrote: > On Fri, May 26, 2023 at 12:33:32AM -0700, Luis Chamberlain wrote: > > This ensures no other users pop up by mistake easily and provides > > us a with an easy vehicle to do the same with other routines should >