Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 12 Jul 1997 18:38:13 -0700 (PDT)
From:      David Filo <filo@yahoo.com>
To:        Shimon@i-Connect.Net
Cc:        freebsd-SCSI@FreeBSD.ORG, dg@root.com
Subject:   Re: problems with reboot
Message-ID:  <199707130138.SAA14919@ns2.yahoo.com>
In-Reply-To: <XFMail.970712115005.Shimon@i-Connect.Net>

next in thread | previous in thread | raw e-mail | index | archive | help
> > >There is an issue with FreeBSD shutdown not waiting for the DPt to flush
> > >caches as it should.
> > > 
> >    Should be easy to fix by adding a shutdown routine to the driver that
> > waits
> > for the flushes to complete.
> 
> I have not checked the code in this area, but all that I think is necessary
> is for the umount(2) syscall to wait and block shutdown until it returns.
> Under normal operation, it generates the SCSI ``ALLOW MEDIA REMOVAL'',
> which the DPT blocks until it is done flushing and invalidating.
> I personally never have this problem on any of our machines, but...

umount(2) does wait correctly.  The problem in this case was that the
DPT driver was timing out the "ALLOW MEDIA REMOVAL" command sent to
the controller before it had a chance to finish flushing its cache.
The problem went away when I removed "options DPT_HANDLE_TIMEOUTS"
from the kernel config.  The result of this was that the "ALLOW MEDIA
REMOVAL" command was allowed to complete, umount waited around, and
everything shutdown cleanly.

If this explanation is correct, the DPT driver should be changed to
not timeout the "ALLOW MEDIA REMOVAL" when the DPT_HANDLE_TIMEOUTS
option is being used.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199707130138.SAA14919>