-
Alexander Viro authored
That's a tricky one and large part of that stuff is temporary - it will be replaced as soon as we have gendisks for all block devices and get sane refcounting for gendisks. * we add per-major lists of gendisks; get_gendisk() looks into appropriate list instead of looking through the list of all gendisks. * we allow driver to override that search - it can call blk_set_probe(major, probe) and then gendisk will call probe(minor). blk_set_probe(major, NULL) restores the default behaviour. * floppy.c switched to use of gendisks; we have one gendisk per disk and let floppy_find(minor) return the right one. Note that final mechanism will involve a similar construction but floppy.c is actually the least interesting application - places where it will really play will include stuff like loading the right high-level driver when we open /dev/hdX, etc. And it won't be major-based...
443ac9b2