[2018] in linux-scsi channel archive

home help back first fref pref prev next nref lref last post

Re: Scsi removable disk patch

daemon@ATHENA.MIT.EDU (Leonard N. Zubkoff)
Mon Jun 16 03:44:24 1997

Date: 	Mon, 16 Jun 1997 00:20:53 -0700
From: "Leonard N. Zubkoff" <lnz@dandelion.com>
To: dormouse@farsrobt.demon.co.uk
CC: linux-scsi@vger.rutgers.edu
In-reply-to: <199706160706.IAA22596@farsrobt.demon.co.uk> (message from
	Richard Waltham on Mon, 16 Jun 1997 08:06:09 +0100 (BST))

  From: Richard Waltham <dormouse@farsrobt.demon.co.uk>
  Date: Mon, 16 Jun 1997 08:06:09 +0100 (BST)

  Thank you. You just made my day:)

  However there is an occasional timeout with my original patch, failing about
  1 in 47 spin ups, using the following script running for about 10 hours.

  while (true) do { /sbin/e2fsck /dev/sdb3 ; jazsleep 1 /dev/sdb ; /usr/bin/sleep 75; } done

  e2fsck /dev/sdb3  spins up the drive but does nothing as the file system is
  clean. jazsleep is a little utility I wrote to set the spin down time for
  the jaz drive. Runs here in case there is a timeout as any reset puts the
  spin down time back to the default 30 minutes. script then sleeps to give
  the drive time to spin down. This runs about 43-44 times an hour.

  I couldn't figure at first why the sd.c 15 second timeout was timing out in
  9 seconds but finally traced this to a seperate timeout value specified in
  scsi_ioctl.c which is only 9 seconds as opposed to the 15 second timeout in
  sd.c that I expected to be used. The scsi code is certainly a bit of a
  tangled web with various different timeout values in different parts of the    
  code:)

  Changing the timeout in scsi_ioctl.c to 15 seconds as in sd.c and re-running
  the script for about 12 hours over night and some of today was successful
  with no timeouts.

  Attached is an updated patch against 2.0.29 and an almost identical patch
  against 2.1.42. It appears blank lines in sd.c in 2.0.29 have trailing
  spaces, where as sd.c in 2.1.42 does not. How the patch applied to both
  before is a mystery.

Actually, the START_STOP timeout really needs to be more than a standard disk
I/O timeout, since some disks can take quite a while to spin up.  ioctl_command
already had a 60 second timeout for START_STOP, but that code isn't run except
for the SCSI_IOCTL_SEND_COMMAND case.  I'll make the necessary corrections in
my working copy.

		Leonard

home help back first fref pref prev next nref lref last post