Re: [patch 6/7] SCSI: save disk in scsi_device - resend

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 04 May 2007 15:30:48 -0500
James Bottomley <James.Bottomley@xxxxxxxxxxxx> wrote:

> On Fri, 2007-05-04 at 11:17 -0700, Kristen Carlson Accardi wrote:
> > Give anyone who has access to scsi_device access to the genhd struct as well.
> > 
> > Signed-off-by: Kristen Carlson Accardi <kristen.c.accardi@xxxxxxxxx>
> > Index: 2.6-git/drivers/scsi/sd.c
> > ===================================================================
> > --- 2.6-git.orig/drivers/scsi/sd.c
> > +++ 2.6-git/drivers/scsi/sd.c
> > @@ -1711,6 +1711,7 @@ static int sd_probe(struct device *dev)
> >  
> >  	dev_set_drvdata(dev, sdkp);
> >  	add_disk(gd);
> > +	sdp->disk = gd;
> >  
> >  	sdev_printk(KERN_NOTICE, sdp, "Attached scsi %sdisk %s\n",
> >  		    sdp->removable ? "removable " : "", gd->disk_name);
> > Index: 2.6-git/drivers/scsi/sr.c
> > ===================================================================
> > --- 2.6-git.orig/drivers/scsi/sr.c
> > +++ 2.6-git/drivers/scsi/sr.c
> > @@ -604,6 +604,7 @@ static int sr_probe(struct device *dev)
> >  	if (sdev->media_change_notify)
> >  		disk->flags |= GENHD_FL_MEDIA_CHANGE_NOTIFY;
> >  	add_disk(disk);
> > +	sdev->disk = disk;
> >  
> >  	sdev_printk(KERN_DEBUG, sdev,
> >  		    "Attached scsi CD-ROM %s\n", cd->cdi.name);
> > Index: 2.6-git/include/scsi/scsi_device.h
> > ===================================================================
> > --- 2.6-git.orig/include/scsi/scsi_device.h
> > +++ 2.6-git/include/scsi/scsi_device.h
> > @@ -138,7 +138,7 @@ struct scsi_device {
> >  
> >  	struct device		sdev_gendev;
> >  	struct class_device	sdev_classdev;
> > -
> > +	struct gendisk 		*disk;
> >  	struct execute_work	ew; /* used to get process context on put */
> >  
> >  	enum scsi_device_state sdev_state;
> 
> If you're going to do this, you need to take on board removing the
> struct gendisk from all the ULD structures (since it's now become
> generic).
> 
> James
> 

Ok - I can send that as a separate patch series, or I can include it
in this one.  Which is preferred?
-
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux