* [BUG] linux-2.6.0-test9: slave_destroy called too early
@ 2003-11-11 10:45 Heiko Carstens
2003-11-11 16:44 ` Mike Anderson
0 siblings, 1 reply; 2+ messages in thread
From: Heiko Carstens @ 2003-11-11 10:45 UTC (permalink / raw)
To: linux-scsi
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);
}
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [BUG] linux-2.6.0-test9: slave_destroy called too early
2003-11-11 10:45 [BUG] linux-2.6.0-test9: slave_destroy called too early Heiko Carstens
@ 2003-11-11 16:44 ` Mike Anderson
0 siblings, 0 replies; 2+ messages in thread
From: Mike Anderson @ 2003-11-11 16:44 UTC (permalink / raw)
To: Heiko Carstens; +Cc: linux-scsi
Heiko Carstens [heiko.carstens@de.ibm.com] wrote:
> 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.
>
The patch I previously posted would give the same effect. You can find
it in the archives.
http://marc.theaimsgroup.com/?l=linux-scsi&m=106810957502435&w=2
I will repost the patch with a update based on the feedback I received
on the previous thread (inline the scsi_free_sdev function). This
updated patch will look very similiar to the sequence you have in your
patch.
-andmike
--
Michael Anderson
andmike@us.ibm.com
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2003-11-11 16:40 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-11-11 10:45 [BUG] linux-2.6.0-test9: slave_destroy called too early Heiko Carstens
2003-11-11 16:44 ` Mike Anderson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox