diff options
author | Dave Kleikamp <dave.kleikamp@oracle.com> | 2011-10-19 11:49:04 -0500 |
---|---|---|
committer | James Bottomley <JBottomley@Parallels.com> | 2011-10-30 12:58:11 +0400 |
commit | 21208ae5a21fd5f337e987cde11374eaf2fe70b4 (patch) | |
tree | 3d835887fb1ce75e7dbf8b99f6086477db437c0e /drivers/scsi/sd.c | |
parent | 6e88020025ccb6a6a0a54098acf1e187d2c9368c (diff) |
[SCSI] sd: remove arbitrary SD_MAX_DISKS namespace limit
There is no reason to limit the SCSI disk namespace to sdXXX.
Add new error messages to sd_probe() in the unlikely event that either
ida_get_new() or sd_format_disk_name() fail.
Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/sd.c')
-rw-r--r-- | drivers/scsi/sd.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c index a7942e5c8be..fa3a5918009 100644 --- a/drivers/scsi/sd.c +++ b/drivers/scsi/sd.c @@ -2590,18 +2590,16 @@ static int sd_probe(struct device *dev) spin_unlock(&sd_index_lock); } while (error == -EAGAIN); - if (error) + if (error) { + sdev_printk(KERN_WARNING, sdp, "sd_probe: memory exhausted.\n"); goto out_put; - - if (index >= SD_MAX_DISKS) { - error = -ENODEV; - sdev_printk(KERN_WARNING, sdp, "SCSI disk (sd) name space exhausted.\n"); - goto out_free_index; } error = sd_format_disk_name("sd", index, gd->disk_name, DISK_NAME_LEN); - if (error) + if (error) { + sdev_printk(KERN_WARNING, sdp, "SCSI disk (sd) name length exceeded.\n"); goto out_free_index; + } sdkp->device = sdp; sdkp->driver = &sd_template; |