From: Hannes Reinecke <hare@suse.de>
To: James Bottomley <James.Bottomley@SteelEye.com>
Cc: SCSI Mailing List <linux-scsi@vger.kernel.org>,
Linux Kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] Fix reference counting for failed SCSI devices
Date: Wed, 25 May 2005 17:16:18 +0200 [thread overview]
Message-ID: <429496C2.3020706@suse.de> (raw)
In-Reply-To: <1117033088.4956.5.camel@mulgrave>
James Bottomley wrote:
> On Wed, 2005-05-25 at 14:46 +0200, Hannes Reinecke wrote:
>>>so it's contained within the scsi_device. Freeing the scsi_device frees
>>>the classdev (and the gendev).
>>>
>>But does not call the ->release function.
>
> Please just read the code like I asked. If you do, you'll find that the
> sdev_classdev release method is NULL until scsi_sysfs_add_sdev()
> precisely for the reason that the class references don't matter until
> that point. We're free to kill the whole thing without bothering about
> the class devices until scsi_add_lun detects something and calls
> scsi_sysfs_add_sdev() to make the whole thing visible. Then all
> classdevs get a ref on the parent gendev which their release method
> relinquishes.
>
Oh, right. Indeed, you are totally correct. Sorry for the noise.
>>Put it the other way round: does 'rmmod aic7xxx' work for you?
>>It certainly did _not_ work for aic79xx, hence the fix.
>
> Well, I know aic7xxx works perfectly on a dual channel card, because I
> actually test the failure paths and insmod/rmmod is one of my tests. I
> can't comment on aic79xx because I don't have the hardware.
>
I guess it's time to convert aic79xx to the spi_transport class.
Unfortunately my attempt segfaults when removing a device in
attribute_container_device_trigger(); someone is overwriting the ->match
function. Oh well, further debugging needed.
Cheers,
Hannes
--
Dr. Hannes Reinecke hare@suse.de
SuSE Linux AG S390 & zSeries
Maxfeldstraße 5 +49 911 74053 688
90409 Nürnberg http://www.suse.de
-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
WARNING: multiple messages have this Message-ID (diff)
From: Hannes Reinecke <hare@suse.de>
To: James Bottomley <James.Bottomley@SteelEye.com>
Cc: SCSI Mailing List <linux-scsi@vger.kernel.org>,
Linux Kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] Fix reference counting for failed SCSI devices
Date: Wed, 25 May 2005 17:16:18 +0200 [thread overview]
Message-ID: <429496C2.3020706@suse.de> (raw)
In-Reply-To: <1117033088.4956.5.camel@mulgrave>
James Bottomley wrote:
> On Wed, 2005-05-25 at 14:46 +0200, Hannes Reinecke wrote:
>>>so it's contained within the scsi_device. Freeing the scsi_device frees
>>>the classdev (and the gendev).
>>>
>>But does not call the ->release function.
>
> Please just read the code like I asked. If you do, you'll find that the
> sdev_classdev release method is NULL until scsi_sysfs_add_sdev()
> precisely for the reason that the class references don't matter until
> that point. We're free to kill the whole thing without bothering about
> the class devices until scsi_add_lun detects something and calls
> scsi_sysfs_add_sdev() to make the whole thing visible. Then all
> classdevs get a ref on the parent gendev which their release method
> relinquishes.
>
Oh, right. Indeed, you are totally correct. Sorry for the noise.
>>Put it the other way round: does 'rmmod aic7xxx' work for you?
>>It certainly did _not_ work for aic79xx, hence the fix.
>
> Well, I know aic7xxx works perfectly on a dual channel card, because I
> actually test the failure paths and insmod/rmmod is one of my tests. I
> can't comment on aic79xx because I don't have the hardware.
>
I guess it's time to convert aic79xx to the spi_transport class.
Unfortunately my attempt segfaults when removing a device in
attribute_container_device_trigger(); someone is overwriting the ->match
function. Oh well, further debugging needed.
Cheers,
Hannes
--
Dr. Hannes Reinecke hare@suse.de
SuSE Linux AG S390 & zSeries
Maxfeldstraße 5 +49 911 74053 688
90409 Nürnberg http://www.suse.de
next prev parent reply other threads:[~2005-05-25 15:16 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-05-24 9:38 [PATCH] Fix reference counting for failed SCSI devices Hannes Reinecke
2005-05-24 22:57 ` James Bottomley
2005-05-25 6:50 ` Hannes Reinecke
2005-05-25 12:27 ` James Bottomley
2005-05-25 12:46 ` Hannes Reinecke
2005-05-25 12:46 ` Hannes Reinecke
2005-05-25 14:58 ` James Bottomley
2005-05-25 15:16 ` Hannes Reinecke [this message]
2005-05-25 15:16 ` Hannes Reinecke
2005-05-25 17:51 ` James Bottomley
2005-05-25 18:01 ` Matthew Wilcox
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=429496C2.3020706@suse.de \
--to=hare@suse.de \
--cc=James.Bottomley@SteelEye.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.