some changes to xpt to help make unloading sim modules safer
Matthew Jacob
mj at feral.com
Sun Aug 7 21:27:10 UTC 2011
See http://people.freebsd.org/~mjacob/xpt_patches.txt
The first one come from a coworker (Chuck Tuffli) who found a hole
xpt_create_path_unlocked.
I added a few after that to guard against overrunning some counters so
that they would wrap.
It helped me find out what was going on much easier by adding the
function described here:
http://people.freebsd.org/~mjacob/xpt_path_counts.txt
Finally, http://people.freebsd.org/~mjacob/isp_patches.txt makes isp
safe for unload as a module.
There's some ambiguity over whether it's safe to unload when a periph is
open. Using xpt_path_counts to check with the bus reference count is > 3
for each scsibus attached to each isp sim is a way to avoid that.
Comments?
More information about the freebsd-scsi
mailing list