Hi Martin,
instead of having per channel queue, you could have per device queue, but
use the same lock for both, i.e. don't make the lock part of "struct queue"
(or whatever it is called) but instead make the address of the lock be
attached to "struct queue".
That allows you on "good" controllers to use individual locks for
individual drives and also allows you to share the same lock (multiple
"struct queue" point to same lock) among _any_ number of devices on same
channel.
Further if a controller is truly broken and you need to synchronize
multiple channels you could share the lock among those.
I know that means allocating a lock, etc, but heck you can make a slab
cache for spinlocks or semaphores or whatever locking primite you use if
you consider that important.
I don't know much about the IDE or block layers but it strikes me as the
simplest approach to control the level of "lock sharing".
Best regards,
Anton
-- "I've not lost my mind. It's backed up on tape somewhere." - Unknown-- Anton Altaparmakov <aia21 at cantab.net> (replace at with @) Linux NTFS Maintainer / IRC: #ntfs on irc.openprojects.net WWW: http://linux-ntfs.sf.net/ & http://www-stu.christs.cam.ac.uk/~aia21/- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/