Hi all,
some time ago eh_device_reset_handlers of most drivers were changed to
grab the host lock.
http://www.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=94d0e7b805961c44e4dc486ffc21075084bb7175
Are there general reasons to acquire the host lock in eh_s?
I ask in particular because sbp2's eh_abort_handler actually performs a
superset of what sbp2's eh_device_reset_handler does,¹ yet the
eh_abort_handler does not grab the host lock.² I.e.,
sbp2scsi_abort() /* eh_abort_handler */
{
A;
B;
C;
}
sbp2scsi_reset() /* eh_device_reset_handler */
{
spin_lock_irqsave(host_lock, flags);
B;
spin_unlock_irqrestore(host_lock, flags);
}
So, is it wrong that sbp2scsi_abort doesn't take a lock around B or even
around A...C? Or is it wrong that sbp2scsi_reset takes the lock?
TIA for any clues.
¹) This seems a bit goofy and may change eventually. I don't think
sbp2's eh_s are mature yet.
²) sbp2's eh_abort_handler only has a dedicated lock protection further
down in a subroutine which manipulates an sbp2-internal list.
--
Stefan Richter
-=====-=-=-= =-== --=-=
http://arcgraph.de/sr/
-
: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html