[7845] in linux-scsi channel archive

home help back first fref pref prev next nref lref last post

Re: [Question] rscsi_disks[].device being NULL

daemon@ATHENA.MIT.EDU (Eric Youngdale)
Mon Jan 17 15:44:20 2000

Message-ID: <002101bf60f7$a5724020$2017a8c0@eric.home>
From: "Eric Youngdale" <eric@andante.org>
To: "Alexander Viro" <viro@math.psu.edu>
Cc: "Guest section DW" <dwguest@win.tue.nl>,
	"Alan Cox" <alan@lxorguk.ukuu.org.uk>, <linux-scsi@vger.rutgers.edu>
Date:   Mon, 17 Jan 2000 09:32:13 -0500
MIME-Version: 1.0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 7bit


> > > 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.

-Eric



-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.rutgers.edu

home help back first fref pref prev next nref lref last post