svn commit: r207059 - stable/8/sys/cam/scsi
Andriy Gapon
avg at FreeBSD.org
Thu Apr 22 11:46:42 UTC 2010
Author: avg
Date: Thu Apr 22 11:46:42 2010
New Revision: 207059
URL: http://svn.freebsd.org/changeset/base/207059
Log:
MFC r206648,206651: scsi_cd: CD_FLAG_VALID_MEDIA is sufficient to set
d_sectorsize and d_mediasize
PR: kern/138789
Modified:
stable/8/sys/cam/scsi/scsi_cd.c
Directory Properties:
stable/8/sys/ (props changed)
stable/8/sys/amd64/include/xen/ (props changed)
stable/8/sys/cddl/contrib/opensolaris/ (props changed)
stable/8/sys/contrib/dev/acpica/ (props changed)
stable/8/sys/contrib/pf/ (props changed)
stable/8/sys/dev/xen/xenpci/ (props changed)
stable/8/sys/geom/sched/ (props changed)
Modified: stable/8/sys/cam/scsi/scsi_cd.c
==============================================================================
--- stable/8/sys/cam/scsi/scsi_cd.c Thu Apr 22 09:30:02 2010 (r207058)
+++ stable/8/sys/cam/scsi/scsi_cd.c Thu Apr 22 11:46:42 2010 (r207059)
@@ -2777,8 +2777,12 @@ cdcheckmedia(struct cam_periph *periph)
softc->flags &= ~(CD_FLAG_VALID_MEDIA|CD_FLAG_VALID_TOC);
cdprevent(periph, PR_ALLOW);
return (error);
- } else
+ } else {
softc->flags |= CD_FLAG_VALID_MEDIA;
+ softc->disk->d_sectorsize = softc->params.blksize;
+ softc->disk->d_mediasize =
+ (off_t)softc->params.blksize * softc->params.disksize;
+ }
/*
* Now we check the table of contents. This (currently) is only
@@ -2867,9 +2871,6 @@ cdcheckmedia(struct cam_periph *periph)
}
softc->flags |= CD_FLAG_VALID_TOC;
- softc->disk->d_sectorsize = softc->params.blksize;
- softc->disk->d_mediasize =
- (off_t)softc->params.blksize * softc->params.disksize;
bailout:
More information about the svn-src-stable-8
mailing list