[7841] in linux-scsi channel archive
Re: [Question] rscsi_disks[].device being NULL
daemon@ATHENA.MIT.EDU (Eric Youngdale)
Mon Jan 17 12:10:43 2000
Message-ID: <001801bf60ee$30b73820$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 08:24:31 -0500
MIME-Version: 1.0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
> > > (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
partition table for this one device.
-Eric
-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.rutgers.edu