You know, I just figured out how to get rid of SD_EXTRA_DEVS without
having to fix all of the nasty locking problems.  The reason it is easier
with disks is that there are only 16 devices per major, and what I would end
up doing is splitting the datastructures so that there is one array per
major.  Each time we allocate a new major, the new structures for each major
would be allocated to allow enough room for a full 16 disks.  If a new
driver gets loaded and there are no free slots, we just allocate another
major and size it to allow 16 more disks.  All of the datastructures related
to sizes and so forth wouldn't change - those would be per-major, and the
pre-existing arrays for already allocated majors would stay where they are.
We would just allocate new ones for the new major.

    I have this nasty feeling that disk handling and multiple majors
currently doesn't work well for non-x86 platforms where dev_t is > 16 bits.
We may be limiting people too much for some stupid reason.  The mere
existance of the SCSI_DISKS_PER_MAJOR constant tells me that something here
isn't quite right.

    This would require a bit of surgery to redo how the datastructures are
handled, but at the same time I could also fix it so that sd allocates
additional majors above and beyond the 8 we are currently limited to.

    I will keep you folks informed - hopefully in a week I will have
something ready for testing.  I don't know if I will get it done in time for
2.4 - it would be a little risky anyways, and it would clearly need some
exhaustive testing by the linux-scsi guinea pigs before I would dare to send
it to Linus.

-Eric



-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [EMAIL PROTECTED]

Reply via email to