[7840] in linux-scsi channel archive
Re: [Question] rscsi_disks[].device being NULL
daemon@ATHENA.MIT.EDU (Alexander Viro)
Mon Jan 17 11:49:02 2000
Date: Mon, 17 Jan 2000 07:53:45 -0500 (EST)
From: Alexander Viro <viro@math.psu.edu>
To: Eric Youngdale <eric@andante.org>
Cc: Guest section DW <dwguest@win.tue.nl>,
Alan Cox <alan@lxorguk.ukuu.org.uk>, linux-scsi@vger.rutgers.edu
In-Reply-To: <008501bf6027$ef6aad00$2017a8c0@eric.home>
Message-ID: <Pine.GSO.4.10.10001170730560.10962-100000@weyl.math.psu.edu>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
On Sun, 16 Jan 2000, Eric Youngdale wrote:
>
> ----- Original Message -----
> From: "Guest section DW" <dwguest@win.tue.nl>
> To: "Alexander Viro" <viro@math.psu.edu>; "Alan Cox"
> <alan@lxorguk.ukuu.org.uk>
> Cc: <linux-scsi@vger.rutgers.edu>
> Sent: Saturday, January 15, 2000 10:33 PM
> Subject: Re: [Question] rscsi_disks[].device being NULL
>
>
> > On Fri, Jan 14, 2000 at 04:02:32AM -0500, Alexander Viro wrote:
> >
> > > ... how can it happen in revalidate_scsidisk()? Immediately before
> > > checking for it we do scsi_init_onedisk(target); and this one would die
> > > horrible death if rscsi_disk[target].device was NULL. So either it's too
> > > late or it is always false.
> >
> > Right.
> > (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()?
-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.rutgers.edu