RE: [PATCH 4/8] aacraid: add name to driver template

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Mark Salyzyn writes:
>Christoph Hellwig writes:
>>> +	aac_driver_template.name = aac_drivers[index].name;
>>this is broken. it overwrites the name every time a host is allocated.
>Especially it does this on a live template.  Just implemented ->info
>
>->info() is not enough, there are places in the scsi subsystem which do
>not implement the info override over top the template name.
>
>I had discussed the possibility of submitting a patch to the scsi
subsystem to fix that brokenness, I am generally concerned with legacy
issues.

Looks like few remain. Could not figure a way to alter scsi_module.c
that made sense, doable but expensive, but hosts.c could be fixed up
with:

--- hosts.c     2005-09-07 12:17:18.000000000 -0400
+++ /tmp/hosts.c        2005-09-12 09:57:52.906881694 -0400
@@ -166,7 +166,7 @@

        if (!shost->can_queue) {
                printk(KERN_ERR "%s: can_queue = 0 no longer
supported\n",
-                               sht->name);
+                               sht->info ? sht->info(shost) :
sht->name);
                goto out;
        }

@@ -386,7 +386,8 @@

        if (!sht->detect) {
                printk(KERN_WARNING "scsi_register() called on new-style
"
-                                   "template for driver %s\n",
sht->name);
+                                   "template for driver %s\n",
+                                   sht->info ? sht->info(shost) :
sht->name);
                dump_stack();
        }

@@ -483,7 +484,8 @@
        if (unlikely(!shost->work_q)) {
                printk(KERN_ERR
                        "ERROR: Scsi host '%s' attempted to queue
scsi-work, "
-                       "when no workqueue created.\n",
shost->hostt->name);
+                       "when no workqueue created.\n",
+                       shost->hostt->info ? shost->hostt->info(shost) :
shost->
hostt->name);
                dump_stack();

                return -EINVAL;
@@ -502,7 +504,8 @@
        if (!shost->work_q) {
                printk(KERN_ERR
                        "ERROR: Scsi host '%s' attempted to flush
scsi-work, "
-                       "when no workqueue created.\n",
shost->hostt->name);
+                       "when no workqueue created.\n",
+                       shost->hostt->info ? shost->hostt->info(shost) :
shost->
hostt->name);
                dump_stack();
                return;

Sincerely -- Mark Salyzyn
-
: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux