Skip to contentSkip to conversation

scsi sync caches w/ dev offline

PATCH/RFC Mike Anderson 1 participant 1 message Oct 21, 2002 SCSI

lore
Share & tools
lore
#0 lore raw

When a scsi device is offlined and then the system is shutdown it will hang during the synchronizing SCSI caches task. The error handler was activated during this step, but post recovery the system did not complete the shutdown.

This patch just adds a check for online before sending the command. The better approach appeared to be to use scsi_block_when_processing_errors, but I was concerned that we might block to long in a shutdown case.

-andmike
--
Michael Anderson
[email protected]

 sd.c |    3 +++
 1 files changed, 3 insertions(+)

-----

===== drivers/scsi/sd.c 1.73 vs edited =====

drivers/scsi/sd.c +3 -0
@@ -1567,6 +1567,9 @@
 	Scsi_Device *SDpnt = sdkp->device;
 	int retries, the_result;
 
+	if (!SDpnt->online)
+		return 0;
+
 	if(verbose) {
 		char buf[16];