From: Heiko Carstens <heiko.carstens@de.ibm.com>
To: linux-scsi@vger.kernel.org
Subject: [BUG] linux-2.6.0-test9: slave_destroy called too early
Date: Tue, 11 Nov 2003 11:45:49 +0100 [thread overview]
Message-ID: <200311111145.49009.heiko.carstens@de.ibm.com> (raw)
Hi,
in linux-2.6.0-test9 there seems to be a bug in scsi_remove_device: each time
I try to remove a scsi disk the sd driver fails to synchronize the SCSI cache.
Reason for this is that the slave_destroy function of the LLD gets called
before sd_shutdown of the sd driver gets called.
I would suggest the patch below. Please apply or let me know that this is the
wrong thing to do.
Thanks,
Heiko
diff -urN linux-2.6.0-test9/drivers/scsi/scsi_sysfs.c
linux-2.6.0-test9-sd/drivers/scsi/scsi_sysfs.c
--- linux-2.6.0-test9/drivers/scsi/scsi_sysfs.c Sat Oct 25 20:43:04 2003
+++ linux-2.6.0-test9-sd/drivers/scsi/scsi_sysfs.c Tue Nov 11 11:43:27 2003
@@ -410,9 +410,9 @@
if (class) {
down_write(&class->subsys.rwsem);
set_bit(SDEV_DEL, &sdev->sdev_state);
+ device_del(&sdev->sdev_gendev);
if (sdev->host->hostt->slave_destroy)
sdev->host->hostt->slave_destroy(sdev);
- device_del(&sdev->sdev_gendev);
up_write(&class->subsys.rwsem);
}
next reply other threads:[~2003-11-11 10:56 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-11-11 10:45 Heiko Carstens [this message]
2003-11-11 16:44 ` [BUG] linux-2.6.0-test9: slave_destroy called too early Mike Anderson
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=200311111145.49009.heiko.carstens@de.ibm.com \
--to=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