Commit 84a26cf5 authored by Mike Anderson's avatar Mike Anderson Committed by Christoph Hellwig

[PATCH] scsi sync caches w/ dev offline

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
andmike@us.ibm.com

 sd.c |    3 +++
 1 files changed, 3 insertions(+)
parent 6532af8c
......@@ -1567,6 +1567,9 @@ static int sd_synchronize_cache(int index, int verbose)
Scsi_Device *SDpnt = sdkp->device;
int retries, the_result;
if (!SDpnt->online)
return 0;
if(verbose) {
char buf[16];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment