Conincidentally I've found the same problem but fixed it differently. Because nr_real is not real # of devices but max # of devices of a major #, it doesn't need to be changed on disk add/remove.
1223c1223
< sd_gendisks[i].nr_real = 0;
---
> sd_gendisks[i].nr_real = SCSI_DISKS_PER_MAJOR;
1336d1335
< SD_GENDISK(i).nr_real++;
1450d1448
< SD_GENDISK(i).nr_real--;
2.6 has little different structure but it does like this
sd.c:sd_probe()
gd->minors = 16;
Soohoon.
diff.patch
Description: Binary data

