public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Mike Anderson <andmike@us.ibm.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>, linux-scsi@vger.kernel.org
Subject: Re: [BUG] 2.6.0-test4: call of slave_destroy missing
Date: Tue, 2 Sep 2003 11:18:31 -0700	[thread overview]
Message-ID: <20030902181831.GA1232@beaverton.ibm.com> (raw)
In-Reply-To: <20030902183948.A14587@infradead.org>

Christoph Hellwig [hch@infradead.org] wrote:
> On Tue, Sep 02, 2003 at 02:16:44PM +0200, Heiko Carstens wrote:
> > Hi,
> > 
> > the upgrade diff from test3 to test4 removed the call of slave_destroy from
> > scsi_free_sdev, but didn't add it at any other place (scsi_remove_device?).
> > So currently of the alloc/destroy pair just the alloc call happens... I'm
> > not sure where the destroy call should be and therefore leave it to somebody
> > else to fix this :)
> 
> This seems to be a merge error, see
> 
> 	http://linux-scsi.bkbits.net:8080/scsi-misc-2.5/cset@1.1046.586.10?nav=index.html|ChangeSet@-8w
> 
> Mike moved the call to a different function which I merged with another
> function in a different file.
> 
> The call should be in scsi_remove_device, but IMHO after setting the
> SDEV_DEL bit and not before like in the old patch.
> 
> Mike, was there a reason you did this before setting the deleted bit?
> I can't see how we can free the driver data safely before making sure
> we don't call into the driver anymore.
> 

Doing it after the setting the deleted (SDEV_DEL) is probably better.
You are going to add it scsi_remove_device which is where SDEV_DEL is
set so might as well call it after.

Previously we could not call into the LLDD as prior to this call we have
stopped the queucommand from being called (SHOST_CANCEL is set) and the
error handler is not running.

-andmike
--
Michael Anderson
andmike@us.ibm.com

-
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
Christoph Hellwig [hch@infradead.org] wrote:
> On Tue, Sep 02, 2003 at 02:16:44PM +0200, Heiko Carstens wrote:
> > Hi,
> > 
> > the upgrade diff from test3 to test4 removed the call of slave_destroy from
> > scsi_free_sdev, but didn't add it at any other place (scsi_remove_device?).
> > So currently of the alloc/destroy pair just the alloc call happens... I'm
> > not sure where the destroy call should be and therefore leave it to somebody
> > else to fix this :)
> 
> This seems to be a merge error, see
> 
> 	http://linux-scsi.bkbits.net:8080/scsi-misc-2.5/cset@1.1046.586.10?nav=index.html|ChangeSet@-8w
> 
> Mike moved the call to a different function which I merged with another
> function in a different file.
> 
> The call should be in scsi_remove_device, but IMHO after setting the
> SDEV_DEL bit and not before like in the old patch.
> 
> Mike, was there a reason you did this before setting the deleted bit?
> I can't see how we can free the driver data safely before making sure
> we don't call into the driver anymore.
> 

Doing it after the setting the deleted (SDEV_DEL) is probably better.
You are going to add it scsi_remove_device which is where SDEV_DEL is
set so might as well call it after.

Previously we could not call into the LLDD as prior to this call we have
stopped the queucommand from being called (SHOST_CANCEL is set) and the
error handler is not running.

-andmike
--
Michael Anderson
andmike@us.ibm.com


      reply	other threads:[~2003-09-02 18:15 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-09-02 12:16 [BUG] 2.6.0-test4: call of slave_destroy missing Heiko Carstens
2003-09-02 17:39 ` Christoph Hellwig
2003-09-02 18:18   ` Mike Anderson [this message]

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=20030902181831.GA1232@beaverton.ibm.com \
    --to=andmike@us.ibm.com \
    --cc=hch@infradead.org \
    --cc=heiko.carstens@de.ibm.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox