Subject: Proposed quick fix: queue tags and filesystem writes
To: None <tech-kern@netbsd.org>
From: Thor Lancelot Simon <tls@rek.tjls.com>
List: tech-kern
Date: 05/19/2000 12:45:54
I am well aware that there is a mostly-completed major revision of the
SCSI middle-layer for our kernel that addresses this issue. However, I
am concerned about the way some of our SCSI controller drivers use tagged
queueing now, and I'd like to propose a simple rule which I will make
uniform across all drivers that know about tagged queueing:
* Use simple tags for buffers with B_ASYNC set
* Use ordered tags for everything else
I believe this preserves correct metadata semantics and will avoid filesystem
corruption in the event of a system crash. It will avoid the problem some
drivers appear to currently have where data writes may be reordered around
metadata writes due to use of simple tags only (the new ahc driver does this,
for example) while avoiding the performance hit of using ordered tags always
(like isp does) or for all writes (like ncr does).
I just did this for isp -- it's a two-line patch. ahc will be a little more
complex, but not much, and I haven't yet looked at adv or ncr closely. With
adw, I don't think you get any choice about how the firwmare tags the commands
you hand it, so I guess we just get to hope it does the right thing somehow.
Comments?
--
Thor Lancelot Simon tls@rek.tjls.com
"And where do all these highways go, now that we are free?"