On Mon, 17 Jan 2000, Eric Youngdale wrote:
>
> > > > 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()...
>
> I am tempted to think that sd_attach() might be a better place to hook
> in. The idea is that at the start we look to see if the device is of a type
> that the disk driver wants to handle, and then it snarfs an entry in
> rscsi_disks[]. Use that as something to key off of - when allocate the
> disk_struct when we reserve an entry in rscsi_disks[], and free it when we
> release it.
Right, but how soon after attach can we start accessing it? IOW, how bad
will be the attempt to read from it at the end of sd_attach()?
-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [EMAIL PROTECTED]