* [PATCH v2 00/15] block: third batch of add_disk() error handling conversions
@ 2021-09-27 22:00 Luis Chamberlain
2021-09-27 22:00 ` [PATCH v2 01/15] z2ram: add error handling support for add_disk() Luis Chamberlain
` (15 more replies)
0 siblings, 16 replies; 19+ messages in thread
From: Luis Chamberlain @ 2021-09-27 22:00 UTC (permalink / raw)
To: axboe, justin, geert, ulf.hansson, hare, tj, philipp.reisner,
lars.ellenberg, jdike, richard, anton.ivanov, johannes.berg,
chris.obbard, krisman, zhuyifei1999, thehajime, chris, jcmvbkbc,
tim
Cc: linux-xtensa, linux-um, linux-m68k, drbd-dev, linux-block,
linux-kernel, Luis Chamberlain
This is the 2nd version of the third batch of driver conversions for the
add_disk() error handling. This and the entire 7th series of driver
conversions can be found on my 20210927-for-axboe-add-disk-error-handling
branch [0].
On this v2 series the following changes have been made since the v1
series of this patch set:
- rebased onto linux-next tag 20210927
- z2ram: fixed compile warning reported by 0day and Geert Uytterhoe
- um/drivers/ubd_kern: added the reviewed-by tag by Gabriel Krisman
Bertazi
[0] https://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux-next.git/log/?h=20210927-for-axboe-add-disk-error-handling
Christoph Hellwig (4):
pcd: move the identify buffer into pcd_identify
pcd: cleanup initialization
pf: cleanup initialization
pd: cleanup initialization
Luis Chamberlain (11):
z2ram: add error handling support for add_disk()
aoe: add error handling support for add_disk()
m68k/emu/nfblock: add error handling support for add_disk()
drbd: add error handling support for add_disk()
um/drivers/ubd_kern: add error handling support for add_disk()
xtensa/platforms/iss/simdisk: add error handling support for
add_disk()
n64cart: add error handling support for add_disk()
pcd: add error handling support for add_disk()
pcd: fix ordering of unregister_cdrom()
pcd: capture errors on cdrom_register()
pd: add error handling support for add_disk()
arch/m68k/emu/nfblock.c | 9 +-
arch/um/drivers/ubd_kern.c | 13 +-
arch/xtensa/platforms/iss/simdisk.c | 13 +-
drivers/block/aoe/aoeblk.c | 6 +-
drivers/block/drbd/drbd_main.c | 6 +-
drivers/block/n64cart.c | 12 +-
drivers/block/paride/pcd.c | 304 +++++++++++++---------------
drivers/block/paride/pd.c | 144 ++++++-------
drivers/block/paride/pf.c | 223 +++++++++-----------
drivers/block/z2ram.c | 7 +-
10 files changed, 364 insertions(+), 373 deletions(-)
--
2.30.2
^ permalink raw reply [flat|nested] 19+ messages in thread
* [PATCH v2 01/15] z2ram: add error handling support for add_disk()
2021-09-27 22:00 [PATCH v2 00/15] block: third batch of add_disk() error handling conversions Luis Chamberlain
@ 2021-09-27 22:00 ` Luis Chamberlain
2021-09-27 22:00 ` [PATCH v2 02/15] aoe: " Luis Chamberlain
` (14 subsequent siblings)
15 siblings, 0 replies; 19+ messages in thread
From: Luis Chamberlain @ 2021-09-27 22:00 UTC (permalink / raw)
To: axboe, justin, geert, ulf.hansson, hare, tj, philipp.reisner,
lars.ellenberg, jdike, richard, anton.ivanov, johannes.berg,
chris.obbard, krisman, zhuyifei1999, thehajime, chris, jcmvbkbc,
tim
Cc: linux-xtensa, linux-um, linux-m68k, drbd-dev, linux-block,
linux-kernel, 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. Only the disk is cleaned up inside
z2ram_register_disk() as the caller deals with the rest.
Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
---
drivers/block/z2ram.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/drivers/block/z2ram.c b/drivers/block/z2ram.c
index 4eef218108c6..ccc52c935faf 100644
--- a/drivers/block/z2ram.c
+++ b/drivers/block/z2ram.c
@@ -318,6 +318,7 @@ static const struct blk_mq_ops z2_mq_ops = {
static int z2ram_register_disk(int minor)
{
struct gendisk *disk;
+ int err;
disk = blk_mq_alloc_disk(&tag_set, NULL);
if (IS_ERR(disk))
@@ -333,8 +334,10 @@ static int z2ram_register_disk(int minor)
sprintf(disk->disk_name, "z2ram");
z2ram_gendisk[minor] = disk;
- add_disk(disk);
- return 0;
+ err = add_disk(disk);
+ if (err)
+ blk_cleanup_disk(disk);
+ return err;
}
static int __init z2_init(void)
--
2.30.2
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [PATCH v2 02/15] aoe: add error handling support for add_disk()
2021-09-27 22:00 [PATCH v2 00/15] block: third batch of add_disk() error handling conversions Luis Chamberlain
2021-09-27 22:00 ` [PATCH v2 01/15] z2ram: add error handling support for add_disk() Luis Chamberlain
@ 2021-09-27 22:00 ` Luis Chamberlain
2021-09-27 22:00 ` [PATCH v2 03/15] m68k/emu/nfblock: " Luis Chamberlain
` (13 subsequent siblings)
15 siblings, 0 replies; 19+ messages in thread
From: Luis Chamberlain @ 2021-09-27 22:00 UTC (permalink / raw)
To: axboe, justin, geert, ulf.hansson, hare, tj, philipp.reisner,
lars.ellenberg, jdike, richard, anton.ivanov, johannes.berg,
chris.obbard, krisman, zhuyifei1999, thehajime, chris, jcmvbkbc,
tim
Cc: linux-xtensa, linux-um, linux-m68k, drbd-dev, linux-block,
linux-kernel, 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 <mcgrof@kernel.org>
---
drivers/block/aoe/aoeblk.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/block/aoe/aoeblk.c b/drivers/block/aoe/aoeblk.c
index 06b360f7123a..e436b0e8eff5 100644
--- a/drivers/block/aoe/aoeblk.c
+++ b/drivers/block/aoe/aoeblk.c
@@ -417,7 +417,9 @@ aoeblk_gdalloc(void *vp)
spin_unlock_irqrestore(&d->lock, flags);
- device_add_disk(NULL, gd, aoe_attr_groups);
+ err = device_add_disk(NULL, gd, aoe_attr_groups);
+ if (err)
+ goto out_disk_cleanup;
aoedisk_add_debugfs(d);
spin_lock_irqsave(&d->lock, flags);
@@ -426,6 +428,8 @@ aoeblk_gdalloc(void *vp)
spin_unlock_irqrestore(&d->lock, flags);
return;
+out_disk_cleanup:
+ blk_cleanup_disk(gd);
err_tagset:
blk_mq_free_tag_set(set);
err_mempool:
--
2.30.2
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [PATCH v2 03/15] m68k/emu/nfblock: add error handling support for add_disk()
2021-09-27 22:00 [PATCH v2 00/15] block: third batch of add_disk() error handling conversions Luis Chamberlain
2021-09-27 22:00 ` [PATCH v2 01/15] z2ram: add error handling support for add_disk() Luis Chamberlain
2021-09-27 22:00 ` [PATCH v2 02/15] aoe: " Luis Chamberlain
@ 2021-09-27 22:00 ` Luis Chamberlain
2021-09-27 22:00 ` [PATCH v2 04/15] drbd: " Luis Chamberlain
` (12 subsequent siblings)
15 siblings, 0 replies; 19+ messages in thread
From: Luis Chamberlain @ 2021-09-27 22:00 UTC (permalink / raw)
To: axboe, justin, geert, ulf.hansson, hare, tj, philipp.reisner,
lars.ellenberg, jdike, richard, anton.ivanov, johannes.berg,
chris.obbard, krisman, zhuyifei1999, thehajime, chris, jcmvbkbc,
tim
Cc: linux-xtensa, linux-um, linux-m68k, drbd-dev, linux-block,
linux-kernel, 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 <geert@linux-m68k.org>
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
---
arch/m68k/emu/nfblock.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/arch/m68k/emu/nfblock.c b/arch/m68k/emu/nfblock.c
index 9a8394e96388..4de5a6087034 100644
--- a/arch/m68k/emu/nfblock.c
+++ b/arch/m68k/emu/nfblock.c
@@ -100,6 +100,7 @@ static int __init nfhd_init_one(int id, u32 blocks, u32 bsize)
{
struct nfhd_device *dev;
int dev_id = id - NFHD_DEV_OFFSET;
+ int err = -ENOMEM;
pr_info("nfhd%u: found device with %u blocks (%u bytes)\n", dev_id,
blocks, bsize);
@@ -130,16 +131,20 @@ static int __init nfhd_init_one(int id, u32 blocks, u32 bsize)
sprintf(dev->disk->disk_name, "nfhd%u", dev_id);
set_capacity(dev->disk, (sector_t)blocks * (bsize / 512));
blk_queue_logical_block_size(dev->disk->queue, bsize);
- add_disk(dev->disk);
+ err = add_disk(dev->disk);
+ if (err)
+ goto out_cleanup_disk;
list_add_tail(&dev->list, &nfhd_list);
return 0;
+out_cleanup_disk:
+ blk_cleanup_disk(dev->disk);
free_dev:
kfree(dev);
out:
- return -ENOMEM;
+ return err;
}
static int __init nfhd_init(void)
--
2.30.2
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [PATCH v2 04/15] drbd: add error handling support for add_disk()
2021-09-27 22:00 [PATCH v2 00/15] block: third batch of add_disk() error handling conversions Luis Chamberlain
` (2 preceding siblings ...)
2021-09-27 22:00 ` [PATCH v2 03/15] m68k/emu/nfblock: " Luis Chamberlain
@ 2021-09-27 22:00 ` Luis Chamberlain
2021-09-27 22:01 ` [PATCH v2 05/15] um/drivers/ubd_kern: " Luis Chamberlain
` (11 subsequent siblings)
15 siblings, 0 replies; 19+ messages in thread
From: Luis Chamberlain @ 2021-09-27 22:00 UTC (permalink / raw)
To: axboe, justin, geert, ulf.hansson, hare, tj, philipp.reisner,
lars.ellenberg, jdike, richard, anton.ivanov, johannes.berg,
chris.obbard, krisman, zhuyifei1999, thehajime, chris, jcmvbkbc,
tim
Cc: linux-xtensa, linux-um, linux-m68k, drbd-dev, linux-block,
linux-kernel, 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 <mcgrof@kernel.org>
---
drivers/block/drbd/drbd_main.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/block/drbd/drbd_main.c b/drivers/block/drbd/drbd_main.c
index 55234a558e98..19db80a1e409 100644
--- a/drivers/block/drbd/drbd_main.c
+++ b/drivers/block/drbd/drbd_main.c
@@ -2794,7 +2794,9 @@ enum drbd_ret_code drbd_create_device(struct drbd_config_context *adm_ctx, unsig
goto out_idr_remove_vol;
}
- add_disk(disk);
+ err = add_disk(disk);
+ if (err)
+ goto out_cleanup_disk;
/* inherit the connection state */
device->state.conn = first_connection(resource)->cstate;
@@ -2808,6 +2810,8 @@ enum drbd_ret_code drbd_create_device(struct drbd_config_context *adm_ctx, unsig
drbd_debugfs_device_add(device);
return NO_ERROR;
+out_cleanup_disk:
+ blk_cleanup_disk(disk);
out_idr_remove_vol:
idr_remove(&connection->peer_devices, vnr);
out_idr_remove_from_resource:
--
2.30.2
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [PATCH v2 05/15] um/drivers/ubd_kern: add error handling support for add_disk()
2021-09-27 22:00 [PATCH v2 00/15] block: third batch of add_disk() error handling conversions Luis Chamberlain
` (3 preceding siblings ...)
2021-09-27 22:00 ` [PATCH v2 04/15] drbd: " Luis Chamberlain
@ 2021-09-27 22:01 ` Luis Chamberlain
2021-09-27 22:01 ` [PATCH v2 06/15] xtensa/platforms/iss/simdisk: " Luis Chamberlain
` (10 subsequent siblings)
15 siblings, 0 replies; 19+ messages in thread
From: Luis Chamberlain @ 2021-09-27 22:01 UTC (permalink / raw)
To: axboe, justin, geert, ulf.hansson, hare, tj, philipp.reisner,
lars.ellenberg, jdike, richard, anton.ivanov, johannes.berg,
chris.obbard, krisman, zhuyifei1999, thehajime, chris, jcmvbkbc,
tim
Cc: linux-xtensa, linux-um, linux-m68k, drbd-dev, linux-block,
linux-kernel, 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.
ubd_disk_register() never returned an error, so just fix
that now and let the caller handle the error condition.
Reviewed-by: Gabriel Krisman Bertazi <krisman@collabora.com>
Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
---
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 cd9dc0556e91..81045c199c30 100644
--- a/arch/um/drivers/ubd_kern.c
+++ b/arch/um/drivers/ubd_kern.c
@@ -854,8 +854,8 @@ static const struct attribute_group *ubd_attr_groups[] = {
NULL,
};
-static void ubd_disk_register(int major, u64 size, int unit,
- struct gendisk *disk)
+static int ubd_disk_register(int major, u64 size, int unit,
+ struct gendisk *disk)
{
disk->major = major;
disk->first_minor = unit << UBD_SHIFT;
@@ -872,7 +872,7 @@ static void ubd_disk_register(int major, u64 size, int unit,
disk->private_data = &ubd_devs[unit];
disk->queue = ubd_devs[unit].queue;
- device_add_disk(&ubd_devs[unit].pdev.dev, disk, ubd_attr_groups);
+ return device_add_disk(&ubd_devs[unit].pdev.dev, disk, ubd_attr_groups);
}
#define ROUND_BLOCK(n) ((n + (SECTOR_SIZE - 1)) & (-SECTOR_SIZE))
@@ -919,10 +919,15 @@ static int ubd_add(int n, char **error_out)
blk_queue_write_cache(ubd_dev->queue, true, false);
blk_queue_max_segments(ubd_dev->queue, MAX_SG);
blk_queue_segment_boundary(ubd_dev->queue, PAGE_SIZE - 1);
- ubd_disk_register(UBD_MAJOR, ubd_dev->size, n, disk);
+ err = ubd_disk_register(UBD_MAJOR, ubd_dev->size, n, disk);
+ if (err)
+ goto out_cleanup_disk;
+
ubd_gendisk[n] = disk;
return 0;
+out_cleanup_disk:
+ blk_cleanup_disk(disk);
out_cleanup_tags:
blk_mq_free_tag_set(&ubd_dev->tag_set);
out:
--
2.30.2
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [PATCH v2 06/15] xtensa/platforms/iss/simdisk: add error handling support for add_disk()
2021-09-27 22:00 [PATCH v2 00/15] block: third batch of add_disk() error handling conversions Luis Chamberlain
` (4 preceding siblings ...)
2021-09-27 22:01 ` [PATCH v2 05/15] um/drivers/ubd_kern: " Luis Chamberlain
@ 2021-09-27 22:01 ` Luis Chamberlain
2021-09-27 22:50 ` Max Filippov
2021-09-27 22:01 ` [PATCH v2 07/15] n64cart: " Luis Chamberlain
` (9 subsequent siblings)
15 siblings, 1 reply; 19+ messages in thread
From: Luis Chamberlain @ 2021-09-27 22:01 UTC (permalink / raw)
To: axboe, justin, geert, ulf.hansson, hare, tj, philipp.reisner,
lars.ellenberg, jdike, richard, anton.ivanov, johannes.berg,
chris.obbard, krisman, zhuyifei1999, thehajime, chris, jcmvbkbc,
tim
Cc: linux-xtensa, linux-um, linux-m68k, drbd-dev, linux-block,
linux-kernel, 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 <mcgrof@kernel.org>
---
arch/xtensa/platforms/iss/simdisk.c | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/arch/xtensa/platforms/iss/simdisk.c b/arch/xtensa/platforms/iss/simdisk.c
index 3cdfa00738e0..ad85c554cd45 100644
--- a/arch/xtensa/platforms/iss/simdisk.c
+++ b/arch/xtensa/platforms/iss/simdisk.c
@@ -259,6 +259,7 @@ static int __init simdisk_setup(struct simdisk *dev, int which,
struct proc_dir_entry *procdir)
{
char tmp[2] = { '0' + which, 0 };
+ int err = -ENOMEM;
dev->fd = -1;
dev->filename = NULL;
@@ -267,7 +268,7 @@ static int __init simdisk_setup(struct simdisk *dev, int which,
dev->gd = blk_alloc_disk(NUMA_NO_NODE);
if (!dev->gd)
- return -ENOMEM;
+ goto out;
dev->gd->major = simdisk_major;
dev->gd->first_minor = which;
dev->gd->minors = SIMDISK_MINORS;
@@ -275,10 +276,18 @@ static int __init simdisk_setup(struct simdisk *dev, int which,
dev->gd->private_data = dev;
snprintf(dev->gd->disk_name, 32, "simdisk%d", which);
set_capacity(dev->gd, 0);
- add_disk(dev->gd);
+ err = add_disk(dev->gd);
+ if (err)
+ goto out_cleanup_disk;
dev->procfile = proc_create_data(tmp, 0644, procdir, &simdisk_proc_ops, dev);
+
return 0;
+
+out_cleanup_disk:
+ blk_cleanup_disk(dev->gd);
+out:
+ return err;
}
static int __init simdisk_init(void)
--
2.30.2
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [PATCH v2 07/15] n64cart: add error handling support for add_disk()
2021-09-27 22:00 [PATCH v2 00/15] block: third batch of add_disk() error handling conversions Luis Chamberlain
` (5 preceding siblings ...)
2021-09-27 22:01 ` [PATCH v2 06/15] xtensa/platforms/iss/simdisk: " Luis Chamberlain
@ 2021-09-27 22:01 ` Luis Chamberlain
2021-09-27 22:01 ` [PATCH v2 08/15] pcd: move the identify buffer into pcd_identify Luis Chamberlain
` (8 subsequent siblings)
15 siblings, 0 replies; 19+ messages in thread
From: Luis Chamberlain @ 2021-09-27 22:01 UTC (permalink / raw)
To: axboe, justin, geert, ulf.hansson, hare, tj, philipp.reisner,
lars.ellenberg, jdike, richard, anton.ivanov, johannes.berg,
chris.obbard, krisman, zhuyifei1999, thehajime, chris, jcmvbkbc,
tim
Cc: linux-xtensa, linux-um, linux-m68k, drbd-dev, linux-block,
linux-kernel, 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 <mcgrof@kernel.org>
---
drivers/block/n64cart.c | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/drivers/block/n64cart.c b/drivers/block/n64cart.c
index 26798da661bd..35aa5d38f57d 100644
--- a/drivers/block/n64cart.c
+++ b/drivers/block/n64cart.c
@@ -117,6 +117,7 @@ static const struct block_device_operations n64cart_fops = {
static int __init n64cart_probe(struct platform_device *pdev)
{
struct gendisk *disk;
+ int err = -ENOMEM;
if (!start || !size) {
pr_err("start or size not specified\n");
@@ -134,7 +135,7 @@ static int __init n64cart_probe(struct platform_device *pdev)
disk = blk_alloc_disk(NUMA_NO_NODE);
if (!disk)
- return -ENOMEM;
+ goto out;
disk->first_minor = 0;
disk->flags = GENHD_FL_NO_PART_SCAN;
@@ -149,11 +150,18 @@ static int __init n64cart_probe(struct platform_device *pdev)
blk_queue_physical_block_size(disk->queue, 4096);
blk_queue_logical_block_size(disk->queue, 4096);
- add_disk(disk);
+ err = add_disk(disk);
+ if (err)
+ goto out_cleanup_disk;
pr_info("n64cart: %u kb disk\n", size / 1024);
return 0;
+
+out_cleanup_disk:
+ blk_cleanup_disk(disk);
+out:
+ return err;
}
static struct platform_driver n64cart_driver = {
--
2.30.2
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [PATCH v2 08/15] pcd: move the identify buffer into pcd_identify
2021-09-27 22:00 [PATCH v2 00/15] block: third batch of add_disk() error handling conversions Luis Chamberlain
` (6 preceding siblings ...)
2021-09-27 22:01 ` [PATCH v2 07/15] n64cart: " Luis Chamberlain
@ 2021-09-27 22:01 ` Luis Chamberlain
2021-09-27 22:01 ` [PATCH v2 09/15] pcd: cleanup initialization Luis Chamberlain
` (7 subsequent siblings)
15 siblings, 0 replies; 19+ messages in thread
From: Luis Chamberlain @ 2021-09-27 22:01 UTC (permalink / raw)
To: axboe, justin, geert, ulf.hansson, hare, tj, philipp.reisner,
lars.ellenberg, jdike, richard, anton.ivanov, johannes.berg,
chris.obbard, krisman, zhuyifei1999, thehajime, chris, jcmvbkbc,
tim
Cc: linux-xtensa, linux-um, linux-m68k, drbd-dev, linux-block,
linux-kernel, Christoph Hellwig
From: Christoph Hellwig <hch@lst.de>
No need to pass it through a bunch of functions.
Signed-off-by: Christoph Hellwig <hch@lst.de>
---
drivers/block/paride/pcd.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/drivers/block/paride/pcd.c b/drivers/block/paride/pcd.c
index f9cdd11f02f5..8903fdaa2046 100644
--- a/drivers/block/paride/pcd.c
+++ b/drivers/block/paride/pcd.c
@@ -630,10 +630,11 @@ static int pcd_drive_status(struct cdrom_device_info *cdi, int slot_nr)
return CDS_DISC_OK;
}
-static int pcd_identify(struct pcd_unit *cd, char *id)
+static int pcd_identify(struct pcd_unit *cd)
{
- int k, s;
char id_cmd[12] = { 0x12, 0, 0, 0, 36, 0, 0, 0, 0, 0, 0, 0 };
+ char id[18];
+ int k, s;
pcd_bufblk = -1;
@@ -664,15 +665,15 @@ static int pcd_identify(struct pcd_unit *cd, char *id)
* returns 0, with id set if drive is detected
* -1, if drive detection failed
*/
-static int pcd_probe(struct pcd_unit *cd, int ms, char *id)
+static int pcd_probe(struct pcd_unit *cd, int ms)
{
if (ms == -1) {
for (cd->drive = 0; cd->drive <= 1; cd->drive++)
- if (!pcd_reset(cd) && !pcd_identify(cd, id))
+ if (!pcd_reset(cd) && !pcd_identify(cd))
return 0;
} else {
cd->drive = ms;
- if (!pcd_reset(cd) && !pcd_identify(cd, id))
+ if (!pcd_reset(cd) && !pcd_identify(cd))
return 0;
}
return -1;
@@ -709,7 +710,6 @@ static void pcd_probe_capabilities(void)
static int pcd_detect(void)
{
- char id[18];
int k, unit;
struct pcd_unit *cd;
@@ -727,7 +727,7 @@ static int pcd_detect(void)
cd = pcd;
if (cd->disk && pi_init(cd->pi, 1, -1, -1, -1, -1, -1,
pcd_buffer, PI_PCD, verbose, cd->name)) {
- if (!pcd_probe(cd, -1, id)) {
+ if (!pcd_probe(cd, -1)) {
cd->present = 1;
k++;
} else
@@ -744,7 +744,7 @@ static int pcd_detect(void)
conf[D_UNI], conf[D_PRO], conf[D_DLY],
pcd_buffer, PI_PCD, verbose, cd->name))
continue;
- if (!pcd_probe(cd, conf[D_SLV], id)) {
+ if (!pcd_probe(cd, conf[D_SLV])) {
cd->present = 1;
k++;
} else
--
2.30.2
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [PATCH v2 09/15] pcd: cleanup initialization
2021-09-27 22:00 [PATCH v2 00/15] block: third batch of add_disk() error handling conversions Luis Chamberlain
` (7 preceding siblings ...)
2021-09-27 22:01 ` [PATCH v2 08/15] pcd: move the identify buffer into pcd_identify Luis Chamberlain
@ 2021-09-27 22:01 ` Luis Chamberlain
2021-09-27 22:01 ` [PATCH v2 10/15] pf: " Luis Chamberlain
` (6 subsequent siblings)
15 siblings, 0 replies; 19+ messages in thread
From: Luis Chamberlain @ 2021-09-27 22:01 UTC (permalink / raw)
To: axboe, justin, geert, ulf.hansson, hare, tj, philipp.reisner,
lars.ellenberg, jdike, richard, anton.ivanov, johannes.berg,
chris.obbard, krisman, zhuyifei1999, thehajime, chris, jcmvbkbc,
tim
Cc: linux-xtensa, linux-um, linux-m68k, drbd-dev, linux-block,
linux-kernel, Christoph Hellwig
From: Christoph Hellwig <hch@lst.de>
Refactor the pcd initialization to have a dedicated helper to initialize
a single disk.
Signed-off-by: Christoph Hellwig <hch@lst.de>
---
drivers/block/paride/pcd.c | 286 ++++++++++++++++---------------------
1 file changed, 127 insertions(+), 159 deletions(-)
diff --git a/drivers/block/paride/pcd.c b/drivers/block/paride/pcd.c
index 8903fdaa2046..93ed63626232 100644
--- a/drivers/block/paride/pcd.c
+++ b/drivers/block/paride/pcd.c
@@ -183,8 +183,6 @@ static int pcd_audio_ioctl(struct cdrom_device_info *cdi,
static int pcd_packet(struct cdrom_device_info *cdi,
struct packet_command *cgc);
-static int pcd_detect(void);
-static void pcd_probe_capabilities(void);
static void do_pcd_read_drq(void);
static blk_status_t pcd_queue_rq(struct blk_mq_hw_ctx *hctx,
const struct blk_mq_queue_data *bd);
@@ -302,53 +300,6 @@ static const struct blk_mq_ops pcd_mq_ops = {
.queue_rq = pcd_queue_rq,
};
-static void pcd_init_units(void)
-{
- struct pcd_unit *cd;
- int unit;
-
- pcd_drive_count = 0;
- for (unit = 0, cd = pcd; unit < PCD_UNITS; unit++, cd++) {
- struct gendisk *disk;
-
- if (blk_mq_alloc_sq_tag_set(&cd->tag_set, &pcd_mq_ops, 1,
- BLK_MQ_F_SHOULD_MERGE))
- continue;
-
- disk = blk_mq_alloc_disk(&cd->tag_set, cd);
- if (IS_ERR(disk)) {
- blk_mq_free_tag_set(&cd->tag_set);
- continue;
- }
-
- INIT_LIST_HEAD(&cd->rq_list);
- blk_queue_bounce_limit(disk->queue, BLK_BOUNCE_HIGH);
- cd->disk = disk;
- cd->pi = &cd->pia;
- cd->present = 0;
- cd->last_sense = 0;
- cd->changed = 1;
- cd->drive = (*drives[unit])[D_SLV];
- if ((*drives[unit])[D_PRT])
- pcd_drive_count++;
-
- cd->name = &cd->info.name[0];
- snprintf(cd->name, sizeof(cd->info.name), "%s%d", name, unit);
- cd->info.ops = &pcd_dops;
- cd->info.handle = cd;
- cd->info.speed = 0;
- cd->info.capacity = 1;
- cd->info.mask = 0;
- disk->major = major;
- disk->first_minor = unit;
- disk->minors = 1;
- strcpy(disk->disk_name, cd->name); /* umm... */
- disk->fops = &pcd_bdops;
- disk->flags = GENHD_FL_BLOCK_EVENTS_ON_EXCL_WRITE;
- disk->events = DISK_EVENT_MEDIA_CHANGE;
- }
-}
-
static int pcd_open(struct cdrom_device_info *cdi, int purpose)
{
struct pcd_unit *cd = cdi->handle;
@@ -679,90 +630,31 @@ static int pcd_probe(struct pcd_unit *cd, int ms)
return -1;
}
-static void pcd_probe_capabilities(void)
+static int pcd_probe_capabilities(struct pcd_unit *cd)
{
- int unit, r;
- char buffer[32];
char cmd[12] = { 0x5a, 1 << 3, 0x2a, 0, 0, 0, 0, 18, 0, 0, 0, 0 };
- struct pcd_unit *cd;
-
- for (unit = 0, cd = pcd; unit < PCD_UNITS; unit++, cd++) {
- if (!cd->present)
- continue;
- r = pcd_atapi(cd, cmd, 18, buffer, "mode sense capabilities");
- if (r)
- continue;
- /* we should now have the cap page */
- if ((buffer[11] & 1) == 0)
- cd->info.mask |= CDC_CD_R;
- if ((buffer[11] & 2) == 0)
- cd->info.mask |= CDC_CD_RW;
- if ((buffer[12] & 1) == 0)
- cd->info.mask |= CDC_PLAY_AUDIO;
- if ((buffer[14] & 1) == 0)
- cd->info.mask |= CDC_LOCK;
- if ((buffer[14] & 8) == 0)
- cd->info.mask |= CDC_OPEN_TRAY;
- if ((buffer[14] >> 6) == 0)
- cd->info.mask |= CDC_CLOSE_TRAY;
- }
-}
-
-static int pcd_detect(void)
-{
- int k, unit;
- struct pcd_unit *cd;
-
- printk("%s: %s version %s, major %d, nice %d\n",
- name, name, PCD_VERSION, major, nice);
+ char buffer[32];
+ int ret;
- par_drv = pi_register_driver(name);
- if (!par_drv) {
- pr_err("failed to register %s driver\n", name);
- return -1;
- }
+ ret = pcd_atapi(cd, cmd, 18, buffer, "mode sense capabilities");
+ if (ret)
+ return ret;
+
+ /* we should now have the cap page */
+ if ((buffer[11] & 1) == 0)
+ cd->info.mask |= CDC_CD_R;
+ if ((buffer[11] & 2) == 0)
+ cd->info.mask |= CDC_CD_RW;
+ if ((buffer[12] & 1) == 0)
+ cd->info.mask |= CDC_PLAY_AUDIO;
+ if ((buffer[14] & 1) == 0)
+ cd->info.mask |= CDC_LOCK;
+ if ((buffer[14] & 8) == 0)
+ cd->info.mask |= CDC_OPEN_TRAY;
+ if ((buffer[14] >> 6) == 0)
+ cd->info.mask |= CDC_CLOSE_TRAY;
- k = 0;
- if (pcd_drive_count == 0) { /* nothing spec'd - so autoprobe for 1 */
- cd = pcd;
- if (cd->disk && pi_init(cd->pi, 1, -1, -1, -1, -1, -1,
- pcd_buffer, PI_PCD, verbose, cd->name)) {
- if (!pcd_probe(cd, -1)) {
- cd->present = 1;
- k++;
- } else
- pi_release(cd->pi);
- }
- } else {
- for (unit = 0, cd = pcd; unit < PCD_UNITS; unit++, cd++) {
- int *conf = *drives[unit];
- if (!conf[D_PRT])
- continue;
- if (!cd->disk)
- continue;
- if (!pi_init(cd->pi, 0, conf[D_PRT], conf[D_MOD],
- conf[D_UNI], conf[D_PRO], conf[D_DLY],
- pcd_buffer, PI_PCD, verbose, cd->name))
- continue;
- if (!pcd_probe(cd, conf[D_SLV])) {
- cd->present = 1;
- k++;
- } else
- pi_release(cd->pi);
- }
- }
- if (k)
- return 0;
-
- printk("%s: No CD-ROM drive found\n", name);
- for (unit = 0, cd = pcd; unit < PCD_UNITS; unit++, cd++) {
- if (!cd->disk)
- continue;
- blk_cleanup_disk(cd->disk);
- blk_mq_free_tag_set(&cd->tag_set);
- }
- pi_unregister_driver(par_drv);
- return -1;
+ return 0;
}
/* I/O request processing */
@@ -999,43 +891,121 @@ static int pcd_get_mcn(struct cdrom_device_info *cdi, struct cdrom_mcn *mcn)
return 0;
}
+static int pcd_init_unit(struct pcd_unit *cd, bool autoprobe, int port,
+ int mode, int unit, int protocol, int delay, int ms)
+{
+ struct gendisk *disk;
+ int ret;
+
+ ret = blk_mq_alloc_sq_tag_set(&cd->tag_set, &pcd_mq_ops, 1,
+ BLK_MQ_F_SHOULD_MERGE);
+ if (ret)
+ return ret;
+
+ disk = blk_mq_alloc_disk(&cd->tag_set, cd);
+ if (IS_ERR(disk)) {
+ ret = PTR_ERR(disk);
+ goto out_free_tag_set;
+ }
+
+ INIT_LIST_HEAD(&cd->rq_list);
+ blk_queue_bounce_limit(disk->queue, BLK_BOUNCE_HIGH);
+ cd->disk = disk;
+ cd->pi = &cd->pia;
+ cd->present = 0;
+ cd->last_sense = 0;
+ cd->changed = 1;
+ cd->drive = (*drives[cd - pcd])[D_SLV];
+
+ cd->name = &cd->info.name[0];
+ snprintf(cd->name, sizeof(cd->info.name), "%s%d", name, unit);
+ cd->info.ops = &pcd_dops;
+ cd->info.handle = cd;
+ cd->info.speed = 0;
+ cd->info.capacity = 1;
+ cd->info.mask = 0;
+ disk->major = major;
+ disk->first_minor = unit;
+ disk->minors = 1;
+ strcpy(disk->disk_name, cd->name); /* umm... */
+ disk->fops = &pcd_bdops;
+ disk->flags = GENHD_FL_BLOCK_EVENTS_ON_EXCL_WRITE;
+ disk->events = DISK_EVENT_MEDIA_CHANGE;
+
+ if (!pi_init(cd->pi, autoprobe, port, mode, unit, protocol, delay,
+ pcd_buffer, PI_PCD, verbose, cd->name))
+ goto out_free_disk;
+ if (pcd_probe(cd, ms))
+ goto out_pi_release;
+
+ cd->present = 1;
+ pcd_probe_capabilities(cd);
+ register_cdrom(cd->disk, &cd->info);
+ add_disk(cd->disk);
+ return 0;
+
+out_pi_release:
+ pi_release(cd->pi);
+out_free_disk:
+ blk_cleanup_disk(cd->disk);
+out_free_tag_set:
+ blk_mq_free_tag_set(&cd->tag_set);
+ return ret;
+}
+
static int __init pcd_init(void)
{
- struct pcd_unit *cd;
- int unit;
+ int found = 0, unit;
if (disable)
return -EINVAL;
- pcd_init_units();
+ if (register_blkdev(major, name))
+ return -EBUSY;
- if (pcd_detect())
- return -ENODEV;
+ pr_info("%s: %s version %s, major %d, nice %d\n",
+ name, name, PCD_VERSION, major, nice);
- /* get the atapi capabilities page */
- pcd_probe_capabilities();
+ par_drv = pi_register_driver(name);
+ if (!par_drv) {
+ pr_err("failed to register %s driver\n", name);
+ goto out_unregister_blkdev;
+ }
- if (register_blkdev(major, name)) {
- for (unit = 0, cd = pcd; unit < PCD_UNITS; unit++, cd++) {
- if (!cd->disk)
- continue;
+ for (unit = 0; unit < PCD_UNITS; unit++) {
+ if ((*drives[unit])[D_PRT])
+ pcd_drive_count++;
+ }
- blk_cleanup_queue(cd->disk->queue);
- blk_mq_free_tag_set(&cd->tag_set);
- put_disk(cd->disk);
+ if (pcd_drive_count == 0) { /* nothing spec'd - so autoprobe for 1 */
+ if (!pcd_init_unit(pcd, 1, -1, -1, -1, -1, -1, -1))
+ found++;
+ } else {
+ for (unit = 0; unit < PCD_UNITS; unit++) {
+ struct pcd_unit *cd = &pcd[unit];
+ int *conf = *drives[unit];
+
+ if (!conf[D_PRT])
+ continue;
+ if (!pcd_init_unit(cd, 0, conf[D_PRT], conf[D_MOD],
+ conf[D_UNI], conf[D_PRO], conf[D_DLY],
+ conf[D_SLV]))
+ found++;
}
- return -EBUSY;
}
- for (unit = 0, cd = pcd; unit < PCD_UNITS; unit++, cd++) {
- if (cd->present) {
- register_cdrom(cd->disk, &cd->info);
- cd->disk->private_data = cd;
- add_disk(cd->disk);
- }
+ if (!found) {
+ pr_info("%s: No CD-ROM drive found\n", name);
+ goto out_unregister_pi_driver;
}
return 0;
+
+out_unregister_pi_driver:
+ pi_unregister_driver(par_drv);
+out_unregister_blkdev:
+ unregister_blkdev(major, name);
+ return -ENODEV;
}
static void __exit pcd_exit(void)
@@ -1044,20 +1014,18 @@ static void __exit pcd_exit(void)
int unit;
for (unit = 0, cd = pcd; unit < PCD_UNITS; unit++, cd++) {
- if (!cd->disk)
+ if (!cd->present)
continue;
- if (cd->present) {
- del_gendisk(cd->disk);
- pi_release(cd->pi);
- unregister_cdrom(&cd->info);
- }
- blk_cleanup_queue(cd->disk->queue);
+ del_gendisk(cd->disk);
+ pi_release(cd->pi);
+ unregister_cdrom(&cd->info);
+ blk_cleanup_disk(cd->disk);
+
blk_mq_free_tag_set(&cd->tag_set);
- put_disk(cd->disk);
}
- unregister_blkdev(major, name);
pi_unregister_driver(par_drv);
+ unregister_blkdev(major, name);
}
MODULE_LICENSE("GPL");
--
2.30.2
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [PATCH v2 10/15] pf: cleanup initialization
2021-09-27 22:00 [PATCH v2 00/15] block: third batch of add_disk() error handling conversions Luis Chamberlain
` (8 preceding siblings ...)
2021-09-27 22:01 ` [PATCH v2 09/15] pcd: cleanup initialization Luis Chamberlain
@ 2021-09-27 22:01 ` Luis Chamberlain
2021-09-27 22:01 ` [PATCH v2 11/15] pd: " Luis Chamberlain
` (5 subsequent siblings)
15 siblings, 0 replies; 19+ messages in thread
From: Luis Chamberlain @ 2021-09-27 22:01 UTC (permalink / raw)
To: axboe, justin, geert, ulf.hansson, hare, tj, philipp.reisner,
lars.ellenberg, jdike, richard, anton.ivanov, johannes.berg,
chris.obbard, krisman, zhuyifei1999, thehajime, chris, jcmvbkbc,
tim
Cc: linux-xtensa, linux-um, linux-m68k, drbd-dev, linux-block,
linux-kernel, Christoph Hellwig
From: Christoph Hellwig <hch@lst.de>
Refactor the pf initialization to have a dedicated helper to initialize
a single disk.
Signed-off-by: Christoph Hellwig <hch@lst.de>
---
drivers/block/paride/pf.c | 223 +++++++++++++++++---------------------
1 file changed, 99 insertions(+), 124 deletions(-)
diff --git a/drivers/block/paride/pf.c b/drivers/block/paride/pf.c
index d5b9c88ba76f..f471d48a87bc 100644
--- a/drivers/block/paride/pf.c
+++ b/drivers/block/paride/pf.c
@@ -214,7 +214,6 @@ static int pf_getgeo(struct block_device *bdev, struct hd_geometry *geo);
static void pf_release(struct gendisk *disk, fmode_t mode);
-static int pf_detect(void);
static void do_pf_read(void);
static void do_pf_read_start(void);
static void do_pf_write(void);
@@ -285,45 +284,6 @@ static const struct blk_mq_ops pf_mq_ops = {
.queue_rq = pf_queue_rq,
};
-static void __init pf_init_units(void)
-{
- struct pf_unit *pf;
- int unit;
-
- pf_drive_count = 0;
- for (unit = 0, pf = units; unit < PF_UNITS; unit++, pf++) {
- struct gendisk *disk;
-
- if (blk_mq_alloc_sq_tag_set(&pf->tag_set, &pf_mq_ops, 1,
- BLK_MQ_F_SHOULD_MERGE))
- continue;
-
- disk = blk_mq_alloc_disk(&pf->tag_set, pf);
- if (IS_ERR(disk)) {
- blk_mq_free_tag_set(&pf->tag_set);
- continue;
- }
-
- INIT_LIST_HEAD(&pf->rq_list);
- blk_queue_max_segments(disk->queue, cluster);
- blk_queue_bounce_limit(disk->queue, BLK_BOUNCE_HIGH);
- pf->disk = disk;
- pf->pi = &pf->pia;
- pf->media_status = PF_NM;
- pf->drive = (*drives[unit])[D_SLV];
- pf->lun = (*drives[unit])[D_LUN];
- snprintf(pf->name, PF_NAMELEN, "%s%d", name, unit);
- disk->major = major;
- disk->first_minor = unit;
- disk->minors = 1;
- strcpy(disk->disk_name, pf->name);
- disk->fops = &pf_fops;
- disk->events = DISK_EVENT_MEDIA_CHANGE;
- if (!(*drives[unit])[D_PRT])
- pf_drive_count++;
- }
-}
-
static int pf_open(struct block_device *bdev, fmode_t mode)
{
struct pf_unit *pf = bdev->bd_disk->private_data;
@@ -718,59 +678,6 @@ static int pf_probe(struct pf_unit *pf)
return -1;
}
-static int pf_detect(void)
-{
- struct pf_unit *pf = units;
- int k, unit;
-
- printk("%s: %s version %s, major %d, cluster %d, nice %d\n",
- name, name, PF_VERSION, major, cluster, nice);
-
- par_drv = pi_register_driver(name);
- if (!par_drv) {
- pr_err("failed to register %s driver\n", name);
- return -1;
- }
- k = 0;
- if (pf_drive_count == 0) {
- if (pi_init(pf->pi, 1, -1, -1, -1, -1, -1, pf_scratch, PI_PF,
- verbose, pf->name)) {
- if (!pf_probe(pf) && pf->disk) {
- pf->present = 1;
- k++;
- } else
- pi_release(pf->pi);
- }
-
- } else
- for (unit = 0; unit < PF_UNITS; unit++, pf++) {
- int *conf = *drives[unit];
- if (!conf[D_PRT])
- continue;
- if (pi_init(pf->pi, 0, conf[D_PRT], conf[D_MOD],
- conf[D_UNI], conf[D_PRO], conf[D_DLY],
- pf_scratch, PI_PF, verbose, pf->name)) {
- if (pf->disk && !pf_probe(pf)) {
- pf->present = 1;
- k++;
- } else
- pi_release(pf->pi);
- }
- }
- if (k)
- return 0;
-
- printk("%s: No ATAPI disk detected\n", name);
- for (pf = units, unit = 0; unit < PF_UNITS; pf++, unit++) {
- if (!pf->disk)
- continue;
- blk_cleanup_disk(pf->disk);
- blk_mq_free_tag_set(&pf->tag_set);
- }
- pi_unregister_driver(par_drv);
- return -1;
-}
-
/* The i/o request engine */
static int pf_start(struct pf_unit *pf, int cmd, int b, int c)
@@ -1014,61 +921,129 @@ static void do_pf_write_done(void)
next_request(0);
}
+static int __init pf_init_unit(struct pf_unit *pf, bool autoprobe, int port,
+ int mode, int unit, int protocol, int delay, int ms)
+{
+ struct gendisk *disk;
+ int ret;
+
+ ret = blk_mq_alloc_sq_tag_set(&pf->tag_set, &pf_mq_ops, 1,
+ BLK_MQ_F_SHOULD_MERGE);
+ if (ret)
+ return ret;
+
+ disk = blk_mq_alloc_disk(&pf->tag_set, pf);
+ if (IS_ERR(disk)) {
+ ret = PTR_ERR(disk);
+ goto out_free_tag_set;
+ }
+ disk->major = major;
+ disk->first_minor = pf - units;
+ disk->minors = 1;
+ strcpy(disk->disk_name, pf->name);
+ disk->fops = &pf_fops;
+ disk->events = DISK_EVENT_MEDIA_CHANGE;
+ disk->private_data = pf;
+
+ blk_queue_max_segments(disk->queue, cluster);
+ blk_queue_bounce_limit(disk->queue, BLK_BOUNCE_HIGH);
+
+ INIT_LIST_HEAD(&pf->rq_list);
+ pf->disk = disk;
+ pf->pi = &pf->pia;
+ pf->media_status = PF_NM;
+ pf->drive = (*drives[disk->first_minor])[D_SLV];
+ pf->lun = (*drives[disk->first_minor])[D_LUN];
+ snprintf(pf->name, PF_NAMELEN, "%s%d", name, disk->first_minor);
+
+ if (!pi_init(pf->pi, autoprobe, port, mode, unit, protocol, delay,
+ pf_scratch, PI_PF, verbose, pf->name))
+ goto out_free_disk;
+ if (pf_probe(pf))
+ goto out_pi_release;
+
+ add_disk(disk);
+ pf->present = 1;
+ return 0;
+
+out_pi_release:
+ pi_release(pf->pi);
+out_free_disk:
+ blk_cleanup_disk(pf->disk);
+out_free_tag_set:
+ blk_mq_free_tag_set(&pf->tag_set);
+ return ret;
+}
+
static int __init pf_init(void)
{ /* preliminary initialisation */
struct pf_unit *pf;
- int unit;
+ int found = 0, unit;
if (disable)
return -EINVAL;
- pf_init_units();
+ if (register_blkdev(major, name))
+ return -EBUSY;
- if (pf_detect())
- return -ENODEV;
- pf_busy = 0;
+ printk("%s: %s version %s, major %d, cluster %d, nice %d\n",
+ name, name, PF_VERSION, major, cluster, nice);
- if (register_blkdev(major, name)) {
- for (pf = units, unit = 0; unit < PF_UNITS; pf++, unit++) {
- if (!pf->disk)
- continue;
- blk_cleanup_queue(pf->disk->queue);
- blk_mq_free_tag_set(&pf->tag_set);
- put_disk(pf->disk);
- }
- return -EBUSY;
+ par_drv = pi_register_driver(name);
+ if (!par_drv) {
+ pr_err("failed to register %s driver\n", name);
+ goto out_unregister_blkdev;
}
- for (pf = units, unit = 0; unit < PF_UNITS; pf++, unit++) {
- struct gendisk *disk = pf->disk;
+ for (unit = 0; unit < PF_UNITS; unit++) {
+ if (!(*drives[unit])[D_PRT])
+ pf_drive_count++;
+ }
- if (!pf->present)
- continue;
- disk->private_data = pf;
- add_disk(disk);
+ pf = units;
+ if (pf_drive_count == 0) {
+ if (pf_init_unit(pf, 1, -1, -1, -1, -1, -1, verbose))
+ found++;
+ } else {
+ for (unit = 0; unit < PF_UNITS; unit++, pf++) {
+ int *conf = *drives[unit];
+ if (!conf[D_PRT])
+ continue;
+ if (pf_init_unit(pf, 0, conf[D_PRT], conf[D_MOD],
+ conf[D_UNI], conf[D_PRO], conf[D_DLY],
+ verbose))
+ found++;
+ }
+ }
+ if (!found) {
+ printk("%s: No ATAPI disk detected\n", name);
+ goto out_unregister_pi_driver;
}
+ pf_busy = 0;
return 0;
+
+out_unregister_pi_driver:
+ pi_unregister_driver(par_drv);
+out_unregister_blkdev:
+ unregister_blkdev(major, name);
+ return -ENODEV;
}
static void __exit pf_exit(void)
{
struct pf_unit *pf;
int unit;
- unregister_blkdev(major, name);
+
for (pf = units, unit = 0; unit < PF_UNITS; pf++, unit++) {
- if (!pf->disk)
+ if (!pf->present)
continue;
-
- if (pf->present)
- del_gendisk(pf->disk);
-
- blk_cleanup_queue(pf->disk->queue);
+ del_gendisk(pf->disk);
+ blk_cleanup_disk(pf->disk);
blk_mq_free_tag_set(&pf->tag_set);
- put_disk(pf->disk);
-
- if (pf->present)
- pi_release(pf->pi);
+ pi_release(pf->pi);
}
+
+ unregister_blkdev(major, name);
}
MODULE_LICENSE("GPL");
--
2.30.2
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [PATCH v2 11/15] pd: cleanup initialization
2021-09-27 22:00 [PATCH v2 00/15] block: third batch of add_disk() error handling conversions Luis Chamberlain
` (9 preceding siblings ...)
2021-09-27 22:01 ` [PATCH v2 10/15] pf: " Luis Chamberlain
@ 2021-09-27 22:01 ` Luis Chamberlain
2021-09-27 22:01 ` [PATCH v2 12/15] pcd: add error handling support for add_disk() Luis Chamberlain
` (4 subsequent siblings)
15 siblings, 0 replies; 19+ messages in thread
From: Luis Chamberlain @ 2021-09-27 22:01 UTC (permalink / raw)
To: axboe, justin, geert, ulf.hansson, hare, tj, philipp.reisner,
lars.ellenberg, jdike, richard, anton.ivanov, johannes.berg,
chris.obbard, krisman, zhuyifei1999, thehajime, chris, jcmvbkbc,
tim
Cc: linux-xtensa, linux-um, linux-m68k, drbd-dev, linux-block,
linux-kernel, Christoph Hellwig
From: Christoph Hellwig <hch@lst.de>
Refactor the pf initialization to have a dedicated helper to initialize
a single disk.
Signed-off-by: Christoph Hellwig <hch@lst.de>
---
drivers/block/paride/pd.c | 140 +++++++++++++++++++-------------------
1 file changed, 70 insertions(+), 70 deletions(-)
diff --git a/drivers/block/paride/pd.c b/drivers/block/paride/pd.c
index 675327df6aff..500b89a4bdaf 100644
--- a/drivers/block/paride/pd.c
+++ b/drivers/block/paride/pd.c
@@ -875,9 +875,27 @@ static const struct blk_mq_ops pd_mq_ops = {
.queue_rq = pd_queue_rq,
};
-static void pd_probe_drive(struct pd_unit *disk)
+static int pd_probe_drive(struct pd_unit *disk, int autoprobe, int port,
+ int mode, int unit, int protocol, int delay)
{
+ int index = disk - pd;
+ int *parm = *drives[index];
struct gendisk *p;
+ int ret;
+
+ disk->pi = &disk->pia;
+ disk->access = 0;
+ disk->changed = 1;
+ disk->capacity = 0;
+ disk->drive = parm[D_SLV];
+ snprintf(disk->name, PD_NAMELEN, "%s%c", name, 'a' + index);
+ disk->alt_geom = parm[D_GEO];
+ disk->standby = parm[D_SBY];
+ INIT_LIST_HEAD(&disk->rq_list);
+
+ if (!pi_init(disk->pi, autoprobe, port, mode, unit, protocol, delay,
+ pd_scratch, PI_PD, verbose, disk->name))
+ return -ENXIO;
memset(&disk->tag_set, 0, sizeof(disk->tag_set));
disk->tag_set.ops = &pd_mq_ops;
@@ -887,14 +905,14 @@ static void pd_probe_drive(struct pd_unit *disk)
disk->tag_set.queue_depth = 2;
disk->tag_set.numa_node = NUMA_NO_NODE;
disk->tag_set.flags = BLK_MQ_F_SHOULD_MERGE | BLK_MQ_F_BLOCKING;
-
- if (blk_mq_alloc_tag_set(&disk->tag_set))
- return;
+ ret = blk_mq_alloc_tag_set(&disk->tag_set);
+ if (ret)
+ goto pi_release;
p = blk_mq_alloc_disk(&disk->tag_set, disk);
if (IS_ERR(p)) {
- blk_mq_free_tag_set(&disk->tag_set);
- return;
+ ret = PTR_ERR(p);
+ goto free_tag_set;
}
disk->gd = p;
@@ -905,102 +923,84 @@ static void pd_probe_drive(struct pd_unit *disk)
p->minors = 1 << PD_BITS;
p->events = DISK_EVENT_MEDIA_CHANGE;
p->private_data = disk;
-
blk_queue_max_hw_sectors(p->queue, cluster);
blk_queue_bounce_limit(p->queue, BLK_BOUNCE_HIGH);
if (disk->drive == -1) {
- for (disk->drive = 0; disk->drive <= 1; disk->drive++)
- if (pd_special_command(disk, pd_identify) == 0)
- return;
- } else if (pd_special_command(disk, pd_identify) == 0)
- return;
- disk->gd = NULL;
+ for (disk->drive = 0; disk->drive <= 1; disk->drive++) {
+ ret = pd_special_command(disk, pd_identify);
+ if (ret == 0)
+ break;
+ }
+ } else {
+ ret = pd_special_command(disk, pd_identify);
+ }
+ if (ret)
+ goto put_disk;
+ set_capacity(disk->gd, disk->capacity);
+ add_disk(disk->gd);
+ return 0;
+put_disk:
put_disk(p);
+ disk->gd = NULL;
+free_tag_set:
+ blk_mq_free_tag_set(&disk->tag_set);
+pi_release:
+ pi_release(disk->pi);
+ return ret;
}
-static int pd_detect(void)
+static int __init pd_init(void)
{
int found = 0, unit, pd_drive_count = 0;
struct pd_unit *disk;
- for (unit = 0; unit < PD_UNITS; unit++) {
- int *parm = *drives[unit];
- struct pd_unit *disk = pd + unit;
- disk->pi = &disk->pia;
- disk->access = 0;
- disk->changed = 1;
- disk->capacity = 0;
- disk->drive = parm[D_SLV];
- snprintf(disk->name, PD_NAMELEN, "%s%c", name, 'a'+unit);
- disk->alt_geom = parm[D_GEO];
- disk->standby = parm[D_SBY];
- if (parm[D_PRT])
- pd_drive_count++;
- INIT_LIST_HEAD(&disk->rq_list);
- }
+ if (disable)
+ return -ENODEV;
+
+ if (register_blkdev(major, name))
+ return -ENODEV;
+
+ printk("%s: %s version %s, major %d, cluster %d, nice %d\n",
+ name, name, PD_VERSION, major, cluster, nice);
par_drv = pi_register_driver(name);
if (!par_drv) {
pr_err("failed to register %s driver\n", name);
- return -1;
+ goto out_unregister_blkdev;
}
- if (pd_drive_count == 0) { /* nothing spec'd - so autoprobe for 1 */
- disk = pd;
- if (pi_init(disk->pi, 1, -1, -1, -1, -1, -1, pd_scratch,
- PI_PD, verbose, disk->name)) {
- pd_probe_drive(disk);
- if (!disk->gd)
- pi_release(disk->pi);
- }
+ for (unit = 0; unit < PD_UNITS; unit++) {
+ int *parm = *drives[unit];
+ if (parm[D_PRT])
+ pd_drive_count++;
+ }
+
+ if (pd_drive_count == 0) { /* nothing spec'd - so autoprobe for 1 */
+ if (!pd_probe_drive(pd, 1, -1, -1, -1, -1, -1))
+ found++;
} else {
for (unit = 0, disk = pd; unit < PD_UNITS; unit++, disk++) {
int *parm = *drives[unit];
if (!parm[D_PRT])
continue;
- if (pi_init(disk->pi, 0, parm[D_PRT], parm[D_MOD],
- parm[D_UNI], parm[D_PRO], parm[D_DLY],
- pd_scratch, PI_PD, verbose, disk->name)) {
- pd_probe_drive(disk);
- if (!disk->gd)
- pi_release(disk->pi);
- }
- }
- }
- for (unit = 0, disk = pd; unit < PD_UNITS; unit++, disk++) {
- if (disk->gd) {
- set_capacity(disk->gd, disk->capacity);
- add_disk(disk->gd);
- found = 1;
+ if (!pd_probe_drive(disk, 0, parm[D_PRT], parm[D_MOD],
+ parm[D_UNI], parm[D_PRO], parm[D_DLY]))
+ found++;
}
}
if (!found) {
printk("%s: no valid drive found\n", name);
- pi_unregister_driver(par_drv);
+ goto out_pi_unregister_driver;
}
- return found;
-}
-
-static int __init pd_init(void)
-{
- if (disable)
- goto out1;
-
- if (register_blkdev(major, name))
- goto out1;
-
- printk("%s: %s version %s, major %d, cluster %d, nice %d\n",
- name, name, PD_VERSION, major, cluster, nice);
- if (!pd_detect())
- goto out2;
return 0;
-out2:
+out_pi_unregister_driver:
+ pi_unregister_driver(par_drv);
+out_unregister_blkdev:
unregister_blkdev(major, name);
-out1:
return -ENODEV;
}
--
2.30.2
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [PATCH v2 12/15] pcd: add error handling support for add_disk()
2021-09-27 22:00 [PATCH v2 00/15] block: third batch of add_disk() error handling conversions Luis Chamberlain
` (10 preceding siblings ...)
2021-09-27 22:01 ` [PATCH v2 11/15] pd: " Luis Chamberlain
@ 2021-09-27 22:01 ` Luis Chamberlain
2021-09-27 22:01 ` [PATCH v2 13/15] pcd: fix ordering of unregister_cdrom() Luis Chamberlain
` (3 subsequent siblings)
15 siblings, 0 replies; 19+ messages in thread
From: Luis Chamberlain @ 2021-09-27 22:01 UTC (permalink / raw)
To: axboe, justin, geert, ulf.hansson, hare, tj, philipp.reisner,
lars.ellenberg, jdike, richard, anton.ivanov, johannes.berg,
chris.obbard, krisman, zhuyifei1999, thehajime, chris, jcmvbkbc,
tim
Cc: linux-xtensa, linux-um, linux-m68k, drbd-dev, linux-block,
linux-kernel, 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 <mcgrof@kernel.org>
---
drivers/block/paride/pcd.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/block/paride/pcd.c b/drivers/block/paride/pcd.c
index 93ed63626232..a7fab3830d7b 100644
--- a/drivers/block/paride/pcd.c
+++ b/drivers/block/paride/pcd.c
@@ -941,9 +941,13 @@ static int pcd_init_unit(struct pcd_unit *cd, bool autoprobe, int port,
cd->present = 1;
pcd_probe_capabilities(cd);
register_cdrom(cd->disk, &cd->info);
- add_disk(cd->disk);
+ ret = add_disk(cd->disk);
+ if (ret)
+ goto out_unreg_cdrom;
return 0;
+out_unreg_cdrom:
+ unregister_cdrom(&cd->info);
out_pi_release:
pi_release(cd->pi);
out_free_disk:
--
2.30.2
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [PATCH v2 13/15] pcd: fix ordering of unregister_cdrom()
2021-09-27 22:00 [PATCH v2 00/15] block: third batch of add_disk() error handling conversions Luis Chamberlain
` (11 preceding siblings ...)
2021-09-27 22:01 ` [PATCH v2 12/15] pcd: add error handling support for add_disk() Luis Chamberlain
@ 2021-09-27 22:01 ` Luis Chamberlain
2021-09-27 22:01 ` [PATCH v2 14/15] pcd: capture errors on cdrom_register() Luis Chamberlain
` (2 subsequent siblings)
15 siblings, 0 replies; 19+ messages in thread
From: Luis Chamberlain @ 2021-09-27 22:01 UTC (permalink / raw)
To: axboe, justin, geert, ulf.hansson, hare, tj, philipp.reisner,
lars.ellenberg, jdike, richard, anton.ivanov, johannes.berg,
chris.obbard, krisman, zhuyifei1999, thehajime, chris, jcmvbkbc,
tim
Cc: linux-xtensa, linux-um, linux-m68k, drbd-dev, linux-block,
linux-kernel, Luis Chamberlain
We first register cdrom and then we add_disk() and
so we we should likewise unregister the cdrom first and
then del_gendisk().
Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
---
drivers/block/paride/pcd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/block/paride/pcd.c b/drivers/block/paride/pcd.c
index a7fab3830d7b..82a654fc4db8 100644
--- a/drivers/block/paride/pcd.c
+++ b/drivers/block/paride/pcd.c
@@ -1021,9 +1021,9 @@ static void __exit pcd_exit(void)
if (!cd->present)
continue;
+ unregister_cdrom(&cd->info);
del_gendisk(cd->disk);
pi_release(cd->pi);
- unregister_cdrom(&cd->info);
blk_cleanup_disk(cd->disk);
blk_mq_free_tag_set(&cd->tag_set);
--
2.30.2
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [PATCH v2 14/15] pcd: capture errors on cdrom_register()
2021-09-27 22:00 [PATCH v2 00/15] block: third batch of add_disk() error handling conversions Luis Chamberlain
` (12 preceding siblings ...)
2021-09-27 22:01 ` [PATCH v2 13/15] pcd: fix ordering of unregister_cdrom() Luis Chamberlain
@ 2021-09-27 22:01 ` Luis Chamberlain
2021-09-27 22:01 ` [PATCH v2 15/15] pd: add error handling support for add_disk() Luis Chamberlain
2021-09-27 22:29 ` [PATCH v2 00/15] block: third batch of add_disk() error handling conversions Jens Axboe
15 siblings, 0 replies; 19+ messages in thread
From: Luis Chamberlain @ 2021-09-27 22:01 UTC (permalink / raw)
To: axboe, justin, geert, ulf.hansson, hare, tj, philipp.reisner,
lars.ellenberg, jdike, richard, anton.ivanov, johannes.berg,
chris.obbard, krisman, zhuyifei1999, thehajime, chris, jcmvbkbc,
tim
Cc: linux-xtensa, linux-um, linux-m68k, drbd-dev, linux-block,
linux-kernel, Luis Chamberlain
No errors were being captured wehen cdrom_register() fails,
capture the error and return the error.
Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
---
drivers/block/paride/pcd.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/block/paride/pcd.c b/drivers/block/paride/pcd.c
index 82a654fc4db8..4cc0d141db78 100644
--- a/drivers/block/paride/pcd.c
+++ b/drivers/block/paride/pcd.c
@@ -940,7 +940,9 @@ static int pcd_init_unit(struct pcd_unit *cd, bool autoprobe, int port,
cd->present = 1;
pcd_probe_capabilities(cd);
- register_cdrom(cd->disk, &cd->info);
+ ret = register_cdrom(cd->disk, &cd->info);
+ if (ret)
+ goto out_pi_release;
ret = add_disk(cd->disk);
if (ret)
goto out_unreg_cdrom;
--
2.30.2
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [PATCH v2 15/15] pd: add error handling support for add_disk()
2021-09-27 22:00 [PATCH v2 00/15] block: third batch of add_disk() error handling conversions Luis Chamberlain
` (13 preceding siblings ...)
2021-09-27 22:01 ` [PATCH v2 14/15] pcd: capture errors on cdrom_register() Luis Chamberlain
@ 2021-09-27 22:01 ` Luis Chamberlain
2021-09-27 22:29 ` [PATCH v2 00/15] block: third batch of add_disk() error handling conversions Jens Axboe
15 siblings, 0 replies; 19+ messages in thread
From: Luis Chamberlain @ 2021-09-27 22:01 UTC (permalink / raw)
To: axboe, justin, geert, ulf.hansson, hare, tj, philipp.reisner,
lars.ellenberg, jdike, richard, anton.ivanov, johannes.berg,
chris.obbard, krisman, zhuyifei1999, thehajime, chris, jcmvbkbc,
tim
Cc: linux-xtensa, linux-um, linux-m68k, drbd-dev, linux-block,
linux-kernel, 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 <mcgrof@kernel.org>
---
drivers/block/paride/pd.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/block/paride/pd.c b/drivers/block/paride/pd.c
index 500b89a4bdaf..e59759bcf416 100644
--- a/drivers/block/paride/pd.c
+++ b/drivers/block/paride/pd.c
@@ -938,8 +938,12 @@ static int pd_probe_drive(struct pd_unit *disk, int autoprobe, int port,
if (ret)
goto put_disk;
set_capacity(disk->gd, disk->capacity);
- add_disk(disk->gd);
+ ret = add_disk(disk->gd);
+ if (ret)
+ goto cleanup_disk;
return 0;
+cleanup_disk:
+ blk_cleanup_disk(disk->gd);
put_disk:
put_disk(p);
disk->gd = NULL;
--
2.30.2
^ permalink raw reply related [flat|nested] 19+ messages in thread
* Re: [PATCH v2 00/15] block: third batch of add_disk() error handling conversions
2021-09-27 22:00 [PATCH v2 00/15] block: third batch of add_disk() error handling conversions Luis Chamberlain
` (14 preceding siblings ...)
2021-09-27 22:01 ` [PATCH v2 15/15] pd: add error handling support for add_disk() Luis Chamberlain
@ 2021-09-27 22:29 ` Jens Axboe
15 siblings, 0 replies; 19+ messages in thread
From: Jens Axboe @ 2021-09-27 22:29 UTC (permalink / raw)
To: Luis Chamberlain, justin, geert, ulf.hansson, hare, tj,
philipp.reisner, lars.ellenberg, jdike, richard, anton.ivanov,
johannes.berg, chris.obbard, krisman, zhuyifei1999, thehajime,
chris, jcmvbkbc, tim
Cc: linux-xtensa, linux-um, linux-m68k, drbd-dev, linux-block, linux-kernel
On 9/27/21 4:00 PM, Luis Chamberlain wrote:
> This is the 2nd version of the third batch of driver conversions for the
> add_disk() error handling. This and the entire 7th series of driver
> conversions can be found on my 20210927-for-axboe-add-disk-error-handling
> branch [0].
Applied 2, 4, 7, 8-15.
--
Jens Axboe
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH v2 06/15] xtensa/platforms/iss/simdisk: add error handling support for add_disk()
2021-09-27 22:01 ` [PATCH v2 06/15] xtensa/platforms/iss/simdisk: " Luis Chamberlain
@ 2021-09-27 22:50 ` Max Filippov
2021-09-27 23:24 ` Jens Axboe
0 siblings, 1 reply; 19+ messages in thread
From: Max Filippov @ 2021-09-27 22:50 UTC (permalink / raw)
To: Luis Chamberlain
Cc: Jens Axboe, justin, Geert Uytterhoeven, Ulf Hansson, hare,
Tejun Heo, philipp.reisner, lars.ellenberg, Jeff Dike,
Richard Weinberger, Anton Ivanov, johannes.berg, chris.obbard,
krisman, zhuyifei1999, thehajime, Chris Zankel, tim,
open list:TENSILICA XTENSA PORT (xtensa),
linux-um, open list:M68K ARCHITECTURE, drbd-dev, linux-block,
LKML
On Mon, Sep 27, 2021 at 3:01 PM Luis Chamberlain <mcgrof@kernel.org> 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.
>
> Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
> ---
> arch/xtensa/platforms/iss/simdisk.c | 13 +++++++++++--
> 1 file changed, 11 insertions(+), 2 deletions(-)
Acked-by: Max Filippov <jcmvbkbc@gmail.com>
--
Thanks.
-- Max
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH v2 06/15] xtensa/platforms/iss/simdisk: add error handling support for add_disk()
2021-09-27 22:50 ` Max Filippov
@ 2021-09-27 23:24 ` Jens Axboe
0 siblings, 0 replies; 19+ messages in thread
From: Jens Axboe @ 2021-09-27 23:24 UTC (permalink / raw)
To: Max Filippov, Luis Chamberlain
Cc: justin, Geert Uytterhoeven, Ulf Hansson, hare, Tejun Heo,
philipp.reisner, lars.ellenberg, Jeff Dike, Richard Weinberger,
Anton Ivanov, johannes.berg, chris.obbard, krisman, zhuyifei1999,
thehajime, Chris Zankel, tim,
open list:TENSILICA XTENSA PORT (xtensa),
linux-um, open list:M68K ARCHITECTURE, drbd-dev, linux-block,
LKML
On 9/27/21 4:50 PM, Max Filippov wrote:
> On Mon, Sep 27, 2021 at 3:01 PM Luis Chamberlain <mcgrof@kernel.org> 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.
>>
>> Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
>> ---
>> arch/xtensa/platforms/iss/simdisk.c | 13 +++++++++++--
>> 1 file changed, 11 insertions(+), 2 deletions(-)
>
> Acked-by: Max Filippov <jcmvbkbc@gmail.com>
Applied, thanks.
--
Jens Axboe
^ permalink raw reply [flat|nested] 19+ messages in thread
end of thread, other threads:[~2021-09-27 23:24 UTC | newest]
Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-27 22:00 [PATCH v2 00/15] block: third batch of add_disk() error handling conversions Luis Chamberlain
2021-09-27 22:00 ` [PATCH v2 01/15] z2ram: add error handling support for add_disk() Luis Chamberlain
2021-09-27 22:00 ` [PATCH v2 02/15] aoe: " Luis Chamberlain
2021-09-27 22:00 ` [PATCH v2 03/15] m68k/emu/nfblock: " Luis Chamberlain
2021-09-27 22:00 ` [PATCH v2 04/15] drbd: " Luis Chamberlain
2021-09-27 22:01 ` [PATCH v2 05/15] um/drivers/ubd_kern: " Luis Chamberlain
2021-09-27 22:01 ` [PATCH v2 06/15] xtensa/platforms/iss/simdisk: " Luis Chamberlain
2021-09-27 22:50 ` Max Filippov
2021-09-27 23:24 ` Jens Axboe
2021-09-27 22:01 ` [PATCH v2 07/15] n64cart: " Luis Chamberlain
2021-09-27 22:01 ` [PATCH v2 08/15] pcd: move the identify buffer into pcd_identify Luis Chamberlain
2021-09-27 22:01 ` [PATCH v2 09/15] pcd: cleanup initialization Luis Chamberlain
2021-09-27 22:01 ` [PATCH v2 10/15] pf: " Luis Chamberlain
2021-09-27 22:01 ` [PATCH v2 11/15] pd: " Luis Chamberlain
2021-09-27 22:01 ` [PATCH v2 12/15] pcd: add error handling support for add_disk() Luis Chamberlain
2021-09-27 22:01 ` [PATCH v2 13/15] pcd: fix ordering of unregister_cdrom() Luis Chamberlain
2021-09-27 22:01 ` [PATCH v2 14/15] pcd: capture errors on cdrom_register() Luis Chamberlain
2021-09-27 22:01 ` [PATCH v2 15/15] pd: add error handling support for add_disk() Luis Chamberlain
2021-09-27 22:29 ` [PATCH v2 00/15] block: third batch of add_disk() error handling conversions Jens Axboe
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 NNTP newsgroup(s).