On Mon, 17 Jan 2000, Eric Youngdale wrote:
>
>
> > > > (And if I am not mistaken rscsi_disks[].device is only set
> > > > to zero in sd_detach(), called by the proc code and by
> > > > scsi_unregister_host() and scsi_unregister_device() in scsi.c.)
> > >
> > > Not strictly true. We overallocate rscsi_disks[] with SD_EXTRA_DEV
> > > extra slots. This leaves room for expansion as modules are loaded, as
> we
> > > currently don't have the locking in place to grow the thing dynamically.
> > > The unused slots are initialized with a NULL value in .device.
> >
> > Eric, could you tell me what reads partition tables if we attach new disk
> > when system is already booted? sd_finish() via revalidate_scsidisk()?
>
> Exactly. At the bottom of revalidate_scsidisk, there is a call to
> resetup_one_dev(), which is the call into gendsk to tell it to read the
Umm... What I'm trying to do is to figure out when should we create
disk_struct for SCSI disks. That is, instead of allocating gendisk in the
very beginning do register_disk()/unregister_disk() at right moments and
make replacement for resetup_one_dev() to take pointer to disk_struct
instead of bloody per-major stuff. Right now I'm doing it in the
sd_geninit() (explicitly called in the end of scsi_init()) and in the
branch of sd_finish() that used to be revalidate_scsidisk() (now it's
register_disk() preceded by sd_init_onedisk()). And freeing in
sd_detach()...
-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [EMAIL PROTECTED]